Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
AddObject or NewObject or what?
Message
 
 
À
03/02/1999 17:34:48
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00183607
Message ID:
00183825
Vues:
16
>Is your app object a container and you want to add the form as a member?
>Or is it a custom class, and you just need a reference to the form?
>
>I don't know of a way to use NewObject syntax with Addobject, but you can always addProperty to the custom object, and just store a reference:
>
>oApp.AddProperty('oForm',NEWOBJECT("AppMgr","AppManager.vcx"))
>
>But since this reference is a reference and not a contained object, you will have to deal with NULLing it out in the oApp's destroy method.

Yeah, it is based on the custom class, and I do release it in the destroy with an oApp.oForm.Release(). CreateObject works fine. I am just trying to learn how to use NewObject() in this particular situation. Trying to do it the OOP way versus creating a public variable to hold the reference to a non-modal form class that I want to *pop up* when the user hits a certain field.
Mark McCasland
Midlothian, TX USA
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform