G
Guest
Hi,
I am experiencing this problem all over again:
I pass some data to a form, so the form initializes its controls with this
data. Now when the user use these controls to change data I trap the event
and change the data so it is updated whit what the user selected from GUI.
The problem is that I want to trap the control's event (be it a click or
whatever) when the user changes it from GUI and I do NOT want to trap the
event when I change the control's value programatically. Otherwise when I
change it programatically, the event will fire, it will change data
programatically, the event will fire again etc.
I sovle this problem two ways:
1. Using flags but this is messy
2. Unsubscribing before changing control's value programatically and
subscribing
after that- I like this better but there is some run-time cost involved
Is there a better way to know how a control's value gets changed?
Thanks
I am experiencing this problem all over again:
I pass some data to a form, so the form initializes its controls with this
data. Now when the user use these controls to change data I trap the event
and change the data so it is updated whit what the user selected from GUI.
The problem is that I want to trap the control's event (be it a click or
whatever) when the user changes it from GUI and I do NOT want to trap the
event when I change the control's value programatically. Otherwise when I
change it programatically, the event will fire, it will change data
programatically, the event will fire again etc.
I sovle this problem two ways:
1. Using flags but this is messy
2. Unsubscribing before changing control's value programatically and
subscribing
after that- I like this better but there is some run-time cost involved
Is there a better way to know how a control's value gets changed?
Thanks