• 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
Re: [NSEvent data1]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [NSEvent data1]


  • Subject: Re: [NSEvent data1]
  • From: Jesper Storm Bache <email@hidden>
  • Date: Wed, 29 Jul 2009 16:59:49 -0700

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

_______________________________________________

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


References: 
 >[NSEvent data1] (From: "email@hidden" <email@hidden>)

  • Prev by Date: [NSEvent data1]
  • Next by Date: Re: adding PDF annotations to the output of a regular NSView
  • Previous by thread: [NSEvent data1]
  • Next by thread: Binding collection view label through two entities
  • Index(es):
    • Date
    • Thread