Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Access/Assign methods for OTF properties
Message
De
20/08/2012 12:50:38
James Blackburn
Qualty Design Systems, Inc.
Kuna, Idaho, États-Unis
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Divers
Thread ID:
01550780
Message ID:
01550813
Vues:
85
Take a look at aevents().

>>Bind the relevant property to the code you want to run, using BindEvent(). (BindEvent() works for properties as well as methods.)
>>
>>Tamar
>
>Didn't know that you could bind to a property. Thanks for that.
>
>If I do this:
>BINDEVENT(this.odata,'myproperty',this,'mymethod',0)
>
>I can see the value of the property before it was changed, but I can't figure out how to get the new value that was entered
>
>If I do this:
>BINDEVENT(this.odata,'myproperty',this,'mymethod',1)
>
>I can see the value of the property after it was changed, but can't figure out how to get the previous value before it was changed.
>
>
>With the _assign method, the new value is passed via a parameter which means I have access to the old value and the new value. If the new value is rejected by validation/rules, I can prevent it from being saved to the property.
>
>Of course I can utilize both the ,0 and ,1 with 2 different methods, but this doubles my work. Any thoughts on getting the previous or new values in the above scenarios from a single method?
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform