changeset 15:7ff919f595d5

Added the Foundation framework, again
author Jacob Carlborg <doob@me.com>
date Mon, 03 Aug 2009 15:31:48 +0200
parents 89f3c3ef1fd2
children 19885b43130e
files dstep/foundation/NSAffineTransform.d dstep/foundation/NSAppleEventDescriptor.d dstep/foundation/NSAppleEventManager.d dstep/foundation/NSBundle.d dstep/foundation/NSCalendarDate.d dstep/foundation/NSCharacterSet.d dstep/foundation/NSClassDescription.d dstep/foundation/NSConnection.d dstep/foundation/NSDecimalNumber.d dstep/foundation/NSDistantObject.d dstep/foundation/NSDistributedLock.d dstep/foundation/NSDistributedNotificationCenter.d dstep/foundation/NSException.d dstep/foundation/NSExpression.d dstep/foundation/NSFileManager.d dstep/foundation/NSHTTPCookieStorage.d dstep/foundation/NSHost.d dstep/foundation/NSIndexPath.d dstep/foundation/NSInvocation.d dstep/foundation/NSMethodSignature.d dstep/foundation/NSNull.d dstep/foundation/NSPort.d dstep/foundation/NSPortNameServer.d dstep/foundation/NSPredicate.d dstep/foundation/NSProcessInfo.d dstep/foundation/NSRunLoop.d dstep/foundation/NSScriptClassDescription.d dstep/foundation/NSScriptCoercionHandler.d dstep/foundation/NSScriptCommand.d dstep/foundation/NSScriptExecutionContext.d dstep/foundation/NSScriptObjectSpecifiers.d dstep/foundation/NSScriptSuiteRegistry.d dstep/foundation/NSThread.d dstep/foundation/NSTimer.d dstep/foundation/NSURL.d dstep/foundation/NSURLCache.d dstep/foundation/NSURLConnection.d dstep/foundation/NSURLCredential.d dstep/foundation/NSURLCredentialStorage.d dstep/foundation/NSURLHandle.d dstep/foundation/NSUserDefaults.d dstep/foundation/NSValueTransformer.d dstep/foundation/NSXMLNode.d scripts/dgen.rb
diffstat 44 files changed, 286 insertions(+), 128 deletions(-) [+]
line wrap: on
line diff
--- a/dstep/foundation/NSAffineTransform.d	Mon Aug 03 15:23:15 2009 +0200
+++ b/dstep/foundation/NSAffineTransform.d	Mon Aug 03 15:31:48 2009 +0200
@@ -28,7 +28,8 @@
 
 	static NSAffineTransform transform ()
 	{
-		return invokeObjcSelfClass!(NSAffineTransform, "transform"return result is this.objcObject ? this : (result !is null ? new NSAffineTransform(result) : null);	}
+		return invokeObjcSelfClass!(NSAffineTransform, "transform");
+	}
 
 	Object initWithTransform (NSAffineTransform transform)
 	{
--- a/dstep/foundation/NSAppleEventDescriptor.d	Mon Aug 03 15:23:15 2009 +0200
+++ b/dstep/foundation/NSAppleEventDescriptor.d	Mon Aug 03 15:31:48 2009 +0200
@@ -18,47 +18,58 @@
 
 	static NSAppleEventDescriptor nullDescriptor ()
 	{
-		return invokeObjcSelfClass!(NSAppleEventDescriptor, "nullDescriptor"return result is this.objcObject ? this : (result !is null ? new NSAppleEventDescriptor(result) : null);	}
+		return invokeObjcSelfClass!(NSAppleEventDescriptor, "nullDescriptor");
+	}
 
 	static NSAppleEventDescriptor descriptorWithDescriptorType (uint descriptorType, void* bytes, NSUInteger byteCount)
 	{
-		return invokeObjcSelfClass!(NSAppleEventDescriptor, "descriptorWithDescriptorType:bytes:length:", uint, void*, NSUInteger)(descriptorType, bytes, byteCountreturn result is this.objcObject ? this : (result !is null ? new NSAppleEventDescriptor(result) : null);	}
+		return invokeObjcSelfClass!(NSAppleEventDescriptor, "descriptorWithDescriptorType:bytes:length:", uint, void*, NSUInteger)(descriptorType, bytes, byteCount);
+	}
 
 	static NSAppleEventDescriptor descriptorWithDescriptorType (uint descriptorType, NSData data)
 	{
-		return invokeObjcSelfClass!(NSAppleEventDescriptor, "descriptorWithDescriptorType:data:", uint, NSData)(descriptorType, datareturn result is this.objcObject ? this : (result !is null ? new NSAppleEventDescriptor(result) : null);	}
+		return invokeObjcSelfClass!(NSAppleEventDescriptor, "descriptorWithDescriptorType:data:", uint, NSData)(descriptorType, data);
+	}
 
 	static NSAppleEventDescriptor descriptorWithBoolean (ubyte boolean)
 	{
-		return invokeObjcSelfClass!(NSAppleEventDescriptor, "descriptorWithBoolean:", ubyte)(booleanreturn result is this.objcObject ? this : (result !is null ? new NSAppleEventDescriptor(result) : null);	}
+		return invokeObjcSelfClass!(NSAppleEventDescriptor, "descriptorWithBoolean:", ubyte)(boolean);
+	}
 
 	static NSAppleEventDescriptor descriptorWithEnumCode (uint enumerator)
 	{
-		return invokeObjcSelfClass!(NSAppleEventDescriptor, "descriptorWithEnumCode:", uint)(enumeratorreturn result is this.objcObject ? this : (result !is null ? new NSAppleEventDescriptor(result) : null);	}
+		return invokeObjcSelfClass!(NSAppleEventDescriptor, "descriptorWithEnumCode:", uint)(enumerator);
+	}
 
 	static NSAppleEventDescriptor descriptorWithInt32 (int signedInt)
 	{
-		return invokeObjcSelfClass!(NSAppleEventDescriptor, "descriptorWithInt32:", int)(signedIntreturn result is this.objcObject ? this : (result !is null ? new NSAppleEventDescriptor(result) : null);	}
+		return invokeObjcSelfClass!(NSAppleEventDescriptor, "descriptorWithInt32:", int)(signedInt);
+	}
 
 	static NSAppleEventDescriptor descriptorWithTypeCode (uint typeCode)
 	{
-		return invokeObjcSelfClass!(NSAppleEventDescriptor, "descriptorWithTypeCode:", uint)(typeCodereturn result is this.objcObject ? this : (result !is null ? new NSAppleEventDescriptor(result) : null);	}
+		return invokeObjcSelfClass!(NSAppleEventDescriptor, "descriptorWithTypeCode:", uint)(typeCode);
+	}
 
 	static NSAppleEventDescriptor descriptorWithString (NSString string)
 	{
-		return invokeObjcSelfClass!(NSAppleEventDescriptor, "descriptorWithString:", NSString)(stringreturn result is this.objcObject ? this : (result !is null ? new NSAppleEventDescriptor(result) : null);	}
+		return invokeObjcSelfClass!(NSAppleEventDescriptor, "descriptorWithString:", NSString)(string);
+	}
 
 	static NSAppleEventDescriptor appleEventWithEventClass (uint eventClass, uint eventID, NSAppleEventDescriptor targetDescriptor, short returnID, int transactionID)
 	{
-		return invokeObjcSelfClass!(NSAppleEventDescriptor, "appleEventWithEventClass:eventID:targetDescriptor:returnID:transactionID:", uint, uint, NSAppleEventDescriptor, short, int)(eventClass, eventID, targetDescriptor, returnID, transactionIDreturn result is this.objcObject ? this : (result !is null ? new NSAppleEventDescriptor(result) : null);	}
+		return invokeObjcSelfClass!(NSAppleEventDescriptor, "appleEventWithEventClass:eventID:targetDescriptor:returnID:transactionID:", uint, uint, NSAppleEventDescriptor, short, int)(eventClass, eventID, targetDescriptor, returnID, transactionID);
+	}
 
 	static NSAppleEventDescriptor listDescriptor ()
 	{
-		return invokeObjcSelfClass!(NSAppleEventDescriptor, "listDescriptor"return result is this.objcObject ? this : (result !is null ? new NSAppleEventDescriptor(result) : null);	}
+		return invokeObjcSelfClass!(NSAppleEventDescriptor, "listDescriptor");
+	}
 
 	static NSAppleEventDescriptor recordDescriptor ()
 	{
-		return invokeObjcSelfClass!(NSAppleEventDescriptor, "recordDescriptor"return result is this.objcObject ? this : (result !is null ? new NSAppleEventDescriptor(result) : null);	}
+		return invokeObjcSelfClass!(NSAppleEventDescriptor, "recordDescriptor");
+	}
 
 	Object initWithAEDescNoCopy (AEDesc* aeDesc)
 	{
@@ -223,7 +234,9 @@
 
 	NSAppleEventDescriptor paramDescriptorForKeyword (uint keyword)
 	{
-		id result = invokeObjcSelf!(id, "paramDescriptorForKeyword:", uint)(keywordreturn result is this.objcObject ? this : (result !is null ? new NSAppleEventDescriptor(result) : null);	}
+		id result = invokeObjcSelf!(id, "paramDescriptorForKeyword:", uint)(keyword);
+		return result is this.objcObject ? this : (result !is null ? new NSAppleEventDescriptor(result) : null);
+	}
 
 	void removeParamDescriptorWithKeyword (uint keyword)
 	{
@@ -237,7 +250,9 @@
 
 	NSAppleEventDescriptor attributeDescriptorForKeyword (uint keyword)
 	{
-		id result = invokeObjcSelf!(id, "attributeDescriptorForKeyword:", uint)(keywordreturn result is this.objcObject ? this : (result !is null ? new NSAppleEventDescriptor(result) : null);	}
+		id result = invokeObjcSelf!(id, "attributeDescriptorForKeyword:", uint)(keyword);
+		return result is this.objcObject ? this : (result !is null ? new NSAppleEventDescriptor(result) : null);
+	}
 
 	NSInteger numberOfItems ()
 	{
@@ -251,7 +266,9 @@
 
 	NSAppleEventDescriptor descriptorAtIndex (NSInteger index)
 	{
-		id result = invokeObjcSelf!(id, "descriptorAtIndex:", NSInteger)(indexreturn result is this.objcObject ? this : (result !is null ? new NSAppleEventDescriptor(result) : null);	}
+		id result = invokeObjcSelf!(id, "descriptorAtIndex:", NSInteger)(index);
+		return result is this.objcObject ? this : (result !is null ? new NSAppleEventDescriptor(result) : null);
+	}
 
 	void removeDescriptorAtIndex (NSInteger index)
 	{
@@ -265,7 +282,9 @@
 
 	NSAppleEventDescriptor descriptorForKeyword (uint keyword)
 	{
-		id result = invokeObjcSelf!(id, "descriptorForKeyword:", uint)(keywordreturn result is this.objcObject ? this : (result !is null ? new NSAppleEventDescriptor(result) : null);	}
+		id result = invokeObjcSelf!(id, "descriptorForKeyword:", uint)(keyword);
+		return result is this.objcObject ? this : (result !is null ? new NSAppleEventDescriptor(result) : null);
+	}
 
 	void removeDescriptorWithKeyword (uint keyword)
 	{
@@ -279,7 +298,9 @@
 
 	NSAppleEventDescriptor coerceToDescriptorType (uint descriptorType)
 	{
-		id result = invokeObjcSelf!(id, "coerceToDescriptorType:", uint)(descriptorTypereturn result is this.objcObject ? this : (result !is null ? new NSAppleEventDescriptor(result) : null);	}
+		id result = invokeObjcSelf!(id, "coerceToDescriptorType:", uint)(descriptorType);
+		return result is this.objcObject ? this : (result !is null ? new NSAppleEventDescriptor(result) : null);
+	}
 
 	Object copyWithZone (NSZone* zone)
 	{
--- a/dstep/foundation/NSAppleEventManager.d	Mon Aug 03 15:23:15 2009 +0200
+++ b/dstep/foundation/NSAppleEventManager.d	Mon Aug 03 15:31:48 2009 +0200
@@ -38,7 +38,8 @@
 
 	static NSAppleEventManager sharedAppleEventManager ()
 	{
-		return invokeObjcSelfClass!(NSAppleEventManager, "sharedAppleEventManager"return result is this.objcObject ? this : (result !is null ? new NSAppleEventManager(result) : null);	}
+		return invokeObjcSelfClass!(NSAppleEventManager, "sharedAppleEventManager");
+	}
 
 	void setEventHandler (Object handler, SEL handleEventSelector, uint eventClass, uint eventID)
 	{
--- a/dstep/foundation/NSBundle.d	Mon Aug 03 15:23:15 2009 +0200
+++ b/dstep/foundation/NSBundle.d	Mon Aug 03 15:31:48 2009 +0200
@@ -39,11 +39,13 @@
 
 	static NSBundle mainBundle ()
 	{
-		return invokeObjcSelfClass!(NSBundle, "mainBundle"return result is this.objcObject ? this : (result !is null ? new NSBundle(result) : null);	}
+		return invokeObjcSelfClass!(NSBundle, "mainBundle");
+	}
 
 	static NSBundle bundleWithPath (NSString path)
 	{
-		return invokeObjcSelfClass!(NSBundle, "bundleWithPath:", NSString)(pathreturn result is this.objcObject ? this : (result !is null ? new NSBundle(result) : null);	}
+		return invokeObjcSelfClass!(NSBundle, "bundleWithPath:", NSString)(path);
+	}
 
 	Object initWithPath (NSString path)
 	{
@@ -63,11 +65,13 @@
 
 	static NSBundle bundleForClass (Class aClass)
 	{
-		return invokeObjcSelfClass!(NSBundle, "bundleForClass:", Class)(aClassreturn result is this.objcObject ? this : (result !is null ? new NSBundle(result) : null);	}
+		return invokeObjcSelfClass!(NSBundle, "bundleForClass:", Class)(aClass);
+	}
 
 	static NSBundle bundleWithIdentifier (NSString identifier)
 	{
-		return invokeObjcSelfClass!(NSBundle, "bundleWithIdentifier:", NSString)(identifierreturn result is this.objcObject ? this : (result !is null ? new NSBundle(result) : null);	}
+		return invokeObjcSelfClass!(NSBundle, "bundleWithIdentifier:", NSString)(identifier);
+	}
 
 	static NSArray allBundles ()
 	{
--- a/dstep/foundation/NSCalendarDate.d	Mon Aug 03 15:23:15 2009 +0200
+++ b/dstep/foundation/NSCalendarDate.d	Mon Aug 03 15:31:48 2009 +0200
@@ -168,7 +168,9 @@
 
 	NSCalendarDate dateByAddingYears (NSInteger year, NSInteger month, NSInteger day, NSInteger hour, NSInteger minute, NSInteger second)
 	{
-		id result = invokeObjcSelf!(id, "dateByAddingYears:months:days:hours:minutes:seconds:", NSInteger, NSInteger, NSInteger, NSInteger, NSInteger, NSInteger)(year, month, day, hour, minute, secondreturn result is this.objcObject ? this : (result !is null ? new NSCalendarDate(result) : null);	}
+		id result = invokeObjcSelf!(id, "dateByAddingYears:months:days:hours:minutes:seconds:", NSInteger, NSInteger, NSInteger, NSInteger, NSInteger, NSInteger)(year, month, day, hour, minute, second);
+		return result is this.objcObject ? this : (result !is null ? new NSCalendarDate(result) : null);
+	}
 
 	void years (NSInteger* yp, NSInteger* mop, NSInteger* dp, NSInteger* hp, NSInteger* mip, NSInteger* sp, NSCalendarDate date)
 	{
--- a/dstep/foundation/NSCharacterSet.d	Mon Aug 03 15:23:15 2009 +0200
+++ b/dstep/foundation/NSCharacterSet.d	Mon Aug 03 15:31:48 2009 +0200
@@ -130,7 +130,9 @@
 
 	NSCharacterSet invertedSet ()
 	{
-		id result = invokeObjcSelf!(id, "invertedSet"return result is this.objcObject ? this : (result !is null ? new NSCharacterSet(result) : null);	}
+		id result = invokeObjcSelf!(id, "invertedSet");
+		return result is this.objcObject ? this : (result !is null ? new NSCharacterSet(result) : null);
+	}
 
 	bool longCharacterIsMember (uint theLongChar)
 	{
--- a/dstep/foundation/NSClassDescription.d	Mon Aug 03 15:23:15 2009 +0200
+++ b/dstep/foundation/NSClassDescription.d	Mon Aug 03 15:31:48 2009 +0200
@@ -39,7 +39,8 @@
 
 	static NSClassDescription classDescriptionForClass (Class aClass)
 	{
-		return invokeObjcSelfClass!(NSClassDescription, "classDescriptionForClass:", Class)(aClassreturn result is this.objcObject ? this : (result !is null ? new NSClassDescription(result) : null);	}
+		return invokeObjcSelfClass!(NSClassDescription, "classDescriptionForClass:", Class)(aClass);
+	}
 
 	NSArray attributeKeys ()
 	{
--- a/dstep/foundation/NSConnection.d	Mon Aug 03 15:23:15 2009 +0200
+++ b/dstep/foundation/NSConnection.d	Mon Aug 03 15:31:48 2009 +0200
@@ -76,7 +76,8 @@
 
 	static NSConnection defaultConnection ()
 	{
-		return invokeObjcSelfClass!(NSConnection, "defaultConnection"return result is this.objcObject ? this : (result !is null ? new NSConnection(result) : null);	}
+		return invokeObjcSelfClass!(NSConnection, "defaultConnection");
+	}
 
 	static Object connectionWithRegisteredName (NSString name, NSString hostName)
 	{
--- a/dstep/foundation/NSDecimalNumber.d	Mon Aug 03 15:23:15 2009 +0200
+++ b/dstep/foundation/NSDecimalNumber.d	Mon Aug 03 15:31:48 2009 +0200
@@ -108,91 +108,126 @@
 
 	static NSDecimalNumber decimalNumberWithMantissa (ulong mantissa, short exponent, bool flag)
 	{
-		return invokeObjcSelfClass!(NSDecimalNumber, "decimalNumberWithMantissa:exponent:isNegative:", ulong, short, bool)(mantissa, exponent, flagreturn result is this.objcObject ? this : (result !is null ? new NSDecimalNumber(result) : null);	}
+		return invokeObjcSelfClass!(NSDecimalNumber, "decimalNumberWithMantissa:exponent:isNegative:", ulong, short, bool)(mantissa, exponent, flag);
+	}
 
 	static NSDecimalNumber decimalNumberWithDecimal (NSDecimal dcm)
 	{
-		return invokeObjcSelfClass!(NSDecimalNumber, "decimalNumberWithDecimal:", NSDecimal)(dcmreturn result is this.objcObject ? this : (result !is null ? new NSDecimalNumber(result) : null);	}
+		return invokeObjcSelfClass!(NSDecimalNumber, "decimalNumberWithDecimal:", NSDecimal)(dcm);
+	}
 
 	static NSDecimalNumber decimalNumberWithString (NSString numberValue)
 	{
-		return invokeObjcSelfClass!(NSDecimalNumber, "decimalNumberWithString:", NSString)(numberValuereturn result is this.objcObject ? this : (result !is null ? new NSDecimalNumber(result) : null);	}
+		return invokeObjcSelfClass!(NSDecimalNumber, "decimalNumberWithString:", NSString)(numberValue);
+	}
 
 	static NSDecimalNumber decimalNumberWithString (NSString numberValue, Object locale)
 	{
-		return invokeObjcSelfClass!(NSDecimalNumber, "decimalNumberWithString:locale:", NSString, Object)(numberValue, localereturn result is this.objcObject ? this : (result !is null ? new NSDecimalNumber(result) : null);	}
+		return invokeObjcSelfClass!(NSDecimalNumber, "decimalNumberWithString:locale:", NSString, Object)(numberValue, locale);
+	}
 
 	static NSDecimalNumber zero ()
 	{
-		return invokeObjcSelfClass!(NSDecimalNumber, "zero"return result is this.objcObject ? this : (result !is null ? new NSDecimalNumber(result) : null);	}
+		return invokeObjcSelfClass!(NSDecimalNumber, "zero");
+	}
 
 	static NSDecimalNumber one ()
 	{
-		return invokeObjcSelfClass!(NSDecimalNumber, "one"return result is this.objcObject ? this : (result !is null ? new NSDecimalNumber(result) : null);	}
+		return invokeObjcSelfClass!(NSDecimalNumber, "one");
+	}
 
 	static NSDecimalNumber minimumDecimalNumber ()
 	{
-		return invokeObjcSelfClass!(NSDecimalNumber, "minimumDecimalNumber"return result is this.objcObject ? this : (result !is null ? new NSDecimalNumber(result) : null);	}
+		return invokeObjcSelfClass!(NSDecimalNumber, "minimumDecimalNumber");
+	}
 
 	static NSDecimalNumber maximumDecimalNumber ()
 	{
-		return invokeObjcSelfClass!(NSDecimalNumber, "maximumDecimalNumber"return result is this.objcObject ? this : (result !is null ? new NSDecimalNumber(result) : null);	}
+		return invokeObjcSelfClass!(NSDecimalNumber, "maximumDecimalNumber");
+	}
 
 	static NSDecimalNumber notANumber ()
 	{
-		return invokeObjcSelfClass!(NSDecimalNumber, "notANumber"return result is this.objcObject ? this : (result !is null ? new NSDecimalNumber(result) : null);	}
+		return invokeObjcSelfClass!(NSDecimalNumber, "notANumber");
+	}
 
 	NSDecimalNumber decimalNumberByAdding (NSDecimalNumber decimalNumber)
 	{
-		id result = invokeObjcSelf!(id, "decimalNumberByAdding:", NSDecimalNumber)(decimalNumberreturn result is this.objcObject ? this : (result !is null ? new NSDecimalNumber(result) : null);	}
+		id result = invokeObjcSelf!(id, "decimalNumberByAdding:", NSDecimalNumber)(decimalNumber);
+		return result is this.objcObject ? this : (result !is null ? new NSDecimalNumber(result) : null);
+	}
 
 	NSDecimalNumber decimalNumberByAdding (NSDecimalNumber decimalNumber, INSDecimalNumberBehaviors behavior)
 	{
-		id result = invokeObjcSelf!(id, "decimalNumberByAdding:withBehavior:", NSDecimalNumber, INSDecimalNumberBehaviors)(decimalNumber, behaviorreturn result is this.objcObject ? this : (result !is null ? new NSDecimalNumber(result) : null);	}
+		id result = invokeObjcSelf!(id, "decimalNumberByAdding:withBehavior:", NSDecimalNumber, INSDecimalNumberBehaviors)(decimalNumber, behavior);
+		return result is this.objcObject ? this : (result !is null ? new NSDecimalNumber(result) : null);
+	}
 
 	NSDecimalNumber decimalNumberBySubtracting (NSDecimalNumber decimalNumber)
 	{
-		id result = invokeObjcSelf!(id, "decimalNumberBySubtracting:", NSDecimalNumber)(decimalNumberreturn result is this.objcObject ? this : (result !is null ? new NSDecimalNumber(result) : null);	}
+		id result = invokeObjcSelf!(id, "decimalNumberBySubtracting:", NSDecimalNumber)(decimalNumber);
+		return result is this.objcObject ? this : (result !is null ? new NSDecimalNumber(result) : null);
+	}
 
 	NSDecimalNumber decimalNumberBySubtracting (NSDecimalNumber decimalNumber, INSDecimalNumberBehaviors behavior)
 	{
-		id result = invokeObjcSelf!(id, "decimalNumberBySubtracting:withBehavior:", NSDecimalNumber, INSDecimalNumberBehaviors)(decimalNumber, behaviorreturn result is this.objcObject ? this : (result !is null ? new NSDecimalNumber(result) : null);	}
+		id result = invokeObjcSelf!(id, "decimalNumberBySubtracting:withBehavior:", NSDecimalNumber, INSDecimalNumberBehaviors)(decimalNumber, behavior);
+		return result is this.objcObject ? this : (result !is null ? new NSDecimalNumber(result) : null);
+	}
 
 	NSDecimalNumber decimalNumberByMultiplyingBy (NSDecimalNumber decimalNumber)
 	{
-		id result = invokeObjcSelf!(id, "decimalNumberByMultiplyingBy:", NSDecimalNumber)(decimalNumberreturn result is this.objcObject ? this : (result !is null ? new NSDecimalNumber(result) : null);	}
+		id result = invokeObjcSelf!(id, "decimalNumberByMultiplyingBy:", NSDecimalNumber)(decimalNumber);
+		return result is this.objcObject ? this : (result !is null ? new NSDecimalNumber(result) : null);
+	}
 
 	NSDecimalNumber decimalNumberByMultiplyingBy (NSDecimalNumber decimalNumber, INSDecimalNumberBehaviors behavior)
 	{
-		id result = invokeObjcSelf!(id, "decimalNumberByMultiplyingBy:withBehavior:", NSDecimalNumber, INSDecimalNumberBehaviors)(decimalNumber, behaviorreturn result is this.objcObject ? this : (result !is null ? new NSDecimalNumber(result) : null);	}
+		id result = invokeObjcSelf!(id, "decimalNumberByMultiplyingBy:withBehavior:", NSDecimalNumber, INSDecimalNumberBehaviors)(decimalNumber, behavior);
+		return result is this.objcObject ? this : (result !is null ? new NSDecimalNumber(result) : null);
+	}
 
 	NSDecimalNumber decimalNumberByDividingBy (NSDecimalNumber decimalNumber)
 	{
-		id result = invokeObjcSelf!(id, "decimalNumberByDividingBy:", NSDecimalNumber)(decimalNumberreturn result is this.objcObject ? this : (result !is null ? new NSDecimalNumber(result) : null);	}
+		id result = invokeObjcSelf!(id, "decimalNumberByDividingBy:", NSDecimalNumber)(decimalNumber);
+		return result is this.objcObject ? this : (result !is null ? new NSDecimalNumber(result) : null);
+	}
 
 	NSDecimalNumber decimalNumberByDividingBy (NSDecimalNumber decimalNumber, INSDecimalNumberBehaviors behavior)
 	{
-		id result = invokeObjcSelf!(id, "decimalNumberByDividingBy:withBehavior:", NSDecimalNumber, INSDecimalNumberBehaviors)(decimalNumber, behaviorreturn result is this.objcObject ? this : (result !is null ? new NSDecimalNumber(result) : null);	}
+		id result = invokeObjcSelf!(id, "decimalNumberByDividingBy:withBehavior:", NSDecimalNumber, INSDecimalNumberBehaviors)(decimalNumber, behavior);
+		return result is this.objcObject ? this : (result !is null ? new NSDecimalNumber(result) : null);
+	}
 
 	NSDecimalNumber decimalNumberByRaisingToPower (NSUInteger power)
 	{
-		id result = invokeObjcSelf!(id, "decimalNumberByRaisingToPower:", NSUInteger)(powerreturn result is this.objcObject ? this : (result !is null ? new NSDecimalNumber(result) : null);	}
+		id result = invokeObjcSelf!(id, "decimalNumberByRaisingToPower:", NSUInteger)(power);
+		return result is this.objcObject ? this : (result !is null ? new NSDecimalNumber(result) : null);
+	}
 
 	NSDecimalNumber decimalNumberByRaisingToPower (NSUInteger power, INSDecimalNumberBehaviors behavior)
 	{
-		id result = invokeObjcSelf!(id, "decimalNumberByRaisingToPower:withBehavior:", NSUInteger, INSDecimalNumberBehaviors)(power, behaviorreturn result is this.objcObject ? this : (result !is null ? new NSDecimalNumber(result) : null);	}
+		id result = invokeObjcSelf!(id, "decimalNumberByRaisingToPower:withBehavior:", NSUInteger, INSDecimalNumberBehaviors)(power, behavior);
+		return result is this.objcObject ? this : (result !is null ? new NSDecimalNumber(result) : null);
+	}
 
 	NSDecimalNumber decimalNumberByMultiplyingByPowerOf10 (short power)
 	{
-		id result = invokeObjcSelf!(id, "decimalNumberByMultiplyingByPowerOf10:", short)(powerreturn result is this.objcObject ? this : (result !is null ? new NSDecimalNumber(result) : null);	}
+		id result = invokeObjcSelf!(id, "decimalNumberByMultiplyingByPowerOf10:", short)(power);
+		return result is this.objcObject ? this : (result !is null ? new NSDecimalNumber(result) : null);
+	}
 
 	NSDecimalNumber decimalNumberByMultiplyingByPowerOf10 (short power, INSDecimalNumberBehaviors behavior)
 	{
-		id result = invokeObjcSelf!(id, "decimalNumberByMultiplyingByPowerOf10:withBehavior:", short, INSDecimalNumberBehaviors)(power, behaviorreturn result is this.objcObject ? this : (result !is null ? new NSDecimalNumber(result) : null);	}
+		id result = invokeObjcSelf!(id, "decimalNumberByMultiplyingByPowerOf10:withBehavior:", short, INSDecimalNumberBehaviors)(power, behavior);
+		return result is this.objcObject ? this : (result !is null ? new NSDecimalNumber(result) : null);
+	}
 
 	NSDecimalNumber decimalNumberByRoundingAccordingToBehavior (INSDecimalNumberBehaviors behavior)
 	{
-		id result = invokeObjcSelf!(id, "decimalNumberByRoundingAccordingToBehavior:", INSDecimalNumberBehaviors)(behaviorreturn result is this.objcObject ? this : (result !is null ? new NSDecimalNumber(result) : null);	}
+		id result = invokeObjcSelf!(id, "decimalNumberByRoundingAccordingToBehavior:", INSDecimalNumberBehaviors)(behavior);
+		return result is this.objcObject ? this : (result !is null ? new NSDecimalNumber(result) : null);
+	}
 
 	int compare (NSNumber decimalNumber)
 	{
--- a/dstep/foundation/NSDistantObject.d	Mon Aug 03 15:23:15 2009 +0200
+++ b/dstep/foundation/NSDistantObject.d	Mon Aug 03 15:31:48 2009 +0200
@@ -19,7 +19,8 @@
 
 	static NSDistantObject proxyWithTarget (Object target, NSConnection connection)
 	{
-		return invokeObjcSelfClass!(NSDistantObject, "proxyWithTarget:connection:", Object, NSConnection)(target, connectionreturn result is this.objcObject ? this : (result !is null ? new NSDistantObject(result) : null);	}
+		return invokeObjcSelfClass!(NSDistantObject, "proxyWithTarget:connection:", Object, NSConnection)(target, connection);
+	}
 
 	Object initWithTarget (Object target, NSConnection connection)
 	{
@@ -39,7 +40,8 @@
 
 	static NSDistantObject proxyWithLocal (Object target, NSConnection connection)
 	{
-		return invokeObjcSelfClass!(NSDistantObject, "proxyWithLocal:connection:", Object, NSConnection)(target, connectionreturn result is this.objcObject ? this : (result !is null ? new NSDistantObject(result) : null);	}
+		return invokeObjcSelfClass!(NSDistantObject, "proxyWithLocal:connection:", Object, NSConnection)(target, connection);
+	}
 
 	Object initWithLocal (Object target, NSConnection connection)
 	{
--- a/dstep/foundation/NSDistributedLock.d	Mon Aug 03 15:23:15 2009 +0200
+++ b/dstep/foundation/NSDistributedLock.d	Mon Aug 03 15:31:48 2009 +0200
@@ -17,7 +17,8 @@
 
 	static NSDistributedLock lockWithPath (NSString path)
 	{
-		return invokeObjcSelfClass!(NSDistributedLock, "lockWithPath:", NSString)(pathreturn result is this.objcObject ? this : (result !is null ? new NSDistributedLock(result) : null);	}
+		return invokeObjcSelfClass!(NSDistributedLock, "lockWithPath:", NSString)(path);
+	}
 
 	Object initWithPath (NSString path)
 	{
--- a/dstep/foundation/NSDistributedNotificationCenter.d	Mon Aug 03 15:23:15 2009 +0200
+++ b/dstep/foundation/NSDistributedNotificationCenter.d	Mon Aug 03 15:31:48 2009 +0200
@@ -43,7 +43,8 @@
 
 	static NSDistributedNotificationCenter notificationCenterForType (NSString notificationCenterType)
 	{
-		return invokeObjcSelfClass!(NSDistributedNotificationCenter, "notificationCenterForType:", NSString)(notificationCenterTypereturn result is this.objcObject ? this : (result !is null ? new NSDistributedNotificationCenter(result) : null);	}
+		return invokeObjcSelfClass!(NSDistributedNotificationCenter, "notificationCenterForType:", NSString)(notificationCenterType);
+	}
 
 	static Object defaultCenter ()
 	{
--- a/dstep/foundation/NSException.d	Mon Aug 03 15:23:15 2009 +0200
+++ b/dstep/foundation/NSException.d	Mon Aug 03 15:31:48 2009 +0200
@@ -62,7 +62,8 @@
 
 	static NSAssertionHandler currentHandler ()
 	{
-		return invokeObjcSelfClass!(NSAssertionHandler, "currentHandler"return result is this.objcObject ? this : (result !is null ? new NSAssertionHandler(result) : null);	}
+		return invokeObjcSelfClass!(NSAssertionHandler, "currentHandler");
+	}
 
 	void handleFailureInMethod (SEL selector, Object object, NSString fileName, NSInteger line, NSString description, ...)
 	{
@@ -82,7 +83,8 @@
 
 	static NSException exceptionWithName (NSString name, NSString reason, NSDictionary userInfo)
 	{
-		return invokeObjcSelfClass!(NSException, "exceptionWithName:reason:userInfo:", NSString, NSString, NSDictionary)(name, reason, userInforeturn result is this.objcObject ? this : (result !is null ? new NSException(result) : null);	}
+		return invokeObjcSelfClass!(NSException, "exceptionWithName:reason:userInfo:", NSString, NSString, NSDictionary)(name, reason, userInfo);
+	}
 
 	Object initWithName (NSString aName, NSString aReason, NSDictionary aUserInfo)
 	{
--- a/dstep/foundation/NSExpression.d	Mon Aug 03 15:23:15 2009 +0200
+++ b/dstep/foundation/NSExpression.d	Mon Aug 03 15:31:48 2009 +0200
@@ -36,47 +36,58 @@
 
 	static NSExpression expressionForConstantValue (Object obj)
 	{
-		return invokeObjcSelfClass!(NSExpression, "expressionForConstantValue:", Object)(objreturn result is this.objcObject ? this : (result !is null ? new NSExpression(result) : null);	}
+		return invokeObjcSelfClass!(NSExpression, "expressionForConstantValue:", Object)(obj);
+	}
 
 	static NSExpression expressionForEvaluatedObject ()
 	{
-		return invokeObjcSelfClass!(NSExpression, "expressionForEvaluatedObject"return result is this.objcObject ? this : (result !is null ? new NSExpression(result) : null);	}
+		return invokeObjcSelfClass!(NSExpression, "expressionForEvaluatedObject");
+	}
 
 	static NSExpression expressionForVariable (NSString string)
 	{
-		return invokeObjcSelfClass!(NSExpression, "expressionForVariable:", NSString)(stringreturn result is this.objcObject ? this : (result !is null ? new NSExpression(result) : null);	}
+		return invokeObjcSelfClass!(NSExpression, "expressionForVariable:", NSString)(string);
+	}
 
 	static NSExpression expressionForKeyPath (NSString keyPath)
 	{
-		return invokeObjcSelfClass!(NSExpression, "expressionForKeyPath:", NSString)(keyPathreturn result is this.objcObject ? this : (result !is null ? new NSExpression(result) : null);	}
+		return invokeObjcSelfClass!(NSExpression, "expressionForKeyPath:", NSString)(keyPath);
+	}
 
 	static NSExpression expressionForFunction (NSString name, NSArray parameters)
 	{
-		return invokeObjcSelfClass!(NSExpression, "expressionForFunction:arguments:", NSString, NSArray)(name, parametersreturn result is this.objcObject ? this : (result !is null ? new NSExpression(result) : null);	}
+		return invokeObjcSelfClass!(NSExpression, "expressionForFunction:arguments:", NSString, NSArray)(name, parameters);
+	}
 
 	static NSExpression expressionForAggregate (NSArray subexpressions)
 	{
-		return invokeObjcSelfClass!(NSExpression, "expressionForAggregate:", NSArray)(subexpressionsreturn result is this.objcObject ? this : (result !is null ? new NSExpression(result) : null);	}
+		return invokeObjcSelfClass!(NSExpression, "expressionForAggregate:", NSArray)(subexpressions);
+	}
 
 	static NSExpression expressionForUnionSet (NSExpression left, NSExpression right)
 	{
-		return invokeObjcSelfClass!(NSExpression, "expressionForUnionSet:with:", NSExpression, NSExpression)(left, rightreturn result is this.objcObject ? this : (result !is null ? new NSExpression(result) : null);	}
+		return invokeObjcSelfClass!(NSExpression, "expressionForUnionSet:with:", NSExpression, NSExpression)(left, right);
+	}
 
 	static NSExpression expressionForIntersectSet (NSExpression left, NSExpression right)
 	{
-		return invokeObjcSelfClass!(NSExpression, "expressionForIntersectSet:with:", NSExpression, NSExpression)(left, rightreturn result is this.objcObject ? this : (result !is null ? new NSExpression(result) : null);	}
+		return invokeObjcSelfClass!(NSExpression, "expressionForIntersectSet:with:", NSExpression, NSExpression)(left, right);
+	}
 
 	static NSExpression expressionForMinusSet (NSExpression left, NSExpression right)
 	{
-		return invokeObjcSelfClass!(NSExpression, "expressionForMinusSet:with:", NSExpression, NSExpression)(left, rightreturn result is this.objcObject ? this : (result !is null ? new NSExpression(result) : null);	}
+		return invokeObjcSelfClass!(NSExpression, "expressionForMinusSet:with:", NSExpression, NSExpression)(left, right);
+	}
 
 	static NSExpression expressionForSubquery (NSExpression expression, NSString variable, Object predicate)
 	{
-		return invokeObjcSelfClass!(NSExpression, "expressionForSubquery:usingIteratorVariable:predicate:", NSExpression, NSString, Object)(expression, variable, predicatereturn result is this.objcObject ? this : (result !is null ? new NSExpression(result) : null);	}
+		return invokeObjcSelfClass!(NSExpression, "expressionForSubquery:usingIteratorVariable:predicate:", NSExpression, NSString, Object)(expression, variable, predicate);
+	}
 
 	static NSExpression expressionForFunction (NSExpression target, NSString name, NSArray parameters)
 	{
-		return invokeObjcSelfClass!(NSExpression, "expressionForFunction:selectorName:arguments:", NSExpression, NSString, NSArray)(target, name, parametersreturn result is this.objcObject ? this : (result !is null ? new NSExpression(result) : null);	}
+		return invokeObjcSelfClass!(NSExpression, "expressionForFunction:selectorName:arguments:", NSExpression, NSString, NSArray)(target, name, parameters);
+	}
 
 	Object initWithExpressionType (uint type)
 	{
@@ -121,7 +132,9 @@
 
 	NSExpression operand ()
 	{
-		id result = invokeObjcSelf!(id, "operand"return result is this.objcObject ? this : (result !is null ? new NSExpression(result) : null);	}
+		id result = invokeObjcSelf!(id, "operand");
+		return result is this.objcObject ? this : (result !is null ? new NSExpression(result) : null);
+	}
 
 	NSArray arguments ()
 	{
@@ -140,11 +153,15 @@
 
 	NSExpression leftExpression ()
 	{
-		id result = invokeObjcSelf!(id, "leftExpression"return result is this.objcObject ? this : (result !is null ? new NSExpression(result) : null);	}
+		id result = invokeObjcSelf!(id, "leftExpression");
+		return result is this.objcObject ? this : (result !is null ? new NSExpression(result) : null);
+	}
 
 	NSExpression rightExpression ()
 	{
-		id result = invokeObjcSelf!(id, "rightExpression"return result is this.objcObject ? this : (result !is null ? new NSExpression(result) : null);	}
+		id result = invokeObjcSelf!(id, "rightExpression");
+		return result is this.objcObject ? this : (result !is null ? new NSExpression(result) : null);
+	}
 
 	Object expressionValueWithObject (Object object, NSMutableDictionary context)
 	{
--- a/dstep/foundation/NSFileManager.d	Mon Aug 03 15:23:15 2009 +0200
+++ b/dstep/foundation/NSFileManager.d	Mon Aug 03 15:31:48 2009 +0200
@@ -92,7 +92,8 @@
 
 	static NSFileManager defaultManager ()
 	{
-		return invokeObjcSelfClass!(NSFileManager, "defaultManager"return result is this.objcObject ? this : (result !is null ? new NSFileManager(result) : null);	}
+		return invokeObjcSelfClass!(NSFileManager, "defaultManager");
+	}
 
 	void setDelegate (Object delegate_)
 	{
--- a/dstep/foundation/NSHTTPCookieStorage.d	Mon Aug 03 15:23:15 2009 +0200
+++ b/dstep/foundation/NSHTTPCookieStorage.d	Mon Aug 03 15:31:48 2009 +0200
@@ -41,7 +41,8 @@
 
 	static NSHTTPCookieStorage sharedHTTPCookieStorage ()
 	{
-		return invokeObjcSelfClass!(NSHTTPCookieStorage, "sharedHTTPCookieStorage"return result is this.objcObject ? this : (result !is null ? new NSHTTPCookieStorage(result) : null);	}
+		return invokeObjcSelfClass!(NSHTTPCookieStorage, "sharedHTTPCookieStorage");
+	}
 
 	NSArray cookies ()
 	{
--- a/dstep/foundation/NSHost.d	Mon Aug 03 15:23:15 2009 +0200
+++ b/dstep/foundation/NSHost.d	Mon Aug 03 15:31:48 2009 +0200
@@ -19,15 +19,18 @@
 
 	static NSHost currentHost ()
 	{
-		return invokeObjcSelfClass!(NSHost, "currentHost"return result is this.objcObject ? this : (result !is null ? new NSHost(result) : null);	}
+		return invokeObjcSelfClass!(NSHost, "currentHost");
+	}
 
 	static NSHost hostWithName (NSString name)
 	{
-		return invokeObjcSelfClass!(NSHost, "hostWithName:", NSString)(namereturn result is this.objcObject ? this : (result !is null ? new NSHost(result) : null);	}
+		return invokeObjcSelfClass!(NSHost, "hostWithName:", NSString)(name);
+	}
 
 	static NSHost hostWithAddress (NSString address)
 	{
-		return invokeObjcSelfClass!(NSHost, "hostWithAddress:", NSString)(addressreturn result is this.objcObject ? this : (result !is null ? new NSHost(result) : null);	}
+		return invokeObjcSelfClass!(NSHost, "hostWithAddress:", NSString)(address);
+	}
 
 	static void setHostCacheEnabled (bool flag)
 	{
--- a/dstep/foundation/NSIndexPath.d	Mon Aug 03 15:23:15 2009 +0200
+++ b/dstep/foundation/NSIndexPath.d	Mon Aug 03 15:31:48 2009 +0200
@@ -58,11 +58,15 @@
 
 	NSIndexPath indexPathByAddingIndex (NSUInteger index)
 	{
-		id result = invokeObjcSelf!(id, "indexPathByAddingIndex:", NSUInteger)(indexreturn result is this.objcObject ? this : (result !is null ? new NSIndexPath(result) : null);	}
+		id result = invokeObjcSelf!(id, "indexPathByAddingIndex:", NSUInteger)(index);
+		return result is this.objcObject ? this : (result !is null ? new NSIndexPath(result) : null);
+	}
 
 	NSIndexPath indexPathByRemovingLastIndex ()
 	{
-		id result = invokeObjcSelf!(id, "indexPathByRemovingLastIndex"return result is this.objcObject ? this : (result !is null ? new NSIndexPath(result) : null);	}
+		id result = invokeObjcSelf!(id, "indexPathByRemovingLastIndex");
+		return result is this.objcObject ? this : (result !is null ? new NSIndexPath(result) : null);
+	}
 
 	NSUInteger indexAtPosition (NSUInteger position)
 	{
--- a/dstep/foundation/NSInvocation.d	Mon Aug 03 15:23:15 2009 +0200
+++ b/dstep/foundation/NSInvocation.d	Mon Aug 03 15:31:48 2009 +0200
@@ -18,7 +18,8 @@
 
 	static NSInvocation invocationWithMethodSignature (NSMethodSignature sig)
 	{
-		return invokeObjcSelfClass!(NSInvocation, "invocationWithMethodSignature:", NSMethodSignature)(sigreturn result is this.objcObject ? this : (result !is null ? new NSInvocation(result) : null);	}
+		return invokeObjcSelfClass!(NSInvocation, "invocationWithMethodSignature:", NSMethodSignature)(sig);
+	}
 
 	NSMethodSignature methodSignature ()
 	{
--- a/dstep/foundation/NSMethodSignature.d	Mon Aug 03 15:23:15 2009 +0200
+++ b/dstep/foundation/NSMethodSignature.d	Mon Aug 03 15:31:48 2009 +0200
@@ -16,7 +16,8 @@
 
 	static NSMethodSignature signatureWithObjCTypes (char* types)
 	{
-		return invokeObjcSelfClass!(NSMethodSignature, "signatureWithObjCTypes:", char*)(typesreturn result is this.objcObject ? this : (result !is null ? new NSMethodSignature(result) : null);	}
+		return invokeObjcSelfClass!(NSMethodSignature, "signatureWithObjCTypes:", char*)(types);
+	}
 
 	NSUInteger numberOfArguments ()
 	{
--- a/dstep/foundation/NSNull.d	Mon Aug 03 15:23:15 2009 +0200
+++ b/dstep/foundation/NSNull.d	Mon Aug 03 15:31:48 2009 +0200
@@ -16,7 +16,8 @@
 
 	static NSNull null_ ()
 	{
-		return invokeObjcSelfClass!(NSNull, "null"return result is this.objcObject ? this : (result !is null ? new NSNull(result) : null);	}
+		return invokeObjcSelfClass!(NSNull, "null");
+	}
 
 	Object copyWithZone (NSZone* zone)
 	{
--- a/dstep/foundation/NSPort.d	Mon Aug 03 15:23:15 2009 +0200
+++ b/dstep/foundation/NSPort.d	Mon Aug 03 15:31:48 2009 +0200
@@ -45,7 +45,8 @@
 
 	static NSPort port ()
 	{
-		return invokeObjcSelfClass!(NSPort, "port"return result is this.objcObject ? this : (result !is null ? new NSPort(result) : null);	}
+		return invokeObjcSelfClass!(NSPort, "port");
+	}
 
 	void invalidate ()
 	{
--- a/dstep/foundation/NSPortNameServer.d	Mon Aug 03 15:23:15 2009 +0200
+++ b/dstep/foundation/NSPortNameServer.d	Mon Aug 03 15:31:48 2009 +0200
@@ -18,7 +18,8 @@
 
 	static NSPortNameServer systemDefaultPortNameServer ()
 	{
-		return invokeObjcSelfClass!(NSPortNameServer, "systemDefaultPortNameServer"return result is this.objcObject ? this : (result !is null ? new NSPortNameServer(result) : null);	}
+		return invokeObjcSelfClass!(NSPortNameServer, "systemDefaultPortNameServer");
+	}
 
 	NSPort portForName (NSString name)
 	{
--- a/dstep/foundation/NSPredicate.d	Mon Aug 03 15:23:15 2009 +0200
+++ b/dstep/foundation/NSPredicate.d	Mon Aug 03 15:31:48 2009 +0200
@@ -18,19 +18,23 @@
 
 	static NSPredicate predicateWithFormat (NSString predicateFormat, NSArray arguments)
 	{
-		return invokeObjcSelfClass!(NSPredicate, "predicateWithFormat:argumentArray:", NSString, NSArray)(predicateFormat, argumentsreturn result is this.objcObject ? this : (result !is null ? new NSPredicate(result) : null);	}
+		return invokeObjcSelfClass!(NSPredicate, "predicateWithFormat:argumentArray:", NSString, NSArray)(predicateFormat, arguments);
+	}
 
 	static NSPredicate predicateWithFormat (NSString predicateWithFormat, ...)
 	{
-		return invokeObjcSelfClass!(NSPredicate, "predicateWithFormat:", NSString)(predicateWithFormatreturn result is this.objcObject ? this : (result !is null ? new NSPredicate(result) : null);	}
+		return invokeObjcSelfClass!(NSPredicate, "predicateWithFormat:", NSString)(predicateWithFormat);
+	}
 
 	static NSPredicate predicateWithFormat (NSString predicateFormat, char* argList)
 	{
-		return invokeObjcSelfClass!(NSPredicate, "predicateWithFormat:arguments:", NSString, char*)(predicateFormat, argListreturn result is this.objcObject ? this : (result !is null ? new NSPredicate(result) : null);	}
+		return invokeObjcSelfClass!(NSPredicate, "predicateWithFormat:arguments:", NSString, char*)(predicateFormat, argList);
+	}
 
 	static NSPredicate predicateWithValue (bool value)
 	{
-		return invokeObjcSelfClass!(NSPredicate, "predicateWithValue:", bool)(valuereturn result is this.objcObject ? this : (result !is null ? new NSPredicate(result) : null);	}
+		return invokeObjcSelfClass!(NSPredicate, "predicateWithValue:", bool)(value);
+	}
 
 	NSString predicateFormat ()
 	{
@@ -39,7 +43,9 @@
 
 	NSPredicate predicateWithSubstitutionVariables (NSDictionary variables)
 	{
-		id result = invokeObjcSelf!(id, "predicateWithSubstitutionVariables:", NSDictionary)(variablesreturn result is this.objcObject ? this : (result !is null ? new NSPredicate(result) : null);	}
+		id result = invokeObjcSelf!(id, "predicateWithSubstitutionVariables:", NSDictionary)(variables);
+		return result is this.objcObject ? this : (result !is null ? new NSPredicate(result) : null);
+	}
 
 	bool evaluateWithObject (Object object)
 	{
--- a/dstep/foundation/NSProcessInfo.d	Mon Aug 03 15:23:15 2009 +0200
+++ b/dstep/foundation/NSProcessInfo.d	Mon Aug 03 15:31:48 2009 +0200
@@ -30,7 +30,8 @@
 
 	static NSProcessInfo processInfo ()
 	{
-		return invokeObjcSelfClass!(NSProcessInfo, "processInfo"return result is this.objcObject ? this : (result !is null ? new NSProcessInfo(result) : null);	}
+		return invokeObjcSelfClass!(NSProcessInfo, "processInfo");
+	}
 
 	NSDictionary environment ()
 	{
--- a/dstep/foundation/NSRunLoop.d	Mon Aug 03 15:23:15 2009 +0200
+++ b/dstep/foundation/NSRunLoop.d	Mon Aug 03 15:31:48 2009 +0200
@@ -34,11 +34,13 @@
 
 	static NSRunLoop currentRunLoop ()
 	{
-		return invokeObjcSelfClass!(NSRunLoop, "currentRunLoop"return result is this.objcObject ? this : (result !is null ? new NSRunLoop(result) : null);	}
+		return invokeObjcSelfClass!(NSRunLoop, "currentRunLoop");
+	}
 
 	static NSRunLoop mainRunLoop ()
 	{
-		return invokeObjcSelfClass!(NSRunLoop, "mainRunLoop"return result is this.objcObject ? this : (result !is null ? new NSRunLoop(result) : null);	}
+		return invokeObjcSelfClass!(NSRunLoop, "mainRunLoop");
+	}
 
 	NSString currentMode ()
 	{
--- a/dstep/foundation/NSScriptClassDescription.d	Mon Aug 03 15:23:15 2009 +0200
+++ b/dstep/foundation/NSScriptClassDescription.d	Mon Aug 03 15:31:48 2009 +0200
@@ -17,7 +17,8 @@
 
 	static NSScriptClassDescription classDescriptionForClass (Class aClass)
 	{
-		return invokeObjcSelfClass!(NSScriptClassDescription, "classDescriptionForClass:", Class)(aClassreturn result is this.objcObject ? this : (result !is null ? new NSScriptClassDescription(result) : null);	}
+		return invokeObjcSelfClass!(NSScriptClassDescription, "classDescriptionForClass:", Class)(aClass);
+	}
 
 	Object initWithSuiteName (NSString suiteName, NSString className, NSDictionary classDeclaration)
 	{
@@ -52,7 +53,9 @@
 
 	NSScriptClassDescription superclassDescription ()
 	{
-		id result = invokeObjcSelf!(id, "superclassDescription"return result is this.objcObject ? this : (result !is null ? new NSScriptClassDescription(result) : null);	}
+		id result = invokeObjcSelf!(id, "superclassDescription");
+		return result is this.objcObject ? this : (result !is null ? new NSScriptClassDescription(result) : null);
+	}
 
 	uint appleEventCode ()
 	{
@@ -81,7 +84,9 @@
 
 	NSScriptClassDescription classDescriptionForKey (NSString key)
 	{
-		id result = invokeObjcSelf!(id, "classDescriptionForKey:", NSString)(keyreturn result is this.objcObject ? this : (result !is null ? new NSScriptClassDescription(result) : null);	}
+		id result = invokeObjcSelf!(id, "classDescriptionForKey:", NSString)(key);
+		return result is this.objcObject ? this : (result !is null ? new NSScriptClassDescription(result) : null);
+	}
 
 	uint appleEventCodeForKey (NSString key)
 	{
--- a/dstep/foundation/NSScriptCoercionHandler.d	Mon Aug 03 15:23:15 2009 +0200
+++ b/dstep/foundation/NSScriptCoercionHandler.d	Mon Aug 03 15:31:48 2009 +0200
@@ -16,7 +16,8 @@
 
 	static NSScriptCoercionHandler sharedCoercionHandler ()
 	{
-		return invokeObjcSelfClass!(NSScriptCoercionHandler, "sharedCoercionHandler"return result is this.objcObject ? this : (result !is null ? new NSScriptCoercionHandler(result) : null);	}
+		return invokeObjcSelfClass!(NSScriptCoercionHandler, "sharedCoercionHandler");
+	}
 
 	Object coerceValue (Object value, Class toClass)
 	{
--- a/dstep/foundation/NSScriptCommand.d	Mon Aug 03 15:23:15 2009 +0200
+++ b/dstep/foundation/NSScriptCommand.d	Mon Aug 03 15:31:48 2009 +0200
@@ -153,7 +153,8 @@
 
 	static NSScriptCommand currentCommand ()
 	{
-		return invokeObjcSelfClass!(NSScriptCommand, "currentCommand"return result is this.objcObject ? this : (result !is null ? new NSScriptCommand(result) : null);	}
+		return invokeObjcSelfClass!(NSScriptCommand, "currentCommand");
+	}
 
 	NSAppleEventDescriptor appleEvent ()
 	{
--- a/dstep/foundation/NSScriptExecutionContext.d	Mon Aug 03 15:23:15 2009 +0200
+++ b/dstep/foundation/NSScriptExecutionContext.d	Mon Aug 03 15:31:48 2009 +0200
@@ -17,7 +17,8 @@
 
 	static NSScriptExecutionContext sharedScriptExecutionContext ()
 	{
-		return invokeObjcSelfClass!(NSScriptExecutionContext, "sharedScriptExecutionContext"return result is this.objcObject ? this : (result !is null ? new NSScriptExecutionContext(result) : null);	}
+		return invokeObjcSelfClass!(NSScriptExecutionContext, "sharedScriptExecutionContext");
+	}
 
 	Object topLevelObject ()
 	{
--- a/dstep/foundation/NSScriptObjectSpecifiers.d	Mon Aug 03 15:23:15 2009 +0200
+++ b/dstep/foundation/NSScriptObjectSpecifiers.d	Mon Aug 03 15:31:48 2009 +0200
@@ -296,7 +296,8 @@
 
 	static NSScriptObjectSpecifier objectSpecifierWithDescriptor (NSAppleEventDescriptor descriptor)
 	{
-		return invokeObjcSelfClass!(NSScriptObjectSpecifier, "objectSpecifierWithDescriptor:", NSAppleEventDescriptor)(descriptorreturn result is this.objcObject ? this : (result !is null ? new NSScriptObjectSpecifier(result) : null);	}
+		return invokeObjcSelfClass!(NSScriptObjectSpecifier, "objectSpecifierWithDescriptor:", NSAppleEventDescriptor)(descriptor);
+	}
 
 	Object initWithContainerSpecifier (NSScriptObjectSpecifier container, NSString property)
 	{
@@ -332,7 +333,9 @@
 
 	NSScriptObjectSpecifier childSpecifier ()
 	{
-		id result = invokeObjcSelf!(id, "childSpecifier"return result is this.objcObject ? this : (result !is null ? new NSScriptObjectSpecifier(result) : null);	}
+		id result = invokeObjcSelf!(id, "childSpecifier");
+		return result is this.objcObject ? this : (result !is null ? new NSScriptObjectSpecifier(result) : null);
+	}
 
 	void setChildSpecifier (NSScriptObjectSpecifier child)
 	{
@@ -341,7 +344,9 @@
 
 	NSScriptObjectSpecifier containerSpecifier ()
 	{
-		id result = invokeObjcSelf!(id, "containerSpecifier"return result is this.objcObject ? this : (result !is null ? new NSScriptObjectSpecifier(result) : null);	}
+		id result = invokeObjcSelf!(id, "containerSpecifier");
+		return result is this.objcObject ? this : (result !is null ? new NSScriptObjectSpecifier(result) : null);
+	}
 
 	void setContainerSpecifier (NSScriptObjectSpecifier subRef)
 	{
@@ -420,7 +425,9 @@
 
 	NSScriptObjectSpecifier evaluationErrorSpecifier ()
 	{
-		id result = invokeObjcSelf!(id, "evaluationErrorSpecifier"return result is this.objcObject ? this : (result !is null ? new NSScriptObjectSpecifier(result) : null);	}
+		id result = invokeObjcSelf!(id, "evaluationErrorSpecifier");
+		return result is this.objcObject ? this : (result !is null ? new NSScriptObjectSpecifier(result) : null);
+	}
 
 	NSAppleEventDescriptor descriptor ()
 	{
--- a/dstep/foundation/NSScriptSuiteRegistry.d	Mon Aug 03 15:23:15 2009 +0200
+++ b/dstep/foundation/NSScriptSuiteRegistry.d	Mon Aug 03 15:31:48 2009 +0200
@@ -25,7 +25,8 @@
 
 	static NSScriptSuiteRegistry sharedScriptSuiteRegistry ()
 	{
-		return invokeObjcSelfClass!(NSScriptSuiteRegistry, "sharedScriptSuiteRegistry"return result is this.objcObject ? this : (result !is null ? new NSScriptSuiteRegistry(result) : null);	}
+		return invokeObjcSelfClass!(NSScriptSuiteRegistry, "sharedScriptSuiteRegistry");
+	}
 
 	static void setSharedScriptSuiteRegistry (NSScriptSuiteRegistry registry)
 	{
--- a/dstep/foundation/NSThread.d	Mon Aug 03 15:23:15 2009 +0200
+++ b/dstep/foundation/NSThread.d	Mon Aug 03 15:31:48 2009 +0200
@@ -32,7 +32,8 @@
 
 	static NSThread currentThread ()
 	{
-		return invokeObjcSelfClass!(NSThread, "currentThread"return result is this.objcObject ? this : (result !is null ? new NSThread(result) : null);	}
+		return invokeObjcSelfClass!(NSThread, "currentThread");
+	}
 
 	static void detachNewThreadSelector (SEL selector, Object target, Object argument)
 	{
@@ -111,7 +112,8 @@
 
 	static NSThread mainThread ()
 	{
-		return invokeObjcSelfClass!(NSThread, "mainThread"return result is this.objcObject ? this : (result !is null ? new NSThread(result) : null);	}
+		return invokeObjcSelfClass!(NSThread, "mainThread");
+	}
 
 	Object init ()
 	{
--- a/dstep/foundation/NSTimer.d	Mon Aug 03 15:23:15 2009 +0200
+++ b/dstep/foundation/NSTimer.d	Mon Aug 03 15:31:48 2009 +0200
@@ -17,19 +17,23 @@
 
 	static NSTimer timerWithTimeInterval (double ti, NSInvocation invocation, bool yesOrNo)
 	{
-		return invokeObjcSelfClass!(NSTimer, "timerWithTimeInterval:invocation:repeats:", double, NSInvocation, bool)(ti, invocation, yesOrNoreturn result is this.objcObject ? this : (result !is null ? new NSTimer(result) : null);	}
+		return invokeObjcSelfClass!(NSTimer, "timerWithTimeInterval:invocation:repeats:", double, NSInvocation, bool)(ti, invocation, yesOrNo);
+	}
 
 	static NSTimer scheduledTimerWithTimeInterval (double ti, NSInvocation invocation, bool yesOrNo)
 	{
-		return invokeObjcSelfClass!(NSTimer, "scheduledTimerWithTimeInterval:invocation:repeats:", double, NSInvocation, bool)(ti, invocation, yesOrNoreturn result is this.objcObject ? this : (result !is null ? new NSTimer(result) : null);	}
+		return invokeObjcSelfClass!(NSTimer, "scheduledTimerWithTimeInterval:invocation:repeats:", double, NSInvocation, bool)(ti, invocation, yesOrNo);
+	}
 
 	static NSTimer timerWithTimeInterval (double ti, Object aTarget, SEL aSelector, Object userInfo, bool yesOrNo)
 	{
-		return invokeObjcSelfClass!(NSTimer, "timerWithTimeInterval:target:selector:userInfo:repeats:", double, Object, SEL, Object, bool)(ti, aTarget, aSelector, userInfo, yesOrNoreturn result is this.objcObject ? this : (result !is null ? new NSTimer(result) : null);	}
+		return invokeObjcSelfClass!(NSTimer, "timerWithTimeInterval:target:selector:userInfo:repeats:", double, Object, SEL, Object, bool)(ti, aTarget, aSelector, userInfo, yesOrNo);
+	}
 
 	static NSTimer scheduledTimerWithTimeInterval (double ti, Object aTarget, SEL aSelector, Object userInfo, bool yesOrNo)
 	{
-		return invokeObjcSelfClass!(NSTimer, "scheduledTimerWithTimeInterval:target:selector:userInfo:repeats:", double, Object, SEL, Object, bool)(ti, aTarget, aSelector, userInfo, yesOrNoreturn result is this.objcObject ? this : (result !is null ? new NSTimer(result) : null);	}
+		return invokeObjcSelfClass!(NSTimer, "scheduledTimerWithTimeInterval:target:selector:userInfo:repeats:", double, Object, SEL, Object, bool)(ti, aTarget, aSelector, userInfo, yesOrNo);
+	}
 
 	Object initWithFireDate (NSDate date, double ti, Object t, SEL s, Object ui, bool rep)
 	{
--- a/dstep/foundation/NSURL.d	Mon Aug 03 15:23:15 2009 +0200
+++ b/dstep/foundation/NSURL.d	Mon Aug 03 15:31:48 2009 +0200
@@ -141,11 +141,15 @@
 
 	NSURL baseURL ()
 	{
-		id result = invokeObjcSelf!(id, "baseURL"return result is this.objcObject ? this : (result !is null ? new NSURL(result) : null);	}
+		id result = invokeObjcSelf!(id, "baseURL");
+		return result is this.objcObject ? this : (result !is null ? new NSURL(result) : null);
+	}
 
 	NSURL absoluteURL ()
 	{
-		id result = invokeObjcSelf!(id, "absoluteURL"return result is this.objcObject ? this : (result !is null ? new NSURL(result) : null);	}
+		id result = invokeObjcSelf!(id, "absoluteURL");
+		return result is this.objcObject ? this : (result !is null ? new NSURL(result) : null);
+	}
 
 	NSString scheme ()
 	{
@@ -209,7 +213,9 @@
 
 	NSURL standardizedURL ()
 	{
-		id result = invokeObjcSelf!(id, "standardizedURL"return result is this.objcObject ? this : (result !is null ? new NSURL(result) : null);	}
+		id result = invokeObjcSelf!(id, "standardizedURL");
+		return result is this.objcObject ? this : (result !is null ? new NSURL(result) : null);
+	}
 
 	void encodeWithCoder (NSCoder aCoder)
 	{
--- a/dstep/foundation/NSURLCache.d	Mon Aug 03 15:23:15 2009 +0200
+++ b/dstep/foundation/NSURLCache.d	Mon Aug 03 15:31:48 2009 +0200
@@ -115,7 +115,8 @@
 
 	static NSURLCache sharedURLCache ()
 	{
-		return invokeObjcSelfClass!(NSURLCache, "sharedURLCache"return result is this.objcObject ? this : (result !is null ? new NSURLCache(result) : null);	}
+		return invokeObjcSelfClass!(NSURLCache, "sharedURLCache");
+	}
 
 	static void setSharedURLCache (NSURLCache cache)
 	{
--- a/dstep/foundation/NSURLConnection.d	Mon Aug 03 15:23:15 2009 +0200
+++ b/dstep/foundation/NSURLConnection.d	Mon Aug 03 15:31:48 2009 +0200
@@ -31,7 +31,8 @@
 
 	static NSURLConnection connectionWithRequest (NSURLRequest request, Object delegate_)
 	{
-		return invokeObjcSelfClass!(NSURLConnection, "connectionWithRequest:delegate:", NSURLRequest, Object)(request, delegate_return result is this.objcObject ? this : (result !is null ? new NSURLConnection(result) : null);	}
+		return invokeObjcSelfClass!(NSURLConnection, "connectionWithRequest:delegate:", NSURLRequest, Object)(request, delegate_);
+	}
 
 	Object initWithRequest (NSURLRequest request, Object delegate_)
 	{
--- a/dstep/foundation/NSURLCredential.d	Mon Aug 03 15:23:15 2009 +0200
+++ b/dstep/foundation/NSURLCredential.d	Mon Aug 03 15:31:48 2009 +0200
@@ -44,7 +44,8 @@
 
 	static NSURLCredential credentialWithUser (NSString user, NSString password, uint persistence)
 	{
-		return invokeObjcSelfClass!(NSURLCredential, "credentialWithUser:password:persistence:", NSString, NSString, uint)(user, password, persistencereturn result is this.objcObject ? this : (result !is null ? new NSURLCredential(result) : null);	}
+		return invokeObjcSelfClass!(NSURLCredential, "credentialWithUser:password:persistence:", NSString, NSString, uint)(user, password, persistence);
+	}
 
 	NSString user ()
 	{
--- a/dstep/foundation/NSURLCredentialStorage.d	Mon Aug 03 15:23:15 2009 +0200
+++ b/dstep/foundation/NSURLCredentialStorage.d	Mon Aug 03 15:31:48 2009 +0200
@@ -31,7 +31,8 @@
 
 	static NSURLCredentialStorage sharedCredentialStorage ()
 	{
-		return invokeObjcSelfClass!(NSURLCredentialStorage, "sharedCredentialStorage"return result is this.objcObject ? this : (result !is null ? new NSURLCredentialStorage(result) : null);	}
+		return invokeObjcSelfClass!(NSURLCredentialStorage, "sharedCredentialStorage");
+	}
 
 	NSDictionary credentialsForProtectionSpace (NSURLProtectionSpace space)
 	{
--- a/dstep/foundation/NSURLHandle.d	Mon Aug 03 15:23:15 2009 +0200
+++ b/dstep/foundation/NSURLHandle.d	Mon Aug 03 15:31:48 2009 +0200
@@ -101,7 +101,8 @@
 
 	static NSURLHandle cachedHandleForURL (NSURL anURL)
 	{
-		return invokeObjcSelfClass!(NSURLHandle, "cachedHandleForURL:", NSURL)(anURLreturn result is this.objcObject ? this : (result !is null ? new NSURLHandle(result) : null);	}
+		return invokeObjcSelfClass!(NSURLHandle, "cachedHandleForURL:", NSURL)(anURL);
+	}
 
 	Object initWithURL (NSURL anURL, bool willCache)
 	{
--- a/dstep/foundation/NSUserDefaults.d	Mon Aug 03 15:23:15 2009 +0200
+++ b/dstep/foundation/NSUserDefaults.d	Mon Aug 03 15:31:48 2009 +0200
@@ -36,7 +36,8 @@
 
 	static NSUserDefaults standardUserDefaults ()
 	{
-		return invokeObjcSelfClass!(NSUserDefaults, "standardUserDefaults"return result is this.objcObject ? this : (result !is null ? new NSUserDefaults(result) : null);	}
+		return invokeObjcSelfClass!(NSUserDefaults, "standardUserDefaults");
+	}
 
 	static void resetStandardUserDefaults ()
 	{
--- a/dstep/foundation/NSValueTransformer.d	Mon Aug 03 15:23:15 2009 +0200
+++ b/dstep/foundation/NSValueTransformer.d	Mon Aug 03 15:31:48 2009 +0200
@@ -40,7 +40,8 @@
 
 	static NSValueTransformer valueTransformerForName (NSString name)
 	{
-		return invokeObjcSelfClass!(NSValueTransformer, "valueTransformerForName:", NSString)(namereturn result is this.objcObject ? this : (result !is null ? new NSValueTransformer(result) : null);	}
+		return invokeObjcSelfClass!(NSValueTransformer, "valueTransformerForName:", NSString)(name);
+	}
 
 	static NSArray valueTransformerNames ()
 	{
--- a/dstep/foundation/NSXMLNode.d	Mon Aug 03 15:23:15 2009 +0200
+++ b/dstep/foundation/NSXMLNode.d	Mon Aug 03 15:31:48 2009 +0200
@@ -195,7 +195,9 @@
 
 	NSXMLNode parent ()
 	{
-		id result = invokeObjcSelf!(id, "parent"return result is this.objcObject ? this : (result !is null ? new NSXMLNode(result) : null);	}
+		id result = invokeObjcSelf!(id, "parent");
+		return result is this.objcObject ? this : (result !is null ? new NSXMLNode(result) : null);
+	}
 
 	NSUInteger childCount ()
 	{
@@ -209,23 +211,33 @@
 
 	NSXMLNode childAtIndex (NSUInteger index)
 	{
-		id result = invokeObjcSelf!(id, "childAtIndex:", NSUInteger)(indexreturn result is this.objcObject ? this : (result !is null ? new NSXMLNode(result) : null);	}
+		id result = invokeObjcSelf!(id, "childAtIndex:", NSUInteger)(index);
+		return result is this.objcObject ? this : (result !is null ? new NSXMLNode(result) : null);
+	}
 
 	NSXMLNode previousSibling ()
 	{
-		id result = invokeObjcSelf!(id, "previousSibling"return result is this.objcObject ? this : (result !is null ? new NSXMLNode(result) : null);	}
+		id result = invokeObjcSelf!(id, "previousSibling");
+		return result is this.objcObject ? this : (result !is null ? new NSXMLNode(result) : null);
+	}
 
 	NSXMLNode nextSibling ()
 	{
-		id result = invokeObjcSelf!(id, "nextSibling"return result is this.objcObject ? this : (result !is null ? new NSXMLNode(result) : null);	}
+		id result = invokeObjcSelf!(id, "nextSibling");
+		return result is this.objcObject ? this : (result !is null ? new NSXMLNode(result) : null);
+	}
 
 	NSXMLNode previousNode ()
 	{
-		id result = invokeObjcSelf!(id, "previousNode"return result is this.objcObject ? this : (result !is null ? new NSXMLNode(result) : null);	}
+		id result = invokeObjcSelf!(id, "previousNode");
+		return result is this.objcObject ? this : (result !is null ? new NSXMLNode(result) : null);
+	}
 
 	NSXMLNode nextNode ()
 	{
-		id result = invokeObjcSelf!(id, "nextNode"return result is this.objcObject ? this : (result !is null ? new NSXMLNode(result) : null);	}
+		id result = invokeObjcSelf!(id, "nextNode");
+		return result is this.objcObject ? this : (result !is null ? new NSXMLNode(result) : null);
+	}
 
 	void detach ()
 	{
@@ -269,7 +281,8 @@
 
 	static NSXMLNode predefinedNamespaceForPrefix (NSString name)
 	{
-		return invokeObjcSelfClass!(NSXMLNode, "predefinedNamespaceForPrefix:", NSString)(namereturn result is this.objcObject ? this : (result !is null ? new NSXMLNode(result) : null);	}
+		return invokeObjcSelfClass!(NSXMLNode, "predefinedNamespaceForPrefix:", NSString)(name);
+	}
 
 	NSString description ()
 	{
--- a/scripts/dgen.rb	Mon Aug 03 15:23:15 2009 +0200
+++ b/scripts/dgen.rb	Mon Aug 03 15:31:48 2009 +0200
@@ -1137,12 +1137,8 @@
 				str << ", " unless i == method.arg.length - 1
 			end unless method.arg.nil?			
 			
-			if return_type == class_name
-				str << "return result is this.objcObject ? this : (result !is null ? new #{return_type}(result) : null);"
-			else
-				str << ")".nl
-			end
-			
+			str << ")".nl
+			str << "return result is this.objcObject ? this : (result !is null ? new #{return_type}(result) : null)".indent(2).nl if return_type == class_name && !static
 			str << "}".indent.nl(false).nl(false)
 			
 			if name.length >= 4 && name[0 ... 4] == "init" && name != "initialize"