comparison dstep/foundation/NSScriptCoercionHandler.d @ 16:19885b43130e

Huge update, the bridge actually works now
author Jacob Carlborg <doob@me.com>
date Sun, 03 Jan 2010 22:06:11 +0100
parents 7ff919f595d5
children b9de51448c6b
comparison
equal deleted inserted replaced
15:7ff919f595d5 16:19885b43130e
6 */ 6 */
7 module dstep.foundation.NSScriptCoercionHandler; 7 module dstep.foundation.NSScriptCoercionHandler;
8 8
9 import dstep.foundation.NSObject; 9 import dstep.foundation.NSObject;
10 import dstep.objc.bridge.Bridge; 10 import dstep.objc.bridge.Bridge;
11 import dstep.objc.objc : id; 11 import dstep.objc.objc;
12 12
13 class NSScriptCoercionHandler : NSObject 13 class NSScriptCoercionHandler : NSObject
14 { 14 {
15 mixin ObjcWrap; 15 mixin (ObjcWrap);
16
17 this ()
18 {
19 super(typeof(this).alloc.init.objcObject);
20 }
21
22 typeof(this) init ()
23 {
24 return invokeObjcSelf!(typeof(this), "init");
25 }
16 26
17 static NSScriptCoercionHandler sharedCoercionHandler () 27 static NSScriptCoercionHandler sharedCoercionHandler ()
18 { 28 {
19 return invokeObjcSelfClass!(NSScriptCoercionHandler, "sharedCoercionHandler"); 29 return invokeObjcSuperClass!(NSScriptCoercionHandler, "sharedCoercionHandler");
20 } 30 }
21 31
22 Object coerceValue (Object value, Class toClass) 32 Object coerceValue (Object value, Class toClass)
23 { 33 {
24 return invokeObjcSelf!(Object, "coerceValue:toClass:", Object, Class)(value, toClass); 34 return invokeObjcSelf!(Object, "coerceValue:toClass:", Object, Class)(value, toClass);