Any suggestions anyone has are welcome, if you need more details about my
setup I'll attempt to provide them, but I still haven't figured out why the
insertion of new objects is updated in the outline view and not the table
view.

On Wed, Apr 16, 2008 at 5:48 PM, William Towe <[EMAIL PROTECTED]> wrote:

>
> I'm working on an IDE for z80 calculator programmers, and have tried to
> model some of the interface after Xcode's (where appropriate of course).  I
> have an NSOutlineView on the left hand side that mirrors the project
> directory structure (a little different than Xcode, but the same general
> idea) which is bound via bindings to an array of my file node objects.  Then
> I have an NSTableView on the right hand side that shows the files in the
> currently selected folder from the outline view and includes all the files
> within folders of that folder (just like Xcode).
>
> To achieve this I bound the table view's contentArray binding to
> controller key "selection" and model key path:
> "@unionOfArrays.allDescendantsNodes".  The allDescendantNodes method in my
> file node class returns an array with all its descendants in it as well as
> itself.  This works as I expected, all the nodes are shown belonging to the
> selected folder(s), the folder objects themselves are filtered out and if a
> single file is selected it is the only thing shown in the table view.  The
> problem arises when I insert objects into the childNodes array of the
> currently selected folder (this happens when the user imports existing files
> into the project);  the outline view updates as it should, showing the new
> items in their parent's folder, but the table view does not update.  If i
> change the selection in the outline view and then click back on the folder,
> the new files are show correctly in the table view, but I would like it show
> up without the user having to change the selection.  All the insertions are
> done with KVC compliant methods, so I'm kind of baffled.
>
> Did I miss something setting up the bindings in IB?  Or perhaps it is
> something else?  Any help is very much appreciated.
>
> -William Towe
>
_______________________________________________

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 [EMAIL PROTECTED]

Reply via email to