constructor overloading / different Init
Posted: Thu May 03, 2012 8:51 am
There is no possibility to have different Event Init() with different arguments yet
but a workaround is
What you can do right now is to have additional functions you call.
in myClass.NSObject.objb
code where your class is used
CU
Bernd
- Code: Select all
Event Init()
End Event
Event Init(arg1 As String)
End Event
Event Init(arg1 As Integer, arg2 As String)
End Event
but a workaround is
What you can do right now is to have additional functions you call.
in myClass.NSObject.objb
- Code: Select all
Event Init()
End Event
Public Sub Initialize1(arg1)
End Sub
Public Sub Initialize2(arg1, arg2)
End Sub
code where your class is used
- Code: Select all
Dim v = myClass() : v.Initialize1(param1)
Dim v = myClass() : v.Initialize2(param1, param2)
CU
Bernd