Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Possible to bindevent in Control vs. Container?
Message
 
À
19/05/2005 12:03:44
Information générale
Forum:
Visual FoxPro
Catégorie:
Programmation Orientée Object
Divers
Thread ID:
01015856
Message ID:
01015935
Vues:
22
This message has been marked as the solution to the initial question of the thread.
Malcolm,

I can't confirm or deny what you're trying to do here. Well, I guess I could if I weren't being so lazy. ;) But, I would like to ask why you are converting your container class to a control class? Is it just to hide the contained controls when the class is instantiated or dropped on a form? If so (since that's ususally the main, if not only, reason), you could just leave it as a container and mark the contained controls as Protected. They won't be accessible as objects. This gives the same results as what is generally desired by using a Control class without the limitations of the Control class. I (and many agree with me) find the Control class to be pretty useless.

HTH,
Chad

>I was in the process of converting some Container based classes to Control based classes and discovered that bindevent() does not appear to work WITHIN a Control. I guess this makes sense because of a Control's encapsulation, but I would have thought that bindevent()'s issued within a Control's methods would have access to the Control's PEMs.
>
>The workaround is just to explictly redirect events by placing redirect code in the events that need to be redirected vs. using bindevent.
>
>I suspect this is all by design, just looking for a confirmation.
>
>Thanks,
>Malcolm
_________________________________
There are 2 types of people in the world:
    Those who need closure
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform