diff dstep/foundation/NSPortNameServer.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/NSPortNameServer.d	Mon Aug 03 15:31:48 2009 +0200
+++ b/dstep/foundation/NSPortNameServer.d	Sun Jan 03 22:06:11 2010 +0100
@@ -10,15 +10,25 @@
 import dstep.foundation.NSPort;
 import dstep.foundation.NSString;
 import dstep.objc.bridge.Bridge;
-import dstep.objc.objc : id;
+import dstep.objc.objc;
 
 class NSPortNameServer : NSObject
 {
-	mixin ObjcWrap;
+	mixin (ObjcWrap);
+	
+	this ()
+	{
+		super(typeof(this).alloc.init.objcObject);
+	}
+
+	typeof(this) init ()
+	{
+		return invokeObjcSelf!(typeof(this), "init");
+	}
 
 	static NSPortNameServer systemDefaultPortNameServer ()
 	{
-		return invokeObjcSelfClass!(NSPortNameServer, "systemDefaultPortNameServer");
+		return invokeObjcSuperClass!(NSPortNameServer, "systemDefaultPortNameServer");
 	}
 
 	NSPort portForName (NSString name)
@@ -44,11 +54,21 @@
 
 class NSMachBootstrapServer : NSPortNameServer
 {
-	mixin ObjcWrap;
+	mixin (ObjcWrap);
+	
+	this ()
+	{
+		super(typeof(this).alloc.init.objcObject);
+	}
+
+	typeof(this) init ()
+	{
+		return invokeObjcSelf!(typeof(this), "init");
+	}
 
 	static Object sharedInstance ()
 	{
-		return invokeObjcSelfClass!(Object, "sharedInstance");
+		return invokeObjcSuperClass!(Object, "sharedInstance");
 	}
 
 	NSPort portForName (NSString name)
@@ -74,11 +94,21 @@
 
 class NSSocketPortNameServer : NSPortNameServer
 {
-	mixin ObjcWrap;
+	mixin (ObjcWrap);
+	
+	this ()
+	{
+		super(typeof(this).alloc.init.objcObject);
+	}
+	
+	typeof(this) init ()
+	{
+		return invokeObjcSelf!(typeof(this), "init");
+	}
 
 	static Object sharedInstance ()
 	{
-		return invokeObjcSelfClass!(Object, "sharedInstance");
+		return invokeObjcSuperClass!(Object, "sharedInstance");
 	}
 
 	NSPort portForName (NSString name)
@@ -124,11 +154,21 @@
 
 class NSMessagePortNameServer : NSPortNameServer
 {
-	mixin ObjcWrap;
+	mixin (ObjcWrap);
+	
+	this ()
+	{
+		super(typeof(this).alloc.init.objcObject);
+	}
+	
+	typeof(this) init ()
+	{
+		return invokeObjcSelf!(typeof(this), "init");
+	}
 
 	static Object sharedInstance ()
 	{
-		return invokeObjcSelfClass!(Object, "sharedInstance");
+		return invokeObjcSuperClass!(Object, "sharedInstance");
 	}
 
 	NSPort portForName (NSString name)