Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Is DoForm(…) the proper way to call a form in MM?
Message
From
16/06/2004 17:30:03
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
The Mere Mortals Framework
Title:
Is DoForm(…) the proper way to call a form in MM?
Miscellaneous
Thread ID:
00914462
Message ID:
00914462
Views:
61
It looks like I should be using the DoForm( ) when I want to instantiate a form, correct? Is there a rule-of-thumb when not to use it?

Even better I guess would be to do this:
DoForm( goApp.oMMFactory.GetClassName( 'AboutForm' ) )

Since this is a new app should ALL DoForm use the factory? Would I be overusing the factory pattern if I did?

Couple of side questions:
1) Why is DoForm not a method of some class? That surprised me. No special reason just a feeling that it should have been more OOP ( Maybe I’ve OD on OOP <s> ) (Maybe a command pattern should be used? ) Has anyone run into a problem that they said to themselves if only DoForm was a Method ( or object ) ?

2) I noticed that the factory can either create the object or return the object name.
Is it really a factory ( Pattern ) when it does not create anything but just returns a name of a object? Seems like that is just a simple function call, that may be implemented using a strategy pattern.

I know I know stop trying to fight the framework, become one with the framework. <s>
Next
Reply
Map
View

Click here to load this message in the networking platform