Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
BINDEVENT() (and related) - best placement of code?
Message
From
24/04/2003 13:06:01
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Other
Title:
BINDEVENT() (and related) - best placement of code?
Miscellaneous
Thread ID:
00781200
Message ID:
00781200
Views:
51
The new event binding features look like they will be very useful.
After a little bit of playing with them in dinky tests I think I understand how they operate and when I might use them.
The big outstanding question that I have is: Where should they be coded?... Is there some optimal place(s) to put the code to make their existence/usage evident to future code readers? I can see usage being worse than "spaghetti code" if I am not careful about it.

My answer to when it should be useful is: in the general case, outside of classes, with perhaps some empty methods coded within classes to facilitate usage of BINDEVENT() externally. And I don't think that RAISEEVENT() has any place within class code at all. Does this make sense or is it cutting off valuable potential uses?

But I can't settle on a good answer for where the code should go, and maybe there is no ideal place.
I'm inclined to say that Form Init() is the logical place for BINDEVENT() code. But what of the case where one might want to dynamically BIND/UNBIND an event? Should there be some 'standard' for such usage, and if so, where?

Opinions?
Next
Reply
Map
View

Click here to load this message in the networking platform