• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
[NSEvent data1]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[NSEvent data1]


  • Subject: [NSEvent data1]
  • From: "email@hidden" <email@hidden>
  • Date: Wed, 29 Jul 2009 16:52:02 -0700

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@hidden)

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:
This email sent to email@hidden


  • Follow-Ups:
    • Re: [NSEvent data1]
      • From: Jesper Storm Bache <email@hidden>
  • Prev by Date: adding PDF annotations to the output of a regular NSView
  • Next by Date: Re: [NSEvent data1]
  • Previous by thread: Re: adding PDF annotations to the output of a regular NSView
  • Next by thread: Re: [NSEvent data1]
  • Index(es):
    • Date
    • Thread