Information générale
Catégorie:
Gestionnaire d'écran & Écrans
>That's, IMO, far easier than going down the list of all controls or all classes that you may have, and will keep working even if you add more controls later. Also, setall() doesn't recurse, so you'd have to reissue the whole set of setall() calls for each composite object.
No you don't need. I use a framework making extensive use of the recursing setall does. The class parameter is optional, so you can set all readonly properties at once, but you can even have better control, if you define a property, eg "isReadonly", together with an assign-method, then set the property with SetAll() and thereby trigger the assign method. This works without bindevents, which would at least need some init code to bind to all controls or let all controls bind to a mediator. Sometimes oldsstyle ways are even better then new options.
Bye, Olaf.
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