Information générale
Catégorie:
Codage, syntaxe et commandes
Makes sense. You can pull the functionality out of the menu, and make is just a basic vehicle for letting the user choose an action.
Thanks,
Bob
>Bob,
>
>It's just a matter of where you encapsulate the functionality as to where you do it. For the PTF-OPP book I created a RightClick menu object. The object was told where to dispatch the OnSelection messages to. ie the form as it created the menu object told it what method names to callback to. This way encapsulates most of the resposibility to the menu object.
>
>By doing it all in the RightClick you encapsulate all the functionality there in one method.
>
>Both ways work equally well.
Précédent
Suivant
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