Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How do we know the 'Current Object' ?
Message
From
21/07/1999 19:42:42
 
 
To
19/07/1999 18:42:27
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00243011
Message ID:
00244466
Views:
21
>What's wrong with this? I mean, with This.property? The active object should be a grown up entity, capable of >taking care of itself.

when I'm a grown up entity capable of taking care of myself , I'll probably make sure all my objects can too! But while I'm still learning this OOP stuff, and undertaking a major legacy upgrade, I'll stick to what I know, where I can. Along the way I'm learning the new tricks and sometimes I can see the benefits make it worthwhile doing an immediate switch however painful the learning curve.

>There's a couple of gotchas with "_Screen.ActiveForm.ActiveControl" - first, it may be nonexistent at times (like when some object has lost focus, and another object's When is executing - so the other object's .GotFocus is still pending, and may yet not execute at all, if the .When returns .f.).

well that explains why I've been unable to use that some of the time...

>Second, the "_Screen.ActiveForm.ActiveControl" may be a container of any kind - grid, pageframe, container, button >group, or other, so you would have to drill down to find which member of the container's controls is the active >object.

yes, thats the problem I found. Unless you're using a 'plain' form, the 'activeform.activecontrol' aint much use...

>You were warned :).

duly noted!

Thanks

Harry
Previous
Reply
Map
View

Click here to load this message in the networking platform