Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
NEWOBJECT() function vs NewObject() method
Message
 
 
À
16/02/2011 06:23:49
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Network:
Windows 2003 Server
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01500348
Message ID:
01500355
Vues:
60
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--
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform