Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Editing NSTableViews



I was implementing an NSTableView, and I needed a button to add an entry to the table and set it up to be edited.

So I found the method

[categoryTable editColumn:1 row:newRow withEvent:nil select:YES];

And I went about using it. Then I got an error:

Invalid parameter not satisfying: _lastSelectedRow == row

Interesting. So I changed my code to:

[categoryTable selectRow:newRow byExtendingSelection:NO];
[categoryTable editColumn:1 row:newRow withEvent:nil select:YES];

And it works fine. It wasn't that hard to figure out, but:
1) I couldn't find an answer in the mailing list archive, so I wanted to put one there
2) Why doesn't the method just select the row by itself? Why do I need to do that for it?

Seth A. Roby The Amazing Llama < mail or AIM me at tallama at mac dot com>
"Life is like an exploded clown. It's really funny until you figure out what just happened."
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.


Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.