Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Difference and When to use NEW/ADD/CREATEOBJECT()
Message
 
To
13/04/2004 12:11:54
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00894349
Message ID:
00894697
Views:
12
Hi Nancy

Thanks for responding. I have had the priviledge to read a few of your FoxTalk article but unfortunately not many VFP books (if any) are available here, so I haven't had the opportunity to read any of your books.

>Opinions will vary, but I say, there's no problem especially in the situation you describe. The performance difference between CREATEOBJECT and NEWOBJECT (I don't know offhand if MS has improved on that, btw) would be important *only* in the case of creating objects in a tight loop many times over.
>
>What one gains by not having to
>1. check to see if the classlib is already openened
>2. Set classlib to it, while, of course, preserving the current set classlib libraries
>3. issuing the createobject
>
>Is immense, IMO. Plus, it's self-documenting. Other programmers will be able know exactly what library the object is coming from when they read your code.

That's a nice point in case for NEWOBJECT() vs. CREATEOBJECT(), thanks a lot.
Regards
Bhavbhuti
___________________________________________
Softwares for Indian Businesses at:
http://venussoftop.tripod.com
___________________________________________
venussoftop@gmail.com
___________________________________________
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform