Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Benefits to create object -vs- do form
Message
From
23/08/2000 15:30:45
 
 
To
23/08/2000 13:01:28
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00408330
Message ID:
00408437
Views:
14
>Having had no formal training in VFP I find that I use "do form" instead of "create object". However, a lot of the code that other people have written uses "create object". Can anyone briefly show me the benefits of create object over do form

DO FORM is good for running forms, CreateObject() is helpful when trying to create an instance of a class. :-)

You might think I'm kidding around, but thats pretty much how I look at it: its wether the form should be an SCX or apart of a VCX that matters, because how they are run or instanciated its pretty inconsequential.

Why would a form want to be a class instead of a form? If you think at any point subclassing it would be useful, or if DataSessions are completely no needed, it may be a faster loader: make it a class. Or where you create the form on the fly in a PRG for example, its easier with DEFINE CLASS then trying to kludge it with a blank form.

I use DO FORM because thats how my oApps OpenForm() method does it, and then does all the standard form manager stuff.
Previous
Reply
Map
View

Click here to load this message in the networking platform