Qiuncey,

Solution 1 works like a charm!!!!
thank you so much !!!

that raises another question.

How could I possibly observe the changes in the information array or each host element?
or if no possible, the currently selected host...

I currently have an observer on the hosts array, and that works when the array is changed(added/deleted), but i would need to get notification when the content of a "host" is also changed.
is that possible ?

Thank you!
Sandro Noel.

On 18-Jan-09, at 7:53 PM, Sandro Noel wrote:


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 (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/sandro.noel%40mac.com

This email sent to sandro.n...@mac.com

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to