How to cancel a view-initiated update (model vs view out of sync)
How to cancel a view-initiated update (model vs view out of sync)
- Subject: How to cancel a view-initiated update (model vs view out of sync)
- From: Mark Munte <email@hidden>
- Date: Fri, 28 Apr 2006 10:50:39 +0200
Hello,
I have the following problem with view initiated bindings:
-the user has a ckeckbox to enable some application feature on a view
-the checkbox is bound to the model, say to a "(BOOL)enabled" and (void)setEnabled:(BOOL)value" through the "value" binding
Now, when the user presses the checkbox, my model is getting the message and atempting to enable the requested feature (in my case, configuring a sequence grabber video channel), BUT, the request might fail, in wich case I neeed to cancel the update.
The problem here, is that in the end, the view (GUI) and the model are out of sync since the view does not get informed that the requested model update was canceled/failed: on the view, the the checkbox appears checked, but the model has the value set to FALSE.
How can I force the view to refresh?
I tried all sorts of things but nothing worked.
Regards, Mark
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden