• 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: Bypassing inter-cell navigation for NSButtonCell in NSOutlineView
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Bypassing inter-cell navigation for NSButtonCell in NSOutlineView


  • Subject: Re: Bypassing inter-cell navigation for NSButtonCell in NSOutlineView
  • From: Nicholas Riley <email@hidden>
  • Date: Sun, 2 Mar 2008 19:42:53 -0600
  • Resent-date: Sun, 2 Mar 2008 19:43:09 -0600
  • Resent-from: Nicholas Riley <email@hidden>
  • Resent-message-id: <email@hidden>
  • Resent-to: email@hidden

On Sun, Mar 02, 2008 at 04:24:04PM +0100, Tommy Nordgren wrote:
> >>- Back tabbing into a table will select the last focusable cell.
> >
> >and I can't figure out how to stop that from happening.
> >
> >Help?
> >
> 	You probably need to modify your keyDown: method to intercept
> backtabs as well

My tab order looks like this:

   outline view - button - button - ...

so the first button is focused when I press shift-Tab and focus
transfers to the outline view's NSButtonCell.

On Sun, Mar 02, 2008 at 01:36:01PM -0600, Ricky Sharp wrote:
> >>- Hitting Space will attempt to 'performClick:' on a NSButtonCell
> >>in the selected row, if there is only one instance in that row.
> >
> >So far, so good.
> >
> >>- Tabbing again focuses the first "focusable" (1) cell, if there is
> >>one.
> >
> >I don't want the NSButtonCell to ever get focus.
>
> It sounds like you have full keyboard access turned on.  And, what
> you're seeing is the correct behavior.
>
> Be mindful of users that need to to interact with your application via
> accessibility.

Trying to provide accessibility support is actually how I got in this
mess.  The previous version of this panel looked more like what you
get from System Preferences > International > Language > Edit List -
you can use the keyboard to select a row, but there's no visual
indication of the selected row.  In this version I'm highlighting the
individual rows, and with a row highlighted, as mentioned above, you
can press the space bar to toggle the checkbox.  As such, it's
redundant (not to mention ugly) that the checkbox itself can get
focus.

With VoiceOver enabled, it's even worse; not only the button cell but
the two text cells in the outline view are unnecessarily added to the
tab order.

On Sun, Mar 02, 2008 at 05:58:53PM -0700, Rosyna wrote:
> Have you tried overriding
>
> - (BOOL)canFocusCell:(NSCell *)cell atTableColumn:(NSTableColumn
> *)tableColumn row:(NSInteger)row;
>
> to return NO in an outline view subclass?

Thanks, that works and resolves the VoiceOver focus issue as well, but
this method is not declared in the header file.  Wonder if this was
accidental, or if there's another method I should be using instead.

--
Nicholas Riley <email@hidden> | <http://www.uiuc.edu/ph/www/njriley>
_______________________________________________

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

References: 
 >Bypassing inter-cell navigation for NSButtonCell in NSOutlineView (From: Nicholas Riley <email@hidden>)
 >Re: Bypassing inter-cell navigation for NSButtonCell in NSOutlineView (From: Rosyna <email@hidden>)
 >Bypassing inter-cell navigation for NSButtonCell in NSOutlineView (From: Nicholas Riley <email@hidden>)
 >Re: Bypassing inter-cell navigation for NSButtonCell in NSOutlineView (From: Ricky Sharp <email@hidden>)
 >Re: Bypassing inter-cell navigation for NSButtonCell in NSOutlineView (From: Tommy Nordgren <email@hidden>)

  • Prev by Date: re: Core Data and retain count
  • Next by Date: Re: Handling mouse click event on a NSButton
  • Previous by thread: Re: Bypassing inter-cell navigation for NSButtonCell in NSOutlineView
  • Next by thread: Re: Bypassing inter-cell navigation for NSButtonCell in NSOutlineView
  • Index(es):
    • Date
    • Thread