Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
AddObject or NewObject or what?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00183607
Message ID:
00183633
Vues:
14
Hi Mark,

You can use something like this:

oApp.oGPRA = NewObject("TravGPRA", "AppClass.vcx")

provided the property oGPRA is defined for oApp.

You could also create an array property to hold them. For example:

lnNextAvail = alen(oApp.aForms, 1)
oApp.aForms(lnNextAvail) = NewObject("TravGPRA", "AppClass.vcx")


>In VFP6, I create an application object that is based on the custom class. This object holds all my app properties such as LoginID, FiscalYear, etc.
>
>Now I have a created a class based on my form subclass. Is there a way to use NewObject() to add this object to oApp? The code below works fine, but I am trying to learn what this new function will and will not do.
>oApp = newobject("AppMgr", "AppManager.vcx")
>set classlib to AppClass.vcx  && different classlib from oApp
>oApp.AddObject("oGPRA", "TravGPRA")
>TIA!
kenweber
GCom2 Solutions
Microsoft Certified Professional

Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform