Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: GetKeys() and KeyMap?



In a message dated 7/27/04 6:43:39 PM, email@hidden writes:

>Yo Spikeio,

Yo chiltonio. :)

>
>On Jul 27, 2004, at 6:26 PM, email@hidden wrote:
>> Bit Shifting should do the trick right?
>
>Absolutely.

Good.
(my problem was I was thinking Boolean not Bit)


At the last second I remembered seeing some other bit stuff, masks,
so I tryed using a mask (wouldn't compile),
then I tryed using several different bit shifts (wouldn't compile)

it gave me this error:
#Error: illegal operand types
Had: (long *)



here is the code for the BitShift:

#include <Carbon.h>
Boolean Done = false;
KeyMap keys;

main()
{
while (!Button() && (Done == false))
{
GetKeys(keys);
Done = keys >> 24; /* also tryed 128 - (128 - 24) and
104 (got: to high error) */
/* notice 128 - (128 - 24) and 104 equal the same */

}
}



Note: if the code is shown to me (like a tutorial does) I will more than
likely see
my error.


Thank you everyone for your help,
BinarySpike
_______________________________________________
carbon-development mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/carbon-development
Do not post admin requests to the list. They will be ignored.




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

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.