comparison dstep/foundation/NSBundle.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
comparison
equal deleted inserted replaced
14:89f3c3ef1fd2 15:7ff919f595d5
37 { 37 {
38 mixin ObjcWrap; 38 mixin ObjcWrap;
39 39
40 static NSBundle mainBundle () 40 static NSBundle mainBundle ()
41 { 41 {
42 return invokeObjcSelfClass!(NSBundle, "mainBundle"return result is this.objcObject ? this : (result !is null ? new NSBundle(result) : null); } 42 return invokeObjcSelfClass!(NSBundle, "mainBundle");
43 }
43 44
44 static NSBundle bundleWithPath (NSString path) 45 static NSBundle bundleWithPath (NSString path)
45 { 46 {
46 return invokeObjcSelfClass!(NSBundle, "bundleWithPath:", NSString)(pathreturn result is this.objcObject ? this : (result !is null ? new NSBundle(result) : null); } 47 return invokeObjcSelfClass!(NSBundle, "bundleWithPath:", NSString)(path);
48 }
47 49
48 Object initWithPath (NSString path) 50 Object initWithPath (NSString path)
49 { 51 {
50 return invokeObjcSelf!(Object, "initWithPath:", NSString)(path); 52 return invokeObjcSelf!(Object, "initWithPath:", NSString)(path);
51 } 53 }
61 dObject = this; 63 dObject = this;
62 } 64 }
63 65
64 static NSBundle bundleForClass (Class aClass) 66 static NSBundle bundleForClass (Class aClass)
65 { 67 {
66 return invokeObjcSelfClass!(NSBundle, "bundleForClass:", Class)(aClassreturn result is this.objcObject ? this : (result !is null ? new NSBundle(result) : null); } 68 return invokeObjcSelfClass!(NSBundle, "bundleForClass:", Class)(aClass);
69 }
67 70
68 static NSBundle bundleWithIdentifier (NSString identifier) 71 static NSBundle bundleWithIdentifier (NSString identifier)
69 { 72 {
70 return invokeObjcSelfClass!(NSBundle, "bundleWithIdentifier:", NSString)(identifierreturn result is this.objcObject ? this : (result !is null ? new NSBundle(result) : null); } 73 return invokeObjcSelfClass!(NSBundle, "bundleWithIdentifier:", NSString)(identifier);
74 }
71 75
72 static NSArray allBundles () 76 static NSArray allBundles ()
73 { 77 {
74 return invokeObjcSelfClass!(NSArray, "allBundles"); 78 return invokeObjcSelfClass!(NSArray, "allBundles");
75 } 79 }