Binding of invisible controls: is lazy data loading possible?
Binding of invisible controls: is lazy data loading possible?
- Subject: Binding of invisible controls: is lazy data loading possible?
- From: "Vitaly Ovchinnikov" <email@hidden>
- Date: Mon, 19 Jan 2009 23:11:01 +0300
Hello all,
I have a grid, array controller and a property of document that
returns array. Grid is bound to controller, controller uses property
as -contentArray. All works fine, but grid asks for data even if it is
not visible. The problem is that document's property performs a lot of
work to compute the data it returns, so I want to call it only if I
really need this data.
I cache those data, but when I change something that affects them, I
need to reset the cache. And to let everyone know that something
changed, I call -will/didChangeValueForKey for my property. And
controller immediately call this property even if grid is not visible.
And I have to do a lot of unnecessary work again.
Is there a TRUE Cocoa-way to force grid or controller to ask for data
only when they are really needed? I can remove bindings and do all
manually, but I still believe in a better and easier way.
Any ideas?
Thank you.
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden