<< September 2007 | Home | November 2007 >>


Yesterday I picked up my new laptop - a Lenovo Thinkpad T61p. It's a worthy replacement for my 3 year old IBM Thinkpad T41p. I know it's very nerdy but boy it's nice! :-)

It's shipping with Windows Vista Ultimate so now I have to determine whether to go with Vista or install Windows XP which was my intent initially.

Discovering Notes 8: Showing dialogboxes from SWT in Notes 8

One of the big changes in Notes 8 is the move to a Java threading model which means that showing a messagebox is not something you can *just* do. This has implications for you if you're developing (or thinking of developing) UI components in Java for Notes 8. These UI components (e.g. sidebar contributions) are developed in SWT and hence follow the SWT way of doing it.

Please note: Although the following may seem (overly) complex nothing of it is new when discussion UI development. The only difference between Notes 7.x and earlier and Notes 8 is that some of these aspects now rears their ugly head.

Now lets get to it...

Since only one thread can access the display and hence draw on the screen at any one time, requests to the display needs to be serialized. In Notes 8 and SWT this is done using the Eclipse Job API. This is done by encapsulating a piece of functionality and asking the platform (the "scheduler") to execute it. The scheduler adds the job to a queue and and execute it once it is its turn. This may not happen right away though it mostly will.

To display stuff in the UI you use an UIJob instance as shown below. This example simply shows a messagebox with some static content.

new UIJob("Rectangle") {
   public IStatus runInUIThread(IProgressMonitor arg0) {
         "HelloWorld", "Hello SWT Job API World");
      return Status.OK_STATUS;
The second example will show you how to display some Notes data. Since access to the Notes API must be run in a specially initialized thread (remember NotesThread.sinitThread?) you have two options:
  • Manually initialize a thread using NotesThread / extend NotesThread.
  • Take the easy route and use NotesJob.
Using NotesJob is by far the easiest and will handle all the dirty details for you. When you do this you can also use the NotesPlatform class which is an (undocumented) way of getting a lotus.domino.Session instance inside Notes 8.

Using NotesJob will take care of getting at the data - to display it in the UI you still need an UIJob which is why I use two job instances in the example below. Since you can only access final variables from within inner classes I mark the name variable as final.

new NotesJob("Show messagebox") {
   protected IStatus runInNotesThread(IProgressMonitor arg0) throws NotesException {
      Session session = NotesPlatform.getInstance().getSession();
      Name n = session.createName(session.getUserName());
      final String name = n.getAbbreviated();
      new UIJob("My UI job") {
         public IStatus runInUIThread(IProgressMonitor arg0) {
               "Username", "Username: " + name);
            return Status.OK_STATUS;
      return Status.OK_STATUS;

I hope this helps you.

Caveat with code from developerWorks tutorial on composite applications

If you're planning to follow the "Building composite applications for IBM Lotus Notes V8" tutorial on Composite Applications from developerWorks (and you really should) and you have Domino Designer set to automatically insert Option Declare for you (and you really should) you need to declare a variable in Lesson 3. You need to declare the cName as a String for the code to compile. Or remove Option Declare of cause... :-)

Re: Ugly regression in Notes 7.0.2

I just realized that the performance regression mentioned earlier isn't on the fix list of Notes/Domino 7.0.3 (release technote). This is really unfortunate since 7.0.3 is the last maintenance release for the 7.0.x codestream for a long time (for all I know anyway) since Notes/Domino 8.0 is Gold. This has been the story with previous releases anyway once a new major release has gone Gold.

This is worth keeping in mind when you decide on code releases. It's a good reason for going to 8.0 anyway... :-)

Tags :

Ugly regression in Notes 7.0.2

Found this technote via the Lotus Support RSS feed. 0.13 seconds vs. 15 seconds and 23 seconds vs. 120 seconds! This is really an ugly regression...

Technote 1260778: Regression: Performance issue assigning array objects to List variables in LotusScript

Tags :

Domino on 64 bit Windows and ODBC

Hmmm... This is one of those where you simply have to know how it works. On Windows 2003 Server, 64 bit version, there are two OBDC control panels. One for 32 bit data sources and one for 64 bit data sources. Lotus Domino, being a 32 bit application, should use the 32 bit data sources but for some reason that doesn't work. It also doesn't work to add the data source to the 64 bit data sources. The problem shows itself by popping a UI error message on the server. If this isn't enough the agent is also halted without any apparent indication on the server console.

The solution is to add the same data source in both the 32 bit and 64 bit data source control panels. Then it works. Wierd!

Tags :

More on Sametime blackboxes

I was at a customer site today and among other things I was asked to take a look on a Sametime business card issue they were having with a custom blackbox. The issue was that the picture was not showing up in Sametime. They did already have a PMR open with Lotus Support but they had been unable to solve the issue.

The customer is using the "custom" blackbox implementation (com.ibm.sametime.userinfo.userinfobb.UserInfoNotesCustomBB) provided by IBM Lotus as part of Sametime 7.5.1 where you can specify a database path, a view and some field names in the UserInfoConfig.xml and the rest is taken care of for you. While this is well and good it still didn't work. The problem was trivial to solve but it was difficult to explain why it simply didn't work.

The issue was that the attributes used to specify the database path and view name are case sensitive!! The customer had simply followed the XML convention of using lowercase attribute names which turned out to be wrong. When you use this implementation the database attribute *has* to be called "DbName" and the view attribute *has* to be called "View". If you get the casing wrong it wont work!

New PMR coming up - change the implementation of the class to make the attribute names case insensitive. Or read the article in THE VIEW 2008 Technical Supplement to see how to easily write your own blackbox... :-)

Guide to Sametime Connect 7.5 plugin_customization.xml

This technotes discuss how to set preferences for Sametime Connect clients using the plugin_customization.xml: Setting the Sametime Connect client's preferences

Sametime blackboxes (update)

Just a short update on my Sametime blackboxes post from earlier today.

As noted by Julian Robichaux and Urs Meli in comments I had a typo in the previously posted code as I had managed to insert the wrong looping code twice... :-( The correct, correct looping should be:

public static void main(String[] args) {
   LinkedList l = new LinkedList();
   for (int i=0; i<10; i++) {
      l.addLast(new Simple(i));
   while (l.size() > 0) {
      System.out.println("" + ((Simple)l.removeFirst()).getI());

Sametime blackboxes

This week I have been writing an article on writing custom Sametime blackboxes for THE VIEW 2008 Technical Supplement and during my research I have stumbled across of number of interesting things. One of them is quite serious, and is actually a quite serious bug, so I thought I ought to share.


Discovering Notes 8: More nice Notes 8 $fields

As posted on friday there is a nice-to-know field in Notes 8 you can use to enable/prevent automatic loading of images in HTML newsletters. This morning I saw two new fields that seems to have AppDev applicability:

  • $AttBytesTruncated: Holds the amount of (binary) data truncated from the document and hence the amount of data needed to be fetched in order for the document to be fully fetched. This is a number field.
  • $Abstract: Holds an abstract in plain text of the Body richtext field. This is a text field.
Both seems to be new (at least I haven't seen them before) and set on by the Notes 8 client since I'm currently receiving my e-mail through a Domino 7.0.2 server (I know it's horrible to hear) and they are not visible in the fields list until I replicate the database to my client.

Could be that it is simply because I truncate received e-mails but I don't think so.

Discovering Notes 8: Automatic loading of images in HTML newsletters

In Notes 8 there is this nice new and improved display of HTML newsletters. An additional nice feature is that images are prevented from loading to combat SPAM bots that harvest e-mail addresses by using dynamic image URLs. See below for a screenshot of how a HTML newsletter looks before images are allowed.

It would however be nice if I could setup a list of e-mail addresses where image loading was enabled by default such as for my favorite HTML newsletters. Well it isn't available out of the box with Notes 8 but you could easily write it yourself as an agent that processes incoming e-mail.

The agent only needs to set a text field called $DelayedImagesOK to the value "ok" (no quotes) for the e-mails where image loading should be enabled upfront.

Happy Friday!

Two must-listen to podcasts

I have the IT Conversations feed as part of my podcast line up and there has been two exceptionally great podcasts the last couple of weeks. Below are the iTunes links to both of them (I also think you can get the episodes directly from IT Conversations).


Guy Kawasaki: The Art of Innovation (shownotes)
Jeff Bonforte: Anger Drives Innovation (shownotes)

Tags :

Lotus Notes and Domino 8: What's New in LotusScript and Formula Language

Rocky posted his slides from his "Lotus Notes and Domino 8: What's New in LotusScript and Formula Language"-session from the Advisor summit. Besides being an interesting read it had two slides that really caught my attention (slide 11 and slide 25).

When describing what's new in the upcoming Notes 8.0.1 (1Q2008) he mentioned a welcome change to a dear old friend: @Now (see slide 11):

  • @Now([NoCache]) - when checking the time on a server forces a server transaction to fetch the time.
  • Without this keyword, @Now would cache the server time on the first call, and compute the current time by adding the cached time and elapsed time.
  • This causes problems if the system time on the client or server machine changes once the server time is cached.
  • Note that using [NoCache] adds the significant overhead of doing a server transaction on each call.

On slide 25 Rocky mentions two additional commands to the ReadViewEntries beside getting the output in JSON instead of DXL. The two new nice parameters are &EndView and &KeyType=<text/time/number>. &EndView returns entries from the end of the view and &KeyType allows you to specify the datatype of the key which allows you to use other key types than text.

Codestore: It's Always The Simple Tips That Are Best


Dim tmpVar as Variant
Dim commonUsername As String
tmpVar = Evaluate( |@Name( [CN] ; @UserName )| )
commonUsername = tmpVar(0)
Dim commonUsername As String
commonUsername = Implode(Evaluate(|@Name([CN];@UserName)|))

See full post at Codestore.net (It's Always The Simple Tips That Are Best) and a link to Tommy who first blogged about it.

Discovering Notes 8: Empty LotusScript debugger

I experienced an empty LotusScript debugger couple of times today in my Notes 8 on Windows XP Prof. SP2 and went to see whether it is a known issue. It is a known issue and is already tracked by Lotus.

Winds of change

I'm happy to announce that as of today I'm employed by IntraVision makers of the Ontime Calendar Suite for Lotus Notes, Microsoft Exchange and Novell Groupwise. It has been final for some time now but as of today it is public. After 8 years of being self-employed time had come for me to try out something new and I'm happy to join IntraVision. In my new job I'll continue working with Notes/Domino and to service existing customers. I will also continue to be an active part of the Notes/Domino community.

Apart from the Ontime Calendar Suite some of you might recall the IntraVision from Lotusphere 2007 where they won a Lotus Award in the "Best Messaging and Collaboration Solution" category.

Feel the winds...