Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Yet Another VFP6 tip
Message
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00117011
Message ID:
00117267
Views:
13
>Hey folks,
>
>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.

But aren't there some serious performance hits for this? I seem to remember something in FP Advisor to that effect.

Christopher
Christopher Estep

When the student is ready, the master appears.
-- Chinese Proverb
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform