Re: Do bindings "pay attention" to visibility of control?
Re: Do bindings "pay attention" to visibility of control?
- Subject: Re: Do bindings "pay attention" to visibility of control?
- From: Ondra Cada <email@hidden>
- Date: Mon, 5 Dec 2005 20:42:01 +0100
Andrei,
On 5.12.2005, at 20:20, Andrei Tchijov wrote:
For example, in my application I have Tabless NSTabView with each
tab holding "details" view for different kind of object from
"master" list of objects. Obviously, only one tab is visible at a
time. And more importantly, only bindings from currently visible
tab "make sense" for currently selected object from "master" list.
Will bindings try to keep fields from "invisible" tabs up to date
or not?
No, they don't (it would be pretty difficult and error-prone to do
that -- the values would have to be cached in case the hidden UI gets
shown before the model changes again. Ick!).
In a majority of cases you can just make the bindings try, without
raising exceptions: they would silently fail for "nonsense at the
moment" items, and the app would work all right. Or, you can make a
few categories with "default" values added this way to objects which
do not have them :)
---
Ondra Čada
OCSoftware: email@hidden
http://www.ocs.cz
private email@hidden
http://www.ocs.cz/oc
_______________________________________________
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