This is not a problem with your understanding, but a known problem on
10.5:
6361482 AppKit 64 bit truncation of data1 and data2 when posting a
custom event
For 10.5 splitting up the data is probably the best way to go
Jesper Storm Bache
On Jul 29, 2009, at 4:52 PM, [email protected] wrote:
i'm building a 64bit app.
in response to USB input, i create and post an application defined
event. for the data1 field, i pass the address of an
NSMutableDictionary as follows:
... data1: (NSInteger)dataDict ...
in my application object's sendEvent override, i'm only getting (via
[anEvent data1]) the bottom 32 bits of the address i passed in.
the data1 method of NSEvent is defined to return an NSInteger, as is
the data1 parameter of the NSEvent method otherEventWithType, and if
i examining the value of data1 after i've created my custom event and
posted it (but prior to receiving/processing it in sendEvent), it
contains the proper 64 bit value.
so it appears that somewhere between posting the event and its
getting processed by [NSApp sendevent:] the parameter is getting
truncated to 32 bits. is this a bug in the 64 bit runtime? or a bug
in my understanding? and if not a misunderstanding on my part, anyone
know of a workaround (other my simply decomposing the 64bit address
manually into 2 32bit pieces and using data1 and data2)?
thanx,
ken
ps. running on leopard 10.5.7, with Xcode 3.1.3.
_______________________________________________
Cocoa-dev mailing list ([email protected])
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:
http://lists.apple.com/mailman/options/cocoa-dev/jsbache%40adobe.com
This email sent to [email protected]
_______________________________________________
Cocoa-dev mailing list ([email protected])
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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com
This email sent to [email protected]