• 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: Backtabbing into an NSTableView
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Backtabbing into an NSTableView


  • Subject: Re: Backtabbing into an NSTableView
  • From: Vadim <email@hidden>
  • Date: Sun, 7 Jun 2009 00:02:04 +0300

An update on this question. It turns out the first bit of code does not work after all, because 48 is the keyCode for [Tab] and [Shift +Tab]. I needed to change the code to the following:

-(void)keyDown:(NSEvent *)theEvent
{
if ([theEvent keyCode] == 48 && ([theEvent modifierFlags] & NSShiftKeyMask)) // 48 is the tab key
{
[self editColumn:1 row:[self selectedRow] withEvent:nil select:YES];
return;
}
[super keyDown:theEvent];
}


Without the "return;" there is a "bing". To tell the truth, I'm not sure why I get the "bing." I'm guessing that it has something to do with the responder chain, but the thing is, the table can respond to a backtab.

The second bit of code (Code B) works, but it gives a "bing" at every keypress. Again, I'm thinking this has something to do with the responder chain; but I'm not clear what. Any ideas?

According to the documentation, beeping is a standard reaction to unhandled key event:
http://developer.apple.com/documentation/Cocoa/Conceptual/EventOverview/EventArchitecture/EventArchitecture.html#/ /apple_ref/doc/uid/10000060i-CH3-SW26
_______________________________________________


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: 
 >Backtabbing into an NSTableView (From: K.Darcy Otto <email@hidden>)
 >Re: Backtabbing into an NSTableView (From: "K. Darcy Otto" <email@hidden>)

  • Prev by Date: selecting tab in a tabless NSTabView in IB
  • Next by Date: Shadow is inside of the object. After Clipping object does not show.
  • Previous by thread: Re: Backtabbing into an NSTableView
  • Next by thread: A couple questions about graphics
  • Index(es):
    • Date
    • Thread