Re: Opening column for edit after adding to tree controller?

2008-06-03 Thread Rick Mann
On May 31, 2008, at 14:39:29, Rick Mann wrote: I am targeting Leopard (for now, at least). However, -rowForItem:, and for that matter, -itemForRow: both return null, even if I fetch first. ARGGHHHit works very well (thanks, j o a r!). I failed to connect my view outlet, like a

Re: Opening column for edit after adding to tree controller?

2008-06-03 Thread Rick Mann
On Jun 3, 2008, at 20:15:45, Rick Mann wrote: ARGGHHHit works very well (thanks, j o a r!). I failed to connect my view outlet, like a total n00b. Oh wait, that's what I am. AGH, again. It still doesn't work, but now itemForRow always returns -1. -- Rick

Re: Opening column for edit after adding to tree controller?

2008-05-31 Thread I. Savant
On May 31, 2008, at 4:27 AM, Rick Mann wrote: After adding a new entity to my tree controller, how can I programmatically open the first column (a text cell) Again, this is confusing - entity is not the same as instance. Also, I assume by 'column' you mean that of a table view or outline

Re: Opening column for edit after adding to tree controller?

2008-05-31 Thread Rick Mann
On May 31, 2008, at 07:34:30, I. Savant wrote: NSTableView and NSOutlineView have a method - editColumn:row:withEvent:select: ... Make sure your tree controller has fetched and rearranged its objects (and if your view is an outline view, the corresponding item for your new instance is

Re: Opening column for edit after adding to tree controller?

2008-05-31 Thread I. Savant
The problem is, I don't know how to determine to which row that newly-added object corresponds in the table view. If you're targeting Leopard, you can force the tree controller to - fetch: (so it's updated) then I believe you can ask the outline view for its -rowForItem: ... if you're

Re: Opening column for edit after adding to tree controller?

2008-05-31 Thread Jonathan Dann
The problem is, I don't know how to determine to which row that newly-added object corresponds in the table view. Is there any way? I suppose it's the current-selected row, since it's set up to select on add. Is there a more elegant way to find out, though (i.e., what if adding didn't

Re: Opening column for edit after adding to tree controller?

2008-05-31 Thread Rick Mann
On May 31, 2008, at 13:31:10, I. Savant wrote: That's one way, so long as you force a fetch first. So, I'm not really sure what fetch does. In my case, I either a new document or one that was opened, and the instances are all loaded and managed by the tree controller, and the UI is in

Re: Opening column for edit after adding to tree controller?

2008-05-31 Thread Rick Mann
On May 31, 2008, at 13:31:10, I. Savant wrote: If you're targeting Leopard, you can force the tree controller to - fetch: (so it's updated) then I believe you can ask the outline view for its -rowForItem: ... if you're targeting Tiger, it's not as straightforward due to proxy objects.