>>Whenever a container has code in it's REFRESH(), all the controls in it get REFRESH()ed twice. Once during the DODEFAULT() in the Container.REFRESH() code and again when the Container.REFRESH() ends. Which means that a textbox in a container in a container in a form gets REFRESH()ed 8 times if the Form.REFRESH() has code and each of the containers have code.
>>
>>I'm looking for a way to eliminate the redundant REFRESH()es.
>>
>>I'm thinking of putting a test in the base classes of all controls that determines if it was called with DODEFAULT() or not, and if so NODEFAULT.
>>This means I have to figure out how to determine if DODEFAULT() called it.
>>Any ideas?
>>
>>Or maybe a better way to eliminate the duplicate REFRESH()ing?
>>
>>TIA
>
>Bill,
>All built_in events do their default implicitly at the end of the code unless no nodefault. IOW the last line of code for them is an implicit dodefault(). Simply remove your dodefault(). Or if you really need it than include a nodefault to prevent the implicit.
>When I code I almost never code anything in refresh event.
>Cetin
Hi Cetin,
As it turns out, I had a redundant DODEFAULT() in my base classes. When I originally set up my base classes, I thought I needed a DODEFAULT() if I wanted the default action to occur. I just got around to re-visiting those classes and discovered the duplication.
Thanks for helping me find it.
Bill Morris