Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Major Bug - BINDEVENTS
Message
De
23/12/2004 15:09:28
 
 
À
23/12/2004 14:57:27
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00971680
Message ID:
00971902
Vues:
33
>We may have to use a variation the above. However, where is it said that the return value of delegates should not be used for anything?

In the rules of good class design.

Why should an event have any return value? That's what methods are for. If you want to run code that returns a value to you, write a method.

If you want to tell the system that something has occured, you raise an event that delegates may or may not be bound to.

You should never write code like your example. You should always use the "2" flag of BindEvent() and then use RaiseEvent() to actually call the event.

If you follow this practice, you won't fool yourself into thinking that events should have any return parameter.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform