[Cocoa-sharp] Cocoasharp on Intel
Ferhat
ferhat at gmail.com
Sat Aug 25 14:19:27 EDT 2007
Hi,
I've compiled the latest source and came across a problem with
Event.locationInWindow (I'm trying to read mouse coordinates inside a
View subclass mousedown event).
The Cocoa.Point coordinates return junk on Intel but work fine on PPC.
I checked out the Mac OSX ABI function call reference and looks like
4-8 byte structures are returned in EAX/EDX registers on Intel instead
of memory.
So when i call locationInWindow , it uses objc_sendmsg_stret and fails.
The only fix i could think of was changing ObjCMessaging to check for
IA-32 when return type is valuetype and size of struct is <=8 bytes
and call objc_sendmsg instead.
Has anyone else come across this problem ?
Ferhat
ferhat at gmail.com
More information about the Cocoa-sharp
mailing list