Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Eliminating multiple refresh()
Message
From
29/04/2002 02:29:18
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
29/04/2002 01:32:51
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00650236
Message ID:
00650247
Views:
20
>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
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform