Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Read only for all fields
Message
De
12/08/2009 18:20:14
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
 
 
À
09/08/2009 11:46:15
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
01416802
Message ID:
01417755
Vues:
55
>>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.

I really thought setall() doesn't recurse - must have thought that it just parses .objects() collection. Good then.

Of course, for cases when you want something hooked to any object regardless of its class, or whether it was there from the beginning or was instantiated later, you can recurse and bindevent whatever you want. In this case, I agree, old stuff is simpler, ergo better.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform