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)


 Comments

1) Managing INI Variables
Lance | 3/27/2007 9:26:59 AM

Works great if you have a workplace or the basics page, but if you have customized a "home" page, then the actions menu is that of the first (left) column in your custom welcome page.

2) Managing INI Variables
Andre Guirard | 3/27/2007 4:40:02 PM

Good point, though to be technically correct I think you'd have to say the actions menu comes from the application that has focus, which depending just how customized your home page experience is, could be almost anywhere.

I guess in that case you could put it in your mail file -- I don't know about you, but in my case that's open most of the time anyway. I have a bunch of little utility agents in my mail file (mostly for dealing with mail). So that they all show up on the Actions menu I use subcategorization, e.g. name them "Utility\xxx".

Or, you might create a Page in your bookmarks with an action bar on it to run any special functions you might program in, and display that page in one frame of your custom welcome page. Then you wouldn't need the Actions menu.

 Add a Comment
Subject:
   
Name:
Comment:  (No HTML - Links will be converted if prefixed http://)
 
Remember Me?     Cancel

Search this blog 

Disclaimer 

    About IBM Privacy Contact