Shiny!

On 1 May 2011, at 14:29, Mathieu Suen wrote:

>    drawRect: rect [
>       "d or f depending on 64 or 32 bit arch (should be simpler using 
> Objc.NSRect typeStr...)"
>       <objcTypeStr:'v@:{_NSRect={_NSPoint=dd}{_NSSize=dd}}'>

I'm not certain why this is needed.  This information can be obtained by 
runtime introspection (that's what LanguageKit does) - you can just grab the 
type encoding from the superclass method and parse it.  This includes the 
argument types, so there's no need to specify it directly.  

>  nsRect :=  Objc.NSRect gcOriginX: 0.0
>                   y: 0.0
>                   width: 100.0
>                   height: 100.0.


You might be interested in the SmalltalkSupport library in LanguageKit.  This, 
among other things, provides a category on NSValue that lets you create objects 
that box the common primitive types.

David

-- Send from my Jacquard Loom


_______________________________________________
Etoile-discuss mailing list
[email protected]
https://mail.gna.org/listinfo/etoile-discuss

Répondre à