Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Scope of aEvents()
Message
From
28/11/2012 12:38:10
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Title:
Scope of aEvents()
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows Server 2003
Database:
MS SQL Server
Miscellaneous
Thread ID:
01558262
Message ID:
01558262
Views:
241
Something surprised me today... here's the scenario:

I have a container with an image and a label, both bindevent(this, "click", container, "onclick"). Now in one instance of such a button-like container's .onClick() I call some other code. As the code that I call may be called from a bound event, there's a call to aEvents() to see who called.

And to my surprise, it was the label. IOW, it seems that aEvents() catches anything up the stack that's a bound event, not only the intermediate caller. Which is OK, can be coded around, it's just one of those quirks that wish I knew before. So I felt like sharing the information.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Reply
Map
View

Click here to load this message in the networking platform