Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Form as a class
Message
From
19/07/1997 10:49:28
 
 
To
18/07/1997 23:37:57
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Title:
Miscellaneous
Thread ID:
00040189
Message ID:
00040740
Views:
29
>>>i've got a form that i've saved as a class.
>>>my question is can i pass parameters to the class when i create the object with createobject
>>
>>I am not sure about passing parameters when you create the object. You can pass parameters to it by: Do Form FormName with parm1, parm2, ...
>>The parameter statement needs to be in the form's INIT.
>
>I think that you can call any method in the calss and apss parametrers to the calling method.
Parameters that you want to pass to the init method of the form class are part of the createobject or addobject methods. Syntax in the help file. Once you have the object create all of the methods are available thru the handle to the object. If so code
loMyClassForm = createobject('foo',initparm1, initparm...) the methods are loMycalssform.methodinfoo()
or if added to a container class like the application class
this.addobject('foonamehere','foo',parms...) the method of foo are referenced from within the container as this.fooname.methodinfoo()
and if the container is the application class from anywhere in the application as goApp.foonamehere.methodinfoo()
HTH
Gary
Gary
Helping Make Ideas Reality
Previous
Reply
Map
View

Click here to load this message in the networking platform