• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Binding of invisible controls: is lazy data loading possible?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: Binding of invisible controls: is lazy data loading possible?
      • From: Quincey Morris <email@hidden>
  • Prev by Date: Re: mergeChangesFromContextDidSaveNotification effects
  • Next by Date: Re: [NOOB] Finding Information (was: real noob question)
  • Previous by thread: Re: "Cocoa Fundamentals Guide" Clarification
  • Next by thread: Re: Binding of invisible controls: is lazy data loading possible?
  • Index(es):
    • Date
    • Thread