Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
BINDEVENT() (and related) - best placement of code?
Message
From
24/04/2003 17:57:28
Joel Leach
Memorial Business Systems, Inc.
Tennessee, United States
 
 
To
24/04/2003 17:02:25
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00781200
Message ID:
00781319
Views:
14
>Well in the Init() I envision BINDing events on a "permanent" basis. That is, for the duration of the app.
>
>But I'm imagining that there will (now, that we *can*) be times when one might want to change the BINDed events on-the-fly dependent on conditions. I'm looking for ideas to kind of 'centralize' such BINDing and UNBINDing. The best I can come up with is an aptly named method that does only that and I've gotta believe there's a better way.
>

Yeah, I see what you mean. You could put all of the intelligence in a BindEvents() method, but it could get pretty hefty. You could also create an event handler object, so that other objects could raise and bind to its events. That might be more flexible, but would leave the binding code decentralized.

>No, because that seems to be wrong. It can be made to act that way though, using BINDEVENT() flags.
>RAISEEVENT() seems to be nothing more or less that a different way to do a method call in another format. It has no relationship to a previously issued BINDEVENT(). The docs imply that there is something different (it uses the Activate event for its example) but it doesn't say what is actually different and I didn't get an answer when I asked about that.
>
>Does that muddy things up? < s >
>

Definitely. <g> If that is the case, I don't see many uses for RaiseEvent() either.
Joel Leach
Microsoft Certified Professional
Blog: http://www.joelleach.net
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform