Hi Nick, et al:

Well, I did use [self selectedRow], in a previous version of the code. but that also returned -1. I don't think I'm doing anything 'weird', the view has a delegate and a datasource which are in the same class connected in the xib. The awakeFroNib message populates the list. There are currently two parents (expandable) and a bunch of children in each. Things are populated corrected. My selection change notification is firing, so why wouldn't that cause _lastRowSelected (in the NSTableView member of the NSOutlineView, which I am assuming (and we all know what assume means) is the member that contains the currently selected row) be changed to reflect the currently selected row.

Has to be something staring me in the face, but I can't see it...

John
On 14-Sep-08, at 6:25 PM, Nick Zitzmann wrote:


On Sep 14, 2008, at 9:58 AM, John Cebasek wrote:

I've got an NSOutlineView and am trying to determine which row is selected. I thought [super selectedRow]; (calling NSTableView's selectedRow method) would do the trick, but all I'm getting back from that call is -1.

How does one determine which row is selected in an outline view?


In this scenario, you shouldn't invoke the superclass unless you are overriding the method. If the outline view is "self", then call [self selectedRow] instead.

Nick Zitzmann
<http://www.chronosnet.com/>


_______________________________________________

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