General information
Category:
Forms & Form designer
>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
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only