diff dstep/foundation/NSHost.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
line wrap: on
line diff
--- a/dstep/foundation/NSHost.d	Mon Aug 03 15:31:48 2009 +0200
+++ b/dstep/foundation/NSHost.d	Sun Jan 03 22:06:11 2010 +0100
@@ -7,44 +7,53 @@
 module dstep.foundation.NSHost;
 
 import dstep.foundation.NSArray;
-import dstep.foundation.NSMutableArray;
 import dstep.foundation.NSObject;
 import dstep.foundation.NSString;
 import dstep.objc.bridge.Bridge;
-import dstep.objc.objc : id;
+import dstep.objc.objc;
 
 class NSHost : NSObject
 {
-	mixin ObjcWrap;
+	mixin (ObjcWrap);
+	
+	this ()
+	{
+		super(typeof(this).alloc.init.objcObject);
+	}
+	
+	typeof(this) init ()
+	{
+		return invokeObjcSelf!(typeof(this), "init");
+	}
 
 	static NSHost currentHost ()
 	{
-		return invokeObjcSelfClass!(NSHost, "currentHost");
+		return invokeObjcSuperClass!(NSHost, "currentHost");
 	}
 
 	static NSHost hostWithName (NSString name)
 	{
-		return invokeObjcSelfClass!(NSHost, "hostWithName:", NSString)(name);
+		return invokeObjcSuperClass!(NSHost, "hostWithName:", NSString)(name);
 	}
 
 	static NSHost hostWithAddress (NSString address)
 	{
-		return invokeObjcSelfClass!(NSHost, "hostWithAddress:", NSString)(address);
+		return invokeObjcSuperClass!(NSHost, "hostWithAddress:", NSString)(address);
 	}
 
 	static void setHostCacheEnabled (bool flag)
 	{
-		return invokeObjcSelfClass!(void, "setHostCacheEnabled:", bool)(flag);
+		return invokeObjcSuperClass!(void, "setHostCacheEnabled:", bool)(flag);
 	}
 
 	static bool isHostCacheEnabled ()
 	{
-		return invokeObjcSelfClass!(bool, "isHostCacheEnabled");
+		return invokeObjcSuperClass!(bool, "isHostCacheEnabled");
 	}
 
 	static void flushHostCache ()
 	{
-		return invokeObjcSelfClass!(void, "flushHostCache");
+		return invokeObjcSuperClass!(void, "flushHostCache");
 	}
 
 	bool isEqualToHost (NSHost aHost)