Information générale
Catégorie:
The Mere Mortals Framework
>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
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement