Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Yet Another VFP6 tip
Message
De
14/07/1998 12:57:06
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00117011
Message ID:
00117228
Vues:
11
Hi Jim,

>
>VFP6 includes the new function NewObject() which can be used in place of CreateObject(). What's the benefit, the NewObject() function will take the class library as an agrument eliminating the need to SET CLASSLIB before you create the object. The syntax for NewObject() is listed below.
>
>
>NEWOBJECT(cClassName [, cModule [, cInApplication ;
>          [, eParameter1, eParameter2, ...]]])
>
>
>The arguments are;
>
>cClassName is the name of the class to uyse in creating the object
>cModule is the name of the class library or prg in which the class
> is defined
>cInApplication is the app or exe file that contains the class
> definition
>The rest are optional parameters that will be passed on to the object's Init
>
>This function saves a lot of code when creating objects. You don't need to open all classlibs in the startup program yet you can create objects from those libraries by using the NewObject function.


Very cool tip, Jim. Anything which eliminates SETs is cool by me.
------------------------------------------------
John Koziol, ex-MVP, ex-MS, ex-FoxTeam. Just call me "X"
"When the going gets weird, the weird turn pro" - Hunter Thompson (Gonzo) RIP 2/19/05
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform