Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Eventbinding question
Message
De
29/04/2003 15:15:10
 
 
À
29/04/2003 14:21:06
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00782700
Message ID:
00782873
Vues:
12
>>I'm bugged by this because there must be some utility to RAISEEVENT() but to this point I can't fathom it.
>
>Have you looked at http://fox.wikis.com/wc.dll?Wiki~EventBindingSample~VFP
>
>Notice the line:
>
>
RaiseEvent(this, "Changed", this)
>
>This line in MyAccount::Update() actually executes MyApp::AccountChanged(), because MyApp::AccountChanged() is a delegate of MyAccount::Changed().
>
>Notice that the MyAccount class makes zero references to the MyApp class. If not for the RaiseEvent()/BIndEvent() pair, how would MyAccount call a method from MyApp if there are no object references to a MyApp object in MyAccount?
>
>Now it is true, that a method call to MyAccount::Changed() could trigger the event too, but as you said in message#781324
>
>"[RAISEEVENT()] is clearer to the reader just what is afoot when reading the code (from an intentions/design point of view)."

And I still feel that this is the case. What I am getting at is something more than a bit of added clarity in code. I still have the feeling that there is more intended to this than is apparent to me at this time.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform