simple display (from: GUI library for D)

KennyTM~ kennytm at gmail.com
Mon Apr 11 02:41:59 PDT 2011


On Apr 11, 11 15:43, Jacob Carlborg wrote:
> When using objc_msgSend and friends you need to cast the function to the
> right signature, to the same signature as the method you're calling via
> objc_msgSend, before calling it. See
> http://www.dsource.org/projects/dstep/browser/dstep/objc/message.d#L74
>
> If you start passing floats to objc_msgSend you'll soon notice that you
> get some weird behaviors if you don't cast it to the right signature.
>
> You also need to use different versions of objc_msgSend depending on
> what the return type is and on that platform you're on. If you're
> returning a struct or an floating point number of some kind you need to
> use a different version of objc_msgSend. You can have a look at:
> http://www.dsource.org/projects/dstep/browser/dstep/objc/bridge/Bridge.d#L779
> . Also look the function being called:
> http://www.dsource.org/projects/dstep/browser/dstep/objc/message.d

Yes I know. Since all objc_msgSend used only operate on integers and 
pointers and structs and doubles, and they only return pointers or void, 
I didn't bother to cast them.

Anyway, those calls are now updated to handled it properly, please check 
https://github.com/kennytm/simpledisplay.d/commit/18b6.


More information about the Digitalmars-d mailing list