On Sep 24, 2009, at 8:12 PM, Jens Alfke wrote:


On Sep 24, 2009, at 5:07 PM, John McIntosh wrote:

I assumed that I could send the same deselectAll message in either an
awakeFromNib function or applicationDidFinishLaunching. However,
neither of these clears the selection.

Make sure you've checked the table's "Empty" checkbox (allow empty selection) in the nib. Also, if there's a controller bound to the table, uncheck its "Avoid empty selection" checkbox.

Some additional information to what Jens said:

"action" based methods, like the user selecting a row, -deselectAll: and -selectAll:, respect the "allows empty selection" setting and will keep an item selected if turned off and if possible.

Programmer methods will override that behavior. So, if you call [table selectRowIndexes:[NSIndexSet indexSet] byExtendingSelection:NO], you should still be able to get an empty selection.

corbin


_______________________________________________

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 arch...@mail-archive.com

Reply via email to