Re: bindings and sub array modification notification.
Re: bindings and sub array modification notification.
- Subject: Re: bindings and sub array modification notification.
- From: Sandro Noel <email@hidden>
- Date: Sun, 18 Jan 2009 19:53:20 -0500
Quincey, thank you for replying.
Are you saying that the "information collection view" is a
NSCollectionView which displays a subview for each information
element in the currently selected host?
information collection view displays a sub-view for every element of
the information array inside the currently selected host element.
Are you saying that the "information collection view" fails to show
an additional subview when a new information element is added, or
that an existing subview fails to update when its information is
changed, or something else?
I fails to show the new element added to the information array of the
host element.
Editing works just fine.
"Add window controller" is the controller for my sheet that displays
the fields required to create a new information element to a host
element.
and is responsible for adding the new information element to the host
element's information array.
Sorry I should of been more clear .. :s
What is an "add window controller"? If you mean it's the window
controller that has some "add" button's action method, it's
irrelevant -- it doesn't matter what *makes* the change, but what
the change is *made to* (and how).
There are basically two routes to changing an array that has a
NSArrayController bound to it:
1. Change the data model directly. Logically, this would be
[informationElements addObject: ...] (or some similar thing), but
that is not KVO-compliant, so you must instead write [[host
mutableArrayValueForKey: @"informationElements"] addObject: ...].
I think solution 1 sounds like a winner.
I'll try that.
Thank you!
Sandro Noel.
_______________________________________________
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