Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Bind Event to a Property
Message
From
24/07/2018 17:57:49
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
24/07/2018 10:52:16
General information
Forum:
Visual FoxPro
Category:
Object Oriented Programming
Environment versions
Visual FoxPro:
VFP 9 SP2
Miscellaneous
Thread ID:
01661333
Message ID:
01661342
Views:
60
>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
Previous
Reply
Map
View

Click here to load this message in the networking platform