General information
Category:
Coding, syntax & commands
>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
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only