• 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: [Q] What causes an NSArrayController to know that an entity was inserted via a different window?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [Q] What causes an NSArrayController to know that an entity was inserted via a different window?


  • Subject: RE: [Q] What causes an NSArrayController to know that an entity was inserted via a different window?
  • From: "Jon C. Munson II" <email@hidden>
  • Date: Wed, 25 Feb 2009 10:38:18 -0500
  • Organization: JTA Enterprises LLC

Thanks for that, I will take a look at it, and study it, and study it some
more...

Peace, Love, and Light,

/s/ Jon C. Munson II

> -----Original Message-----
> From: I. Savant [mailto:email@hidden]
> Sent: Wednesday, February 25, 2009 10:36 AM
> To: email@hidden
> Cc: cocoa-dev
> Subject: Re: [Q] What causes an NSArrayController to know that an entity
> was inserted via a different window?
>
> On Wed, Feb 25, 2009 at 9:43 AM, Jon C. Munson II <email@hidden> wrote:
>
> > While it would be nice to actually see if a certain attribute got
> updated
>
>   This is where a thorough understanding of KVC/KVO (with emphasis on
> the KVO part) comes in. I'll point you to mmalc's examples:
>
> http://homepage.mac.com/mmalc/CocoaExamples/controllers.html
>
>   Check out the Graphics Bindings example. There may be other examples
> that highlight what I'm about to mention, but I'm not really familiar
> - the Graphics Bindings example was what really helped to seal my
> understanding (after many, many hours of studying / experimenting with
> ALL the relevant documentation).
>
>   The thing to pay attention to is that, in this example, you have a
> custom array controller subclass which does special things on certain
> events (a key to your understanding), as well as a couple of custom
> views.
>
>   The real meat is in the view classes. Specifically to your case, the
> GraphicsView class. Note how -bind:... is overridden and calls
> -startObservingGraphics: (and -unbind:... calls
> -stopObservingGraphics:). This is crucial because it shows how a view
> that's interested in the *properties* of the objects fed to it via
> bindings manages to observe specific *properties* of each bound
> object.
>
>   That is, it specifically registers interest in the properties of
> each of the objects in its purview, and unregisters interest when the
> object is no longer in its purview.
>
>   The -bind: method is called from the MyDocument class, so you can
> see that the @"shadowAngle" and @"shadowOffset" key paths are observed
> for each graphic object.
>
> --
> I.S.

_______________________________________________

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

References: 
 >[Q] What causes an NSArrayController to know that an entity was inserted via a different window? (From: "Jon C. Munson II" <email@hidden>)
 >Re: [Q] What causes an NSArrayController to know that an entity was inserted via a different window? (From: "I. Savant" <email@hidden>)
 >RE: [Q] What causes an NSArrayController to know that an entity was inserted via a different window? (From: "Jon C. Munson II" <email@hidden>)
 >Re: [Q] What causes an NSArrayController to know that an entity was inserted via a different window? (From: "I. Savant" <email@hidden>)
 >RE: [Q] What causes an NSArrayController to know that an entity was inserted via a different window? (From: "Jon C. Munson II" <email@hidden>)
 >Re: [Q] What causes an NSArrayController to know that an entity was inserted via a different window? (From: Michael Ash <email@hidden>)
 >RE: [Q] What causes an NSArrayController to know that an entity was inserted via a different window? (From: "Jon C. Munson II" <email@hidden>)
 >Re: [Q] What causes an NSArrayController to know that an entity was inserted via a different window? (From: "I. Savant" <email@hidden>)

  • Prev by Date: Running Cocoa applications from file servers
  • Next by Date: Re: Stop edit session with a NSTextField
  • Previous by thread: Re: [Q] What causes an NSArrayController to know that an entity was inserted via a different window?
  • Next by thread: Re: [Q] What causes an NSArrayController to know that an entity was inserted via a different window?
  • Index(es):
    • Date
    • Thread