Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Difference between thisForm.addObject() and newObject()
Message
From
04/02/2005 21:39:20
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Title:
Difference between thisForm.addObject() and newObject()
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows 2000 SP4
Network:
Windows 2000 Pro
Database:
Visual FoxPro
Miscellaneous
Thread ID:
00984088
Message ID:
00984088
Views:
136
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.
Next
Reply
Map
View

Click here to load this message in the networking platform