jump to article
...intermittent thoughts

News on @WebDbName for XPages

Last week I posted some reusable, hand crafted @Function for XPages. Well there was a small mistake in it, I did not realize earlier. @WebDbName is written differently :-) So here is pretty much the same function - with correct spelling of the name:

/**
* provides functionality of the function with same name from @Formula
*
* @return the name of the current database in a websave format
* @author Michael Gollmick
* @version 1.2
* @date 20090127
*/
function @WebDbName() {
        try {
                if (typeof this.name === 'undefined') {
                        var path = database.getFilePath();
                        var re = new RegExp("\\\\", "g");
                        path = path.replace(re, "/");
                        var arr = path.split("/");
                        for (var a = 0; a < arr.length; a++) {
                                arr[a] = escape(arr[a]);
                        }
                        this.name = arr.join("/");
                }
        } catch (e) {
        }
        return this.name;
}

Besides of that correction of the spelling, I am thinking about a potential problem: what if IBM is releasing a newer version of their @Formula library containing an implementation of @WebDbName? Well, applications relying on this solution should run, since the custom function declaration should overload the initial definition - but what if such a potential native implementation works somewhat differently? That would be horrible for anyone who attempts to maintain legacy code, relying on an implementation as I just showed up above. One possible solution would be to name such functions differently. Well, that would work but would not be that easy. How to make such functions better remarkable to those who are getting used to XPages and come from an @Formula background? Daniel mentioned, to add some suffix to the function name, so that would probably be @WebDbName_MGO(). Good Idea, but I think this will look odd in the code. My current thoughts tend to rename this function to $WebDbName() and name future other implementations of known @Formulas also with a $ symbol at the beginning. They would then become the $Functions ;-)

if your Domino Designer 8.5 is not starting anymore...

... and you maybe also get "selfexplaining" error messages like this: "'Platform Command Processor' has encountered a problem."
'Platform Command Processor' has encountered a problem.
the solution is not necessarily to delete the entire workspace directory in your Notes data directory (although this is a valid and working solution). Probably it is enough to delete only one file, if you know which one and where...

At first make sure Notes is not running anymore at all. The typical suspects like KillNotes and ZapNotes may not fit your needs, try some NSD -kill and check your task list if some nsd.exe is still running. if not, assure also the task soffice.exe is not running - that's the process name of the included Symphony (which is a forge of OpenOffice formerly known as StarOffice, hence the name by the way).

If all of these processes do not run anymore, go to your notes data directory and then click down to:
<NOTESDATADIRECTORY>\workspace\.metadata\.plugins\com.ibm.rcp.personality.framework\personalityWindowState\
in that directory check for the following file:
com.ibm.designer.domino.personality.config.xml
if it exists - try renaming it or even less gentle, delete it (there should be an .bak version of it anyway) and restart Notes. DDE should now start. Well, one disadvantage: some of the settings you made to the client UI will be lost - in my case it was the window size (maximized) and the position of the panes. But I think that's way better than deleting the whole directory, loosing the vast majority of the Notes client settings, your Sametime settings, your custom plugins and all that stuff...

@WebDBName in XPages

In the last days I have worked quite a bit with Domino XPages Technology. One thing that came up was the lack of an @WebDBName function that is missing in XPages. But the solution is more than easy and requires just a few lines of code. You may want to copy that because you just don't want to code it every time. For me this is a function I have put that function into some core Serverside JavaScript-Library I include into every page and Custom control anyway, so I can use it everywhere. I took the name I expected to have which is the only critical part - if that function is included at anytime in the future, that hand crafted function may cause problems or incompatibilities, so it might be a good idea to give it another name.

/** *****************************************************************
* provides functionality of the function with same name from @Formula
*
* @return the name of the current database in a websave format
* @author Michael Gollmick
* @version 1.2
* @date 20090119
****************************************************************** */
function @WebDBName() {
        try {
                if (typeof this.name === 'undefined') {
                        var path = database.getFilePath();
                        var re = new RegExp("\\\\", "g");
                        path = path.replace(re, "/");
                        var arr = path.split("/");
                        for (var a = 0; a < arr.length; a++) {
                                arr[a] = escape(arr[a]);
                        }
                        this.name = arr.join("/");
                }
        } catch (e) {
        }
        return this.name;
}
/* ******************************************************************
* END @WebDBName
****************************************************************** */

Feel free to use it!

Just solved the cube for the first time

Well, quite funny, I never managed to correctly solve the magic cube ever before - don't know why (I always did the throw-and-puzzle solution). Maybe I never was patient enough ;-) Well, yesterday I happened to download Arcus, a free cube simulator, which runs as a Java applet but also natively on Windows (did not yet check it on Ubuntu). I then needed some time to get used to the usage of it but now it starts growing on me (can come game do that?). One may ask, how I managed to solve it - well, that was easy - I had some help. There are very good solutions on the web - even though you have to be very careful to not destroy your solution by just reading too quickly ;-) The one I liked the most was the solution made up by Jürgen Köller, who also has some very interesting references, links and also something about the cube's history.

Solved Cube

HTML Validator Plugin for Firefox on Ubuntu

As for many, I am also addicted to the HTML Validator Plugin for Firefox. Unfortunately this is not available for Linux:

Unfortunately this statement is wrong, very wrong! It is only Mozillas update site statingit wrongly - the XPI for so many other platforms is in fact available. You can to go to the Plugin homepage and find it there. While you even can chose between a 32 and 64 Bit version for Linux, you have to firstly install some more packages. This can easily achieved by issuing the following command in a terminal:

sudo apt-get install libstdc++5 libxul-dev

If you then install the Plugin (or restart Firefox if you already did so), the Plugin is available - wohoo!


Thanks to Gabriel Bretschner for collecting the necessary information in German.

Launchy also a Linux Tool

I am a big fan of Launchy on Windows from the first day on I have seen it. It makes me start programs so much easier - especially because the start menu in Windows is completely crowded with useless subfolders and very important readme.txt files and sometimes even with the Uninstaller application to get rid of a very bad application directly. It pretty handy to just push the shortcut Alt+Space and the start typing the first letters of the application you want to run and let Launch find that program for you.

On Windows it is coded in .NET, so I did not even think it was available on Linux. To my surprise the search for an pendant coded in Linux pointed me actually to Launchy again for - and it is so easy to use here too! You can download Launchy for Linux at Sourceforge. Well it works somewhat different - the hotkey for activation has moved to Strg+Space, because the Windows one is already in use. But this makes not much of a difference, it is easy to use too.

The only thing one should do, is make it autorun on log on:

1. Go to the System\Preferences\Sessions Menu
2. under the Startup Programs tab click Add
3. No enter the following values:
Launchy Launcher
at the next logon, Launchy will be started automatically and will help to find your programs more easily.
Launchy Window under Ubuntu