Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Is DoForm(…) the proper way to call a form in MM?
Message
De
16/06/2004 17:30:03
Anthony Testi
Fabtrol Systems Inc.
Eugene, Oregon, États-Unis
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
The Mere Mortals Framework
Titre:
Is DoForm(…) the proper way to call a form in MM?
Divers
Thread ID:
00914462
Message ID:
00914462
Vues:
60
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>
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform