Properties as top level members of script libraries
Is anyone actually using the possibility of defining a Property as a top level member in a LotusScript script library? Apparent you are able to define a property as a top level member of a script library just as it is possible with a Sub or Function. The below code will actually compile and run ("SomeProperty" is not a variable but actually a Property defined in the Declarations section).
Sub Initialize SomeProperty = "HelloWorld" Msgbox SomeProperty End Sub
Below is how the code actually looks in Domino Designer with "value" being a String variable defined in the Declarations section. Although possible I wonder if anyone actually uses it as I think it makes the code a little difficult to read.
I prefer getter and setter methods
Re: Properties as top level members of script libraries
Re: Properties as top level members of script libraries
Re: Properties as top level members of script libraries
Public Class TestClass Private testAttribute As Integer Public Property Get testAttribute As Integer testAttribute = Me.testAttribute End Property End Class
This class won't compile with following error:
Name previously declared: TESTATTRIBUTE
So I use this:
Public Class TestClass Private testAttribute As Integer Public Function GetTestAttribute As Integer GetTestAttribute = Me.testAttribute End Function End Class
Ciao
Thomas





