Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
BINDEVENT() (and related) - best placement of code?
Message
From
26/04/2003 19:24:32
 
 
To
25/04/2003 10:02:06
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00781200
Message ID:
00781892
Views:
19
>>>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.
>>
>>By outside of classes do you mean in a procedural PRG? In this context, every line of application code should be in a class.
>
>Sorry, no, I mean outside VCXs or actual class code. In other words, I mean that BINDEVENT() should only be coded in method/event code of instantiated objects.

Not necessarily, Jim. Imagine a control that has code in, say, Init to bind some of its methods to the containing form or other container. I sat in a session Drew gave today at EssentialFox where he showed that using BindEvents(), and one whole group of examples included control classes which bound certain events to form-level stuff. The obvious is a custom resize method that binds itself to the form.resize.

Tamar
Previous
Reply
Map
View

Click here to load this message in the networking platform