Re: Core Data and NSTreeController Editing Problem.
Re: Core Data and NSTreeController Editing Problem.
- Subject: Re: Core Data and NSTreeController Editing Problem.
- From: Kevin Spraggs <email@hidden>
- Date: Thu, 8 Sep 2005 16:30:23 +0100
On the basis of "Praise in public..." I'd like to say thank you Matt!
I have yet to really delve into your example code, but the add to the
managed object context is
an excellent example (to this cocoa newbie) of lateral thinking that
would have taken me an age to think of.
I expect that I will be asking further questions sooner rather than
later ;-)
Cheers!
Kevin
On 6 Sep 2005, at 20:02, email@hidden wrote:
From: Matthew Holiday <email@hidden>
Subject: Re: Core Data and NSTreeController Editing Problem.
To: email@hidden
Message-ID: <email@hidden>
Content-Type: text/plain; charset=US-ASCII; delsp=yes;
format=flowed
I have a modified version of the OutlineEdit example that includes
drag-n-drop (and so has been named DragAndDropOutlineEdit) to which
I've made a small change which does exactly what you're looking for
(see -[MyDocument createNoteWithParent:]). You can find the code at:
http://homepage.mac.com/matthol2/cocoa/page2/page2.html.
Working with Core Data, outline views, and tree controllers seems to
involve a few tricks to translate between indexes in the tree
controller and outline items (which can then be translated into table
rows). I avoid using reloadData or the tree controller add/insert
methods -- I add things into the managed object context, then find
them in the tree controller, and ask the outline to select them. The
magic happens in an extension to NSTreeController (-
outlineItemForObject:).
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden