Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Remove something from a parent class
Message
From
13/10/2006 11:03:54
Dragan Nedeljkovich
Now officially retired
Zrenjanin, Serbia
 
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Environment versions
Visual FoxPro:
VFP 9 SP1
Miscellaneous
Thread ID:
01161714
Message ID:
01161769
Views:
15
>Dragan,
>
>Giving them an "off-screen" postion via .Left or .Top is not good because they are still in the UI event loop, ie those controls can get focus and absorb keypresses. Setting it .Visible = .f. will remove it from the UI event loop.

Right... I thought of that, but .SendMessageToUT() fires earlier than that in the regular event loop :). Such a control would have to be disabled, or .tabstop=.f. or to return .f. from its .when() - it needs to be not just out of the picture, but out of the loop as well.

Having to remove a control in such a way is a kludge per se to start with. Any other trouble just naturally follows from that :).

I think I had only one such case where I couldn't rework the class and had to remove an object - and it was a page. Setting it to disabled, invisible or whatever worked only partially: it would be just disabled, but wouldn't go away. Returning .f. from its .init() was the only way. I was just lucky that the page was coded as optional, i.e. not referenced in any way elsewhere, so no bad thing happened.

back to same old

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

Click here to load this message in the networking platform