General exceptions to LotusScript® specifications

The following are the general differences between accessing Domino® Objects through either LotusScript® or COM:

  • In a COM application, you cannot create Domino® objects with the New modifier, except for NotesSession. You must initialize the NotesSession object and use properties and methods that return Domino® Objects.
  • COM supports only back-end classes. It does not support the following classes: Button, Field, Navigator, NotesTimer, NotesUIDatabase, NotesUIDocument, NotesUIScheduler, NotesUIView, NotesUIWorkspace.

  • COM does not support the concept of a current environment (for example, current database, current agent, or document context).
  • Boolean values are typed as Boolean in COM, and Boolean, Variant, or Integer in LotusScript®. This is not a problem porting from LotusScript® to COM, but may be a problem porting from COM to LotusScript® for Variant and Integer

  • Parameters typed as Integer in LotusScript® are typed as Long in COM. This should not be a problem porting between LotusScript® and COM.
  • Values that take a constant are typed as Enum in COM, and Variant or Integer in LotusScript®. This should not be a problem porting between LotusScript® and COM.
  • In COM, you cannot use item names as NotesDocument properties. For example, in LotusScript® you can refer to the Subject item as doc.Subject (where doc is a NotesDocument object). In COM, you cannot do this; you must use the properties and methods that get and set item values.
  • Where a Domino® property or method returns an array of Domino® objects in a late-binding application, you must assign the return value to a variable before you can index it as an array. For example, the following code results in a run-time error with late binding (but works with early binding):
    Set col = view.Columns(2)

    You must first assign the Columns property to a variable:

    cols = view.Columns
    Set col = cols(2)
  • Error codes in COM are four bytes. The first two bytes contain the value &H8004. The last two bytes contain the Domino® error code as specified in lsxbeerr.lss in the Domino® or Notes® program directory. See the discussion of constant values in "Constants."
  • Where the return type of a property or method is an unknown object, COM may issue the compile-time error "Method or data member not found," or one of the run-time errors "Object required" or "Type mismatch." An example is the Parent property of NotesViewEntry, which can be a NotesViewEntryCollection, NotesViewNavigator, or NotesView object. LotusScript® resolves the object but COM does not. There is no work-around.