Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Eventbinding question
Message
From
29/04/2003 15:15:10
 
 
To
29/04/2003 14:21:06
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00782700
Message ID:
00782873
Views:
13
>>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.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform