Oop LotusScript是否具有与此或self等效的功能?
我试图在LotusNotes中创建一个对象,并在OOP庄园中工作。LotusScript只是希望我能够做到这一点Oop LotusScript是否具有与此或self等效的功能?,oop,object,lotus-notes,lotusscript,Oop,Object,Lotus Notes,Lotusscript,我试图在LotusNotes中创建一个对象,并在OOP庄园中工作。LotusScript只是希望我能够做到这一点 我很难找到的一件事是LotusScript中的类是否有自己的概念。在C#中,可以使用“this”关键字,python有self的概念。LotusScript有类似的概念吗?LotusScript使用关键字Me来引用当前类实例 在IBM的e中,您可以看到InvertColors()方法最后两行中的引用 ' Define a class. Class textObject ' De
我很难找到的一件事是LotusScript中的类是否有自己的概念。在C#中,可以使用“this”关键字,python有self的概念。LotusScript有类似的概念吗?LotusScript使用关键字
Me
来引用当前类实例
在IBM的e中,您可以看到InvertColors()
方法最后两行中的引用
' Define a class.
Class textObject
' Declare member variables.
backGroundColor As Integer
textColor As Integer
contentString As String
' Define constructor sub.
Sub New (bColor As Integer, tColor As Integer, _
cString As String)
backGroundColor% = bColor%
textColor% = tColor%
contentString$ = cString$
End Sub
' Define destructor sub.
Sub Delete
Print "Deleting text object."
End Sub
' Define a sub to invert background and text colors.
Sub InvertColors
Dim x As Integer, y As Integer
x% = backGroundColor%
y% = textColor%
Me.backGroundColor% = y%
Me.textColor% = x%
End Sub
End Class
LotusScript使用关键字
Me
来引用当前类实例
在IBM的e中,您可以看到InvertColors()
方法最后两行中的引用
' Define a class.
Class textObject
' Declare member variables.
backGroundColor As Integer
textColor As Integer
contentString As String
' Define constructor sub.
Sub New (bColor As Integer, tColor As Integer, _
cString As String)
backGroundColor% = bColor%
textColor% = tColor%
contentString$ = cString$
End Sub
' Define destructor sub.
Sub Delete
Print "Deleting text object."
End Sub
' Define a sub to invert background and text colors.
Sub InvertColors
Dim x As Integer, y As Integer
x% = backGroundColor%
y% = textColor%
Me.backGroundColor% = y%
Me.textColor% = x%
End Sub
End Class