• 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
Re: NSArrayController vs. fetch
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSArrayController vs. fetch


  • Subject: Re: NSArrayController vs. fetch
  • From: mmalc crawford <email@hidden>
  • Date: Sat, 7 Oct 2006 22:14:17 -0700


On Oct 7, 2006, at 9:06 PM, Chris Hanson wrote:

What I would probably do in your situation is add support to the drawing view for bindings, and bind it to the appropriate key in my array controller.

Ah, beat me to it  :-)

For an example, see Graphics Bindings at
	<http://homepage.mac.com/mmalc/CocoaExamples/controllers.html>


For performance, I would probably cache the information that the view receives in its observer notifications, so I don't need to either issue fetches or access the bound controller from within my view's -drawRect: implementation.
What all this would get me is the ability to completely decouple my view/drawing code from my model and controller code.


... and specifically in this case it would mean you don't have to do this:

On Oct 7, 2006, at 3:37 PM, Matteo Rossi wrote:

But I've found that the correct way is to invoke [moc processPendingChanges].

This is in general probably not the correct way to achieve what you want.

mmalc

_______________________________________________
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


References: 
 >NSArrayController vs. fetch (From: Matteo Rossi <email@hidden>)
 >Re: NSArrayController vs. fetch (From: mmalc crawford <email@hidden>)
 >Re: NSArrayController vs. fetch (From: Matteo Rossi <email@hidden>)
 >Re: NSArrayController vs. fetch (From: mmalc crawford <email@hidden>)
 >Re: NSArrayController vs. fetch (From: Matteo Rossi <email@hidden>)
 >Re: NSArrayController vs. fetch (From: Chris Hanson <email@hidden>)

  • Prev by Date: Re: NSArrayController vs. fetch
  • Next by Date: editor framework
  • Previous by thread: Re: NSArrayController vs. fetch
  • Next by thread: [NSViewAnimation BUG] NSAnimationEaseOut
  • Index(es):
    • Date
    • Thread