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 19:02:24
 
 
À
16/06/2004 17:30:03
Anthony Testi
Fabtrol Systems Inc.
Eugene, Oregon, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
The Mere Mortals Framework
Divers
Thread ID:
00914462
Message ID:
00914487
Vues:
13
>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?

Yes, this would be overusing it. Save the factory for classes/forms that are likely to be different among clients/projects.


>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 ) ?

Never ran into a problem requiring it, and as to why it's not an object method, my question would be "Which object?" You could hang it off goApp, but I like being able to treat DoForm as a command, more or less.

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

You're learning. <g>

Chris.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform