Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > Help request: complex control of editing cells in outline view

Help request: complex control of editing cells in outline view
Thread Tools
Mac Enthusiast
Join Date: Sep 2000
Location: Vermont, USA
Status: Offline
Reply With Quote
May 5, 2003, 11:24 AM
 
Hi,

I searched the archives and documentation and got some good ideas, but I can't figure out where to go next.

The following is in regards to an outline view:
What I want to do is make it so that when the user presses the tab key the next cell in a row gets edited until the last cell in a row is being edited (this is the default behavior), THEN I want the tab key to start editing a cell one level down in an outline view. If the user is editing a child in the outline and tabs all the way over and there are no more rows below, except for a parent, then the editing stops.

I over-rode textDidEndEditing in my subclassed outline view and used the dictionary hacks (http://lists.apple.com/archives/coco...tablev.001.txt) to make it so that hitting return ends editing instead of editing the next cell down.

My guess is that I have to call NSCell's - (void) editWithFrame: (NSRect) aRect inView: (NSView *) controlView editor: (NSText *) textObj delegate: (id) anObject event: (NSEvent *) theEvent method in my textDidEndEditing method in my sub-classed outline, but I don't know what to pass it for the arguments.

Thanks in advance,
Ian
     
Mac Elite
Join Date: Feb 2001
Location: Vancouver, WA
Status: Offline
Reply With Quote
May 5, 2003, 02:56 PM
 
Close but not quite. Actually, you'll want to call NSTableView's -editColumn:row:withEvent:select:. (Remember, NSOutlineView is a subclass of NSTableView.) You'll probably want to pass nil as the event.

See OAExtendedOutlineView in our open-source OmniAppKit framework for a handful of examples of programmatically invoking a cell editor.
Rick Roe
icons.cx | weblog
     
Mac Enthusiast
Join Date: Sep 2000
Location: Vermont, USA
Status: Offline
Reply With Quote
May 5, 2003, 03:23 PM
 
Thanks for helping out Rickster, you do a great job!
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 03:29 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2