Is it possible to create a new object and pass it a a name to use with the object. so something like this:
[CODE]
Type TSwitch Extends TObject
Global List:TList
Global Image:Timage
Function Create(name)
name:TSwitch = New TSwitch
If List = Null List = CreateList()
List.AddLast name
EndFunction
Method New()
X = 300
Y = 400
EndMethod
End Type[/CODE]
This don't work but its what im trying to achieve, do i have to state what type "name" is?
Cheers
[CODE]
Type TSwitch Extends TObject
Global List:TList
Global Image:Timage
Function Create(name)
name:TSwitch = New TSwitch
If List = Null List = CreateList()
List.AddLast name
EndFunction
Method New()
X = 300
Y = 400
EndMethod
End Type[/CODE]
This don't work but its what im trying to achieve, do i have to state what type "name" is?
Cheers