Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Lets go for less than 26 seconds on this one...
Message
De
14/04/1999 12:07:47
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00208214
Message ID:
00208235
Vues:
23
It's a long story. It was considerd in VFP3 days that Valid/When are FP2 leftovers and will be dropped soon. It did not happen, but there were still some instabilities in firing Valid event (I hope this point will not fire some personal flares and long threads now :-). So, I took habit to use LostFocus consistently. You know, VFP is really rich, and it's helpful (or even necessary) to stick to particular way of doing things.

>Hi Ed,
>
>Why do you prefer to use LostFocus event instead of Valid?
>
>>The first thing is that, presonally, I use LostFocus and never Valid.
>>In regard to your problem: there are few ways. For example:
>>
>>***Textbox.InteractiveChange event
>>This.tag="A"
>>***Textbox.LostFocus event
>>IF Empty(This.Tag)
>> Return
>>Endif
>>This.Tag=""
>>** run your code here
>>
>>
>>
>>>Hmmm... Let me step back a step then, maybe there is another way than a custom property...
>>>
>>>What I really want to do is to run some code in my valid event if the user has changed the value of the text box. (Basically, it does a lookup into another table and fills fields based off the current ssn.) But if the user doesn't make a change to the ssn, I would rather not run the code.
>>>
>>>So, what is the best way to tell if a user has changed the value of a text box during the valid event?
>>>
>>>>>Arrgh. Slightly more than a minute. Oh well.
>>>>>
>>>>>So the only way to do it is to add a custom class? Yech.
>>>>>
>>>>>Would it work if I put in the form's init method a call to the text box's addproperty method?
>>>>
>>>>It's supposed to work in VFP6 (basically I'm still with VFP5), but the normal OO design (IMHO) does not like it.
Edward Pikman
Independent Consultant
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform