• 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
Re: intercepting NSBrowser multiple selection extension with shift down/up arrow
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: intercepting NSBrowser multiple selection extension with shift down/up arrow


  • Subject: Re: intercepting NSBrowser multiple selection extension with shift down/up arrow
  • From: "Martin Redington" <email@hidden>
  • Date: Tue, 14 Oct 2008 13:11:29 +0100

On Tue, Oct 14, 2008 at 8:12 AM, Andy Lee <email@hidden> wrote:
> On Oct 14, 2008, at 12:45 AM, Martin Redington wrote:
>>
>> On Tue, Oct 14, 2008 at 5:25 AM, Andy Lee <email@hidden> wrote:
>>>
>>> How about if you leave the matrix class alone and do [myBrowser
>>> setSendsActionOnArrowKeys:YES]?  Then give the browser a target and
>>> action,
>>> and in the action method do whatever you have to do.
>>
>> That sounds promising, although a bit disappointing and possibly still
>> a tiny bit hacky.
>
> It works for me.

Me too :-) with a couple of exceptions ... see below ...

> I did a quick test and it caught all the cases I tried,
> though I may have missed something.

I managed to remove all of my other notification posts, apart from

selectAll:

I also found that when modifying the selection programmatically, I
needed to post the notification manually, so a more general mechanism
than I require would need to post from at least a subset of the
selectXXX: methods.

> If it helps with the ick factor, I
> would say that it's much less hacky to take advantage of one method's
> documented purpose -- "do something when the selection changes, even if it's
> via keyboard" -- than to do trivial overrides of multiple methods that you
> select by trial and error.

Fair comment, although the documentation for setSendsActionOnArrowKeys
doesn't really state that explicitly - it probably wouldn't have
occurred to me to try that for a long time.

>> Surely it shouldn't really be that hard to capture/intercept selection
>> changes - to have to resort to trial and error over-riding of
>> selectXXX, et al. methods is a bit irksome.
>
> I agree, it seems a weird omission, given that with NSTableView you have a
> choice of using either a delegate method or a notification for that very
> purpose.
>
> --Andy
>



--
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>
References: 
 >intercepting NSBrowser multiple selection extension with shift down/up arrow (From: "Martin Redington" <email@hidden>)
 >Re: intercepting NSBrowser multiple selection extension with shift down/up arrow (From: Andy Lee <email@hidden>)
 >Re: intercepting NSBrowser multiple selection extension with shift down/up arrow (From: "Martin Redington" <email@hidden>)
 >Re: intercepting NSBrowser multiple selection extension with shift down/up arrow (From: Andy Lee <email@hidden>)

  • Prev by Date: Re: [Obj-C Compiler Bug?] Two different classes declaring a message with the same name - compiler warning
  • Next by Date: Re: +(NSSet *)keyPathsForValuesAffectingValueForKey:
  • Previous by thread: Re: intercepting NSBrowser multiple selection extension with shift down/up arrow
  • Next by thread: Re: intercepting NSBrowser multiple selection extension with shift down/up arrow
  • Index(es):
    • Date
    • Thread