Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Difference between thisForm.addObject() and newObject()
Message
De
04/02/2005 21:39:20
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Titre:
Difference between thisForm.addObject() and newObject()
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows 2000 SP4
Network:
Windows 2000 Pro
Database:
Visual FoxPro
Divers
Thread ID:
00984088
Message ID:
00984088
Vues:
140
Hi all,

I want to "attach" a non visual object to a form (to be used along the code in the form).
I would like to know what are the differences between:

thisForm.addObject('myObjectName', 'myClass')

and

thisForm.myObjectName = newObject('myClass') && of course myObjectName is a defined property

Are there any advantages on using one or the other? Which one is better in terms of memory release (garbache collection)? Do I have to have special precautions with one or the other?
I think that the same applies to ADD OBJECT in DEFINE CLASS (versus myClass.myObject = newObject()), does it?

Thanks in advance,
Javier.
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform