Re: Delete key and panther
Re: Delete key and panther
- Subject: Re: Delete key and panther
- From: Rosyna <email@hidden>
- Date: Tue, 11 Nov 2003 13:29:53 -0700
Ah, stripping the lower bits seemed to work nicely. Thanks.
Ack, at 11/11/03, Brian Webster said:
This is just a guess as to what this may be, but I found this nugget
in the Panther release notes (under NSEvent):
The delivery rule for NSScrollWheel events has been changed so that
NSScrollWheel events are sent to the view under the mouse in a key
or utility window. NSScrollWheel events are dropped if the mouse is
not over a key or utility window. NSScrollWheel events may still be
passed up the responder chain from the receiving view.In 10.2, the
window server started setting an additional device-dependent
modifier flag in user input events to indicate when event coalescing
is disabled. Applications that check for modifierFlags using
equality without masking off the device-dependent modifierFlags
first can get unexpected behavior due to this change. In order to
maintain compatibility for applications built on Jaguar and earlier
systems, NSEvent by default strips this device-dependent modifier
flag when creating the event from a windowServer event. For
applications built on Panther or later systems, this will no longer
be the default behavior. In order to override NSEvent's default
behavior, an application can specify a value for the user default
NSDeviceDependentModifierFlags. If this default is set to NO, the
device-dependent modifier flags will be stripped.
On Nov 10, 2003, at 10:37 PM, Rosyna wrote:
I'm overriding the sendEvent: method in an NSTableView subclass to
do some delete key handling. I want to delete the selected item
when the delete key is pressed. I do this by checking the key
against NSDeleteCharacter (unichar key = [[event
charactersIgnoringModifiers] characterAtIndex:0];) and making sure
the event modifier flags are 0. In Jaguar, this worked fine but now
in panther the modifierFlags method on NSEvent is returning 256
(1<<8).
--
Sincerely,
Rosyna Keller
Technical Support/Holy Knight/Always needs a hug
Unsanity: Unsane Tools for Insanely Great People
---
Please include any previous correspondence in replies, it helps me
remember what we were talking about. Thanks.
_______________________________________________
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.