Mercurial > projects > dstep
diff dstep/foundation/NSPredicate.d @ 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 |
line wrap: on
line diff
--- 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) {