On Tue, Oct 14, 2008 at 8:12 AM, Andy Lee <[EMAIL PROTECTED]> wrote:
> On Oct 14, 2008, at 12:45 AM, Martin Redington wrote:
>>
>> On Tue, Oct 14, 2008 at 5:25 AM, Andy Lee <[EMAIL PROTECTED]> 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 (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 [EMAIL PROTECTED]

Reply via email to