• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
intercepting NSBrowser multiple selection extension with shift down/up arrow
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: intercepting NSBrowser multiple selection extension with shift down/up arrow
      • From: Andy Lee <email@hidden>
  • Prev by Date: Re: NSCollectionView - getting notified of selection change?
  • Next by Date: Re: how to check whether the application is running?
  • Previous by thread: Re: how to check whether the application is running?
  • Next by thread: Re: intercepting NSBrowser multiple selection extension with shift down/up arrow
  • Index(es):
    • Date
    • Thread