Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
InteractiveChange event way of doing things
Message
 
To
04/02/1997 13:11:52
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00019237
Message ID:
00019311
Views:
35
>I want to call a method but only if my field value is change.
>
>Right now, I was keeping the old value in a property and comparing this with the field value in the Valid() event to know if I have to call my method.
>
>I want to simplify this and use InteractiveChange() event.
>
>But, InteractiveChange() event is fire whenever the user press a key and not only when he exit the field. For example, the value is 33. So, after the first 3, the InteractiveChange() will be fire and also after the second one.

...but, if the user then type BackSpace twice, after typing 33, the value of the field will remain the same when leaving, so i think you need to know both, the value when entering and when leaving the field.

>How can I only have one call to my method without having to keep the value in a property?

If, for some reason, the prob. is adding a new property to your control, u can use the tag property to hold the value when getting the focus, and comparing it with the current value when loosing the focus, much like u already was doing, IMO. Perhaps u can include this in your base class.

Ciao,

J. Luis
J. Luis Santiago Rodríguez.• CADIS • E-mail: jlsantiago@iserve.net.mx• Ciudad de México.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform