Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
NEWOBJECT() function vs NewObject() method
Message
 
 
To
16/02/2011 06:23:49
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Network:
Windows 2003 Server
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01500348
Message ID:
01500355
Views:
58
Not exactly. The NEWOBJECT()/ADDOBJECT() method adds an object as a child to the parent object 'This'. That's the only way to add controls to a form at runtime.
The NEWOBJECT()/CREATEOBJECT() functions create an object with no releation to the 'This'. The reference to the object than is stored in the .myProperty

>
>This.myProperty = NEWOBJECT( "myClass", "myClassLib" )
>&& ...and...
>This.NewObject( "myProperty", "myClass", "myClassLib" )
>
>
>Are the two statements above same? If not, how are they different? Can they be used interchangeably?
>
--sb--
Previous
Reply
Map
View

Click here to load this message in the networking platform