IBM®
Skip to main content
    Country/region select      Terms of use
 
 
   
     Home      Products      Services & solutions      Support & downloads      My account     

developerWorks  >  Lotus  >  Forums & community  >  Best Practice Makes Perfect

Best Practice Makes Perfect

A collaboration with Domino developers about how to do it and how to get it right in Domino

One little annoyance I've had is the need during testing to see and change the values of lines in my notes.ini file while the client is running. I either had to shut down the client, edit the notes.ini, and then restart Notes, or else write a special LotusScript control -- maybe a button in the body of a draft Memo -- to assign the value. (The ENVIRONMENT statement or @Environment in macro language can set an ini variable, but not a 'system' one). Add to this the difficulty of remembering the names of all the relevant ini variables, because if they don't already have a value, they're probably not in the file at all, so you can't search for the line to change it.

To make this work more smoothly, I wrote a LotusScript agent in my bookmark.nsf file. This is a good place to write general utility agents not tied to a particular database, because the bookmarks application always has a window tab open that you can switch to. I can always run the agent by switching to the Home tab in my client and selecting it from the Actions menu, which in Bookmarks doesn't have much stuff on it already. (I also have a technique for running LotusScript from a toolbar icon, which I describe in this article).

Dialog from 'Set INI' agent

This agent maintains a list of the ini variables that interest me, stored in a profile document in the bookmarks file. It shows a combobox of the ini variables I have used before in the agent, and their values (the list of used-before variables is stored in a profile document). I can add to the list by typing a new name, as I'm in the middle of doing in this illustration. If I preface the name with a "-", it is deleted from the list in the profile document. And if I use "?" as a value, (varname=?) then I'm told the current value and asked for a new one (note: don't cancel here -- inputbox can't tell the difference between cancel and blank).

Here's the source code, which needs to be in a menu agent that runs on "None". manageIni.lss

Notes:

  • Opening the Notes.ini file in notepad while Notes is running, is not a good way to check the value of a variable, because the client caches changes made by its own code, and might not write them immediately.
  • Many ini variables require a restart anyway before the client will notice the changed value, but at least this makes it easier to change the value, as opposed to editing the file manually.
Any of you have other strategies for managing INI variables, or other functions useful to developers?

Andre Guirard | 26 March 2007 02:20:45 PM ET | Plymouth, MN, USA | Comments (2)

Search this blog 

Disclaimer 

    About IBM Privacy Contact