Johan Känngård LGPL’ed his LotusScript Collection classes – nice… :-)

Some time back Johan chose to change the license of his very nice LotusScript collection classes from no license to GPL. This was a problem for me since we use the classes in a wide range of applications. GPL doesn’t allow the code to be included in a non-GPL application.

I wrote Johan and asked whether he really wanted this or whether he would consider changing the license to LGPL instead (LGPL allows you to incorporate the code in closed-source applications). Johan agreed that LGPL would be better so he will change the license when he get around to it.

Very nice. Thank you Johan.

Single-Sign-On (LtpaToken) login problem from Domino servlet solved with the help of Lotus support

We have been using the NotesFactory.createSession(null, String) method to create Session objects from Java servlets for a long time but for some reason it didn’t work under Domino 6.0.x when running Internet Sites so we gave it up and continued using Web Configuration where it worked flawlessly. Until now that is since we really needed some of the Internet Sites functionality so I gave it another try under 6.5.4 but without any success. I broke down and called Lotus Support.

Lotus support came back to me promptly with a solution. The solution was to use another method to create the Session objects. Instead of manually getting the LtpaToken cookie from the request and passing it to the createSession-method as mentioned above you should pass the HttpServletRequest to the method like NotesFactory.createSession(null, javax.servlet.HttpServletRequest).

Perfect!

The View article

For a long time I have been playing with the idea of trying to get an article published in The View magazine. For those not knowing what The View is, it is the technical journal for Lotus Notes/Domino. The magazine is all black and white and mostly reminds me of the scientific articles I used to read back when I was studying biochemistry at the University of Copenhagen.

But anyway – I finally contacted The View and eventually sent in a proposal for an article and after a few clarifying questions the proposal was accepted. 🙂

I’m very exicited and I’m looking forward to trying myself out as a writer trying to convey some ideas I believe very firmly in.

I’m still a little unsure as to how much I’m at liberty to disclose about the subject and the contents of the article so I’m going to hold my tounge. Better safe than sorry, though I think I’m safe telling that the article is Lotus Domino/Notes related and is about the LotusScript language.

My deadline is 18 July and the article should be out in the November 2005 issue. It sure is some editorial process though I guess it is necessary to guarantee the quality of the published content.

I’m back…

I have been out of cyberspace for quite a while due to my home server being down, but that should be a saga now. Hopefully content should be flowing a little more frequently now.

A part from the Notes/Domino/Java content there will be a number of posts in Danish since I will use this blog as a training diary as well. I have made arrangements with a guy (Kim Jessing) who will coach me the last 2 months of my training towards my road biking trip to the Pyrenees this summer.

I’m really exited to get started (the training schedule actually started yesterday) and I’m looking forward to having to follow a training schedule etc.

Tired of dual-language templates

When you run the translated versions of Lotus Notes templates there will be two copies of each design element. One for the English version and one for the translated version (Danish in our case). The version Notes uses are determined by the language property of the database (see the bottom of the fourth tab of the database property box).

One problem with the double set of design elements is that that the template takes up twice the size on the disk which is bad when you multiply the double disk usage by a couple of houndred users.

The storage space used by the template alone can be solved by using single copy templates so it is ok.

Much worse are the issues that arise when applications need to access the mail database. One example of an application that need to do this could be an application that synchronizes the mail database (calendar, to-do’s and e-mail) with a handheld device.

The problem here isn’t the calendar or to-do’s since these documents are located based on views (and the selection formula is the same for different language versions). The problem lies with the inbox since it is a folder. Folders hasn’t got a selection formula but contain the documents that are actively placed in the folder by the router in the case of the mail database.

Since the inbox is a folder the result is VERY different when looking in the English version of the design element rather than the Danish version. In this case the inbox will be empty.

The only solution I have been able to come up with has been modifying the standard template giving the Danish version of the inbox folder an alias. I tried this but it resolved in the router not being able to deliver mail to the user. Not really a practical solution…

I have to call Lotus Support about this.

Multiple form aliases

Looking at the “Reply with History” form I saw that the form has multiple aliases. The form name is specified like the below:

Reply | wReply | Reply

A simple test reveals that you can use both the aliases (wReply and Reply) from commands such as @Command([Compose]). This is really nice for backwards compability if you need to rename a form.

LotusScript.doc (part 3)

I have based the layout on the layout of the javadoc documentation generated by the Sun tools. The main windows is separated into three main frames:

  • Top left – frame showing the different design elements with LotusScript (forms, views, agents and script libraries)
  • Bottom left – frame showing all found LotusScript classes in a sorted list
  • Right frame – main frame showing design elements with LotusScript

Below is a screenshot of the opening window (click on image for a larger version)…

…and a screenshot showing the documentation of a class (click on the screenshot for a larger version):

LotusScript.doc (part 2)

The code has been expanded so it now also supports:

  • Constants (incl. datatype)
  • Class properties
  • Methods and functions with global scope
  • Views
  • Forms

I have inserted some sample documentation generated below. As previously mentioned the next thing I am going to approach is formatting the output for easy navigation and cross-reference.

ScriptLibrary @ FooBar

Constant @ PRIVATE_STRING_CONST

[CONST] (PRIVATE) PRIVATE_STRING_CONST As String = “abc123”

Constant @ PUBLIC_INTEGER_CONST

[CONST] (PUBLIC) PUBLIC_INTEGER_CONST As Integer = 12345
This is a comment for my PUBLIC_INTEGER_CONST constant.

Constant @ FRIENDLY_STRING_CONST

[CONST] (PRIVATE) FRIENDLY_STRING_CONST As String = “should be ignored”

Class @ Bar

Parent class.

Class @ Foo (inherits from Bar)

This is a class comment and it may span multiple lines. The class the inherits from the Bar class.

Property @ Lekkim

[PROPERTY] (PRIVATE SETTER) Lekkim As String
Sets the lekkim.

Property @ Lekkim

[PROPERTY] (PRIVATE GETTER) Lekkim As String
Returns the lekkim.

Method @ New

[SUB] (PUBLIC) New
Constructor.

Function @ GlobalFunction

[FUNCTION] (PUBLIC) GlobalFunction(arg1 As String, arg2 As Long) returns NotesDocument
I have also documented my global function.

Method @ GlobalMethod

[SUB] (PUBLIC) GlobalMethod

Form @ _1. TestTest Document

Method @ Querysend

[SUB] (FRIENDLY) Querysend(Source As Notesuidocument, Continue As Variant)
Form Querysend event.

Method @ Queryclose

[SUB] (FRIENDLY) Queryclose(Source As Notesuidocument, Continue As Variant)
Queryclose event.

View @ Test documents|notesTestDocuments

Method @ Querypaste

[SUB] (FRIENDLY) Querypaste(Source As Notesuiview, Continue As Variant)
Querypaste view event.