Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
Re: Right arrow keypress == enter keypress in NSTableView subclass?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Right arrow keypress == enter keypress in NSTableView subclass?



On 28. Jul 2004, at 17:46, John C. Warner wrote:

char keyChar = [[theEvent characters] characterAtIndex:0];

There are two problems here. First of all, 'characters' might return an empty string, so asking for the character at index zero may throw!

Furthermore, the result is 'unichar', i.e. an 16 bit unsigned value, you store it in a (with current GCC) 8 bit signed value, so definitely some keys will clash, that might be your actual problem.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.


References: 
 >Right arrow keypress == enter keypress in NSTableView subclass? (From: "John C. Warner" <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2011 Apple Inc. All rights reserved.