Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Bind Event to a Property
Message
De
24/07/2018 17:57:49
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
24/07/2018 10:52:16
Information générale
Forum:
Visual FoxPro
Catégorie:
Programmation Orientée Object
Versions des environnements
Visual FoxPro:
VFP 9 SP2
Divers
Thread ID:
01661333
Message ID:
01661342
Vues:
61
>I have searched the web for examples and explanations as to binding an event to a property. From the little I have found it tells me that an event can bond, but only when the property value changes (like Assign). But the event only is fired After the change occurs. This prevents any pre-change validation, or decision to stop the change from occurring. Also, the documents indicate that an Access like binding could be done, but I have found nothing explaining how. The big question is; does anyone have a complete instructions on how set the binding up, and how to determine (and set) the value of the property in the event?
>
>Thanks

It is not true that with Assign, "the event is only fired After the change occurs". Instead, in the Assign method you could do any validation and decide whether or not apply the value to change. Typical Assign looks like:
* myProperty_Assign
lparameters m.NewValue
* Do whatever with the new value

* if decided to apply the value
this.Value = m.newValue
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform