Fwd: Modifier keys and panther...
Fwd: Modifier keys and panther...
- Subject: Fwd: Modifier keys and panther...
- From: Jiva DeVoe <email@hidden>
- Date: Tue, 16 Dec 2003 11:51:04 -0700
Quoth an ancient, wiser man than I: "Duh..." This got it fixed, please
ignore this email now. :)
Begin forwarded message:
>
From: Jonathan Wight <email@hidden>
>
Date: December 16, 2003 11:46:10 AM MST
>
To: Jiva DeVoe <email@hidden>
>
Subject: Re: Modifier keys and panther...
>
>
You want to use "&" instead of "&&" in your if statement.
>
>
Jon.
>
>
On Dec 16, 2003, at 12:13, Jiva DeVoe wrote:
>
>
> I'm having a strange problem with modifier keys. I have an NSView
>
> that
>
> looks for the mouse down event, when the event comes in it seems to
>
> always have the shift modifier. Here's the code.
>
>
>
> -(void)mouseDown:(NSEvent *)event
>
> {
>
> if([event modifierFlags] && NSShiftKeyMask)
>
> [self addToSelection:[self convertPoint:[event
>
> locationInWindow] fromView:nil]];
>
> else
>
> [self selectCardAt:[self convertPoint:[event
>
> locationInWindow] fromView:nil]];
>
> }
>
>
>
> This worked fine under Jaguar seems to have only started happening in
>
> panther. In the debugger, the [event modifierFlags] comes back as
>
> 256.
>
>
>
> What am I doing wrong? Or, if I am not doing anything wrong, anyone
>
> have any clues? If you see this code and say "That's correct" please
>
> let me know that too, so I won't wonder.
>
>
>
> --
>
> Jiva DeVoe
>
> jiva at devoesquared.com
>
> http://www.devoesquared.com
>
>
>
> [demime 0.98b removed an attachment of type
>
> application/pkcs7-signature which had a name of smime.p7s]
>
> _______________________________________________
>
> 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.
>
>
>
>
--
Jiva DeVoe
jiva at devoesquared.com
http://www.devoesquared.com
[demime 0.98b removed an attachment of type application/pkcs7-signature which had a name of smime.p7s]
_______________________________________________
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.