Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Multiple control refresh problem
Message
From
16/05/2004 05:00:34
 
 
To
15/05/2004 18:49:24
Alan Harris-Reid
Baseline Data Services
Devon, United Kingdom
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00904406
Message ID:
00904425
Views:
17

MyForm.refresh contains the code...
DODEFAULT() && calls baseclassform.refresh
other form-specific code

BaseClassForm.refresh contains the code...
DODEFAULT()
other generic form refresh code

MyForm.combo.refresh contains the code
DODEFAULT() && calls generic combo refresh code
other instance-specific refresh code


If you don't put NODEFAULT clause,
then VFP call BaseClass::Refresh automatically,
after that your Refresh code is executed.

Then, remove DODEFAULT()
MyForm.refresh contains the code...
DODEFAULT() && calls baseclassform.refresh
other form-specific code
* Next line cut VFP internal flush, and Form::Refresh is not done
* But by Design ( a bad design ), after the Init() event, 
* VFP call Refresh like a event, and on this case it 
* ignore NODEFAULT and then you have two Refresh cycles.
* In order to remove this inefficient behavior 
* you must write a code that recognizes the first Refresh call, and on baseclass execute a NODEFAULT
NODEFAULT
* Now, only for the First call VFP call a Form::Refresh

BaseClassForm.refresh contains the code...
other generic form refresh code
* Now VFP call a Form::Refresh

MyForm.combo.refresh contains the code
other instance-specific refresh code
* Now VFP call a Combobox::Refresh
Another solution is to put NODEFAULT on BaseClassForm, and call Form::Refresh explicitly.

Fabio
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform