Re: [Q] What causes an NSArrayController to know that an entity was inserted via a different window?
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: Matt Neuburg <email@hidden>
- Date: Tue, 24 Feb 2009 09:00:29 -0800
- Thread-topic: [Q] What causes an NSArrayController to know that an entity was inserted via a different window?
On Tue, 24 Feb 2009 09:16:18 -0500, "Jon C. Munson II" <email@hidden>
said:
>The user adds records on one screen. On a different screen, there is an
>NSArrayController to which an NSTableView is hooked. When the records are
>added on the first screen, the tableview (on the other screen) updates
>itself automagically (AFAIK I wrote no code to facilitate that behavior). I
>have a custom view that is also on that other screen that will need to
>update itself as well to match - it isn't based on that same array
>controller however.
>
>So, my question is, how is the array controller receiving notification of
>the newly added records so that I can, hopefully, do the same with my custom
>view?
Well, it's all about bindings and KVO (key-value-observing), isn't it? I
mean, that's what they do and that's what they're for. m.
--
matt neuburg, phd = email@hidden, <http://www.tidbits.com/matt/>
A fool + a tool + an autorelease pool = cool!
AppleScript: the Definitive Guide - Second Edition!
http://www.tidbits.com/matt/default.html#applescriptthings
_______________________________________________
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