Core Data and NSTreeController Editing Problem.
Core Data and NSTreeController Editing Problem.
- Subject: Core Data and NSTreeController Editing Problem.
- From: Kevin Spraggs <email@hidden>
- Date: Tue, 6 Sep 2005 10:41:55 -0400
Hello chaps!
Firstly, I have to admit that I am a newbie to the whole Apple/Obj-C/C++
development, my fifteen-odd years of programming has been using proprietary
languages and systems in telecommunications. So please forgive my ignorance
and any confusion on my part.
I have been looking at the very impressive Core Data and Cocoa BIndings
technologies, namely the Apple example for the OutlineView using
NSTreeController (/Developer/Examples/CoreData/OutlineEdit). What has me
completely flummoxed is trying to trigger editing of any new item added
immediately, just as you can do with manually constructed OutlineViews by
using the editColumn:row:withEvent:select: method. That is, having any
default text selected and editing mode entered so that the user can replace
the default value by what ever they type in, similar behavior to that when
adding a new folder on the Desktop . I have not been able to achieve this
to date in the Apple example, even after extensive trawling of the internet
and experimentation. It seems that the obvious choice would be making use
of the editColumn:row:withEvent:select: method after calling the add:
method, but it seems that NSTreeController's add: method performs something
to stop the editing before the user has had a chance to type anything. (I
assume that it triggers a reloadData of the outlineView.) Another problem
seems to be if I manually trigger the reloadData myself followed by the
selectedRow method, this is not the new row, but the pevious, even though
the outlineView does change the selected row to the new one.
So my question is: Is it possible to do this, and if so, does anyone have
some simple example code to guide me in how to do this in the context of
the original Apple example? (An idiot's guide would be nice ;-)
Thank you all in advance,
Kevin
"Some people have a train of thought. I, however, have a tricycle."
_______________________________________________
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