Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
BINDEVENT() and parameters
Message
From
09/05/2003 07:46:50
 
 
To
04/05/2003 14:50:10
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00784704
Message ID:
00786694
Views:
15
>Suppose that I have several events where the only line of code in them is along the lines of
=This.Parent.CustomMethodOfClass(param1, param2, param3)
Is there any way to use the BINDEVENT() function to eliminate that line of code (assuming that I put the BINDEVENT() calls in the control's Init()?
>
>There is apparently no provision for parameters in the function and the Help is basically mute on the subject except for the tantalizing words "You cannot bind to an event with parameters that are passed by reference.".

I don't see a problem here.
Provided the method that you set as the delegate has enough parameters to receive all that any possible event which triggers it can pass.

When an event happens, what is passed to the delegate is exactly the parameters passed to the event's handler method.

So if your delegate has to handle calling from multiple events with different sets of calling parameters, I'd question the design - but it can be done.
Previous
Reply
Map
View

Click here to load this message in the networking platform