Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Form as a class
Message
De
19/07/1997 10:49:28
 
 
À
18/07/1997 23:37:57
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Titre:
Divers
Thread ID:
00040189
Message ID:
00040740
Vues:
31
>>>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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform