Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Where to place recalculation
Message
General information
Forum:
Visual FoxPro
Category:
Object Oriented Programming
Miscellaneous
Thread ID:
00407170
Message ID:
00407260
Views:
36
Thanks Alex and Barbara. Alex


>>>I need to recalculate some values every time the user changes any control in a form. Where is the best place to put the code ?
>>
>>Hola Alex,
>>
>>I would add a new method to the form (recalc?) and then call it from every one of your controls' valid event.
>>
>>That way you keep all the code in one place.
>>
>>Alex
>
>Alex and Alex < grin >
>This is a case where subclassing of your controls will simplify the work substantitally! All you'd need then would be to add a form method to handle the recalculation and then add the call to that method to textbox (and edit box etc.) base classes.
>
>If you have several forms that use the same form and textbox classes, just default the form method to 'return .t.' except in the one form that needs recalculations.
>
>HTH
>Barbara
Previous
Reply
Map
View

Click here to load this message in the networking platform