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

2009-02-24 Thread I. Savant
On Tue, Feb 24, 2009 at 9:16 AM, Jon C. Munson II wrote: > 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 automa

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

2009-02-24 Thread Jon C. Munson II
> > > 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? > > It's done by having the array controller observe (via KVO, using the > Bindings mechanism) the managed object contex

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

2009-02-24 Thread mmalc Crawford
On Feb 24, 2009, at 7:48 AM, Jon C. Munson II wrote: I'm NOT one of those people who learn well from reading technical documentation, It is truly obnoxious, then, and unhelpful to others, to continue to make assertions that various issues are not covered in the documentation when they v

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

2009-02-24 Thread Matt Neuburg
On Tue, 24 Feb 2009 09:16:18 -0500, "Jon C. Munson II" 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 automag

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

2009-02-24 Thread I. Savant
On Tue, Feb 24, 2009 at 10:48 AM, Jon C. Munson II wrote: > [Jon C. Munson II] With regards to the dox, and I'm not being grumpy or > "short" when saying this, if, situationally speaking, these things were > *explicitly* explained (and not just "conceptually" explained), I'd probably > have a bet

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

2009-02-24 Thread Jacob Evans
On Feb 24, 2009, at 8:48 AM, Jon C. Munson II wrote: This is why Hillegass' book was extremely useful to me as I could see the concepts put into practice. Jon, like I.S. mentioned, it seems you need to get a better grasp on KVC/KVO concepts. Perhaps a re-read of Chapter 7 of Hillegass' "Coc

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

2009-02-24 Thread Jon C. Munson II
> > > > [[NSNotificationCenter defaultCenter] addObserver:self > > selector:@selector(managedObjectContextUpdatedNotification:) > > name:NSManagedObjectContextObjectsDidChangeNotification > > object:[self managedObjectContext]]; > > [Jon C. Munson II] This is the method I ended up impl

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

2009-02-24 Thread mmalc Crawford
On Feb 24, 2009, at 12:37 PM, Jon C. Munson II wrote: I do have one question, an answer to which I could not readily find in the dox. [...] So, my question is, what is the preferred/best method to access the property list to return the name of the entity that had an insertion, update, or

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

2009-02-24 Thread Michael Ash
On Tue, Feb 24, 2009 at 3:37 PM, Jon C. Munson II wrote: > In the method, > -(void)managedObjectContextUpdatedNotification:(NSNotification *)notif, the > notif contains userInfo.  [userInfo valueForKey:] returns an NSSet.  This > set has a -description, which returns a string formatted as a proper

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

2009-02-25 Thread Jon C. Munson II
M > To: cocoa-dev > Subject: Re: [Q] What causes an NSArrayController to know that an entity > was inserted via a different window? > > On Tue, Feb 24, 2009 at 3:37 PM, Jon C. Munson II wrote: > > In the method, > > -(void)managedObjectContextUpdatedNotification:

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

2009-02-25 Thread I. Savant
On Wed, Feb 25, 2009 at 9:43 AM, Jon C. Munson II 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/Co

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

2009-02-25 Thread Jon C. Munson II
; 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 wrote: > > > While it would be nice to actually see if a certain attribute got >