intercepting NSBrowser multiple selection extension with shift down/up arrow
intercepting NSBrowser multiple selection extension with shift down/up arrow
- Subject: intercepting NSBrowser multiple selection extension with shift down/up arrow
- From: "Martin Redington" <email@hidden>
- Date: Tue, 14 Oct 2008 04:16:02 +0100
I've got an NSBrowser, and a secondary view whose value depends on the
current selection in the NSBrowser.
When only one item is selected, the secondary view shows the path of
the selected item. When multiple items are selected, the secondary
view should show nothing.
I've set up a notification, that gets posted (currently) from
-[NSMatrix selectCellAtRow:column:]
-[NSMatrix mouseDown:]
-[NSMatrix selectAll:]
The observer for the notification updates the secondary view.
I seem to be capturing everything so far, except for the case where
the selection is extended by holding down shift and the up or down
arrow key. Can anyone point me to a suitable method to hopefully
overide as follows:
- (void) someMethod:(id)someArg
{
[super someMethod:someArg];
NSBrowser *browser = [self someMethodThatReturnsTheBrowser];
[[NSNotificationCenter defaultCenter]
postNotificationName:kMyBrowserSelectionWillChangeNotification
object:browser];
}
I've tried
-[NSMatrix setSelectionFrom:to:anchor:highlight:]
and most of the other likely candidates, but they didn't seem to work.
cheers,
Martin
--
http://www.mildmanneredindustries.com/
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden