Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/oop/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Oop LotusScript是否具有与此或self等效的功能?_Oop_Object_Lotus Notes_Lotusscript - Fatal编程技术网

Oop LotusScript是否具有与此或self等效的功能?

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

我试图在LotusNotes中创建一个对象,并在OOP庄园中工作。LotusScript只是希望我能够做到这一点


我很难找到的一件事是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