The Execute function in LotusScript does not invoke the Initialize sub when ”using” script libraries. I.e. if the library ”libTEST” looks like:
(Options) (Declarations) Private session As NotesSession Public Class Test Public Sub new() Print "session is nothing: " & (session is nothing) End Sub End Class Sub Initialize Set session = New NotesSession() End Sub
Dim s As String s = |Use "libTEST"| Execute(s)
…will not execute the Initilize code, and the session variable will be Nothing in the constructor, and will output:
session is nothing: True
I haven´t found any way around this bug yet.