Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to access\modify VFP's base classes?
Message
De
28/08/2001 21:20:31
 
 
À
28/08/2001 16:54:01
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
00550052
Message ID:
00550119
Vues:
17
>I have a ComboBox control within a form that has a lot of code in the InteractiveChange event. After user has made\changed a selection and the code has fired, the value the user has chosen has been 'wiped out' of the control.
>
>After spending a lot of time re-writing my method code without success, I entered NODEFA as first line of InteractiveChange - and never called DODEFAULT() within InteractiveChange event. The control worked fine this way (i.e., value was displayed in control).
>
>Is there any way to access the VFP ControlBox base class so I can step-through the code to find the "glitch" (or 'feature') so I can possibly change it?
>
>Thanks - Victor

There's no glitch. The native code fires *after* your code and the combobox value is set at the end of the InteractiveChange event.
Move the code to the Click or Valid event (I prefer Click), and the value is set first.
e.g., If at the top of the IAC you put
? this.value
it will show the previous value
In the Click or Valid it will show the current (expected) value.
HTH.

ps: DoDefault() is actually irrelevant in this case. The native behavior always fires, unless you issue a NoDefault as you have.
DoDefault() is used to fire parent class code if the parent class is another custom class and there is code in the subclass. Once you put a single character of code in the subclass method, the parent class method is overridden and you must use DoDefault() to get the parent's default behavior.
They are rather ill-named :)
Insanity: Doing the same thing over and over and expecting different results.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform