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: Daniel Jalkut <email@hidden>
- Date: Mon, 05 Dec 2005 14:27:26 -0500
If you think about how bindings work, it would be very difficult for
them to avoid updating UI items when they were hidden. The problem is
this: if you don't update it now (when the value has actually
changed), when do you update it? It would be a shame to have a bunch
of controls off-screen and then when they're made visible they either
no longer have valid values or all have to manually update from the
model.
Since the "pushing to the UI" component is based on key-value
observing, there's really no other time to be notified of the change
than when the change occurs. If you wanted to avoid this for some
reason I suppose you could manually unbind all the controls while
they are hidden and then rebind them when they become visible.
Daniel
On Dec 5, 2005, at 2:20 PM, 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?
_______________________________________________
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