Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Best Practices
Message
From
08/02/2013 09:51:12
 
 
To
08/02/2013 09:45:22
Mike Sue-Ping
Cambridge, Ontario, Canada
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Title:
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01565478
Message ID:
01565487
Views:
76
If you specify the class name in NEWOBJECT (), VFP doesn't have to search in all VCX at runtime to find the class you try to instanciate. If you have more than one class name with the same name in different VCX, you aren't sure witch one VFP will find first and can hang up with a bug if VFP use the wrong class.

>I've used newobject() in other projects but this particular one is inherited code that, as I've mentioned before, uses set classlib.
>
>The thing that I'm still unsure of is, does using newobject() reduce system resources (or offer other advantages other than not having to set classlib) when compared to set classlib? If it does, then I'd attempt to switch over to using newobject() instead. If not, then I wouldn't bother.
Previous
Reply
Map
View

Click here to load this message in the networking platform