comparison dwt/internal/cocoa/NSError.d @ 1:8b48be5454ce

The internal cocoa classes compile now
author Jacob Carlborg <doob@me.com> <jacob.carlborg@gmail.com>
date Tue, 19 Aug 2008 17:35:17 +0200
parents 380af2bdd8e5
children f565d3a95c0a
comparison
equal deleted inserted replaced
0:380af2bdd8e5 1:8b48be5454ce
35 super(id); 35 super(id);
36 } 36 }
37 37
38 public NSInteger code () 38 public NSInteger code ()
39 { 39 {
40 return OS.objc_msgSend(this.id, OS.sel_code); 40 return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_code);
41 } 41 }
42 42
43 public NSString domain () 43 public NSString domain ()
44 { 44 {
45 objc.id result = OS.objc_msgSend(this.id, OS.sel_domain); 45 objc.id result = OS.objc_msgSend(this.id_, OS.sel_domain);
46 return result !is null ? new NSString(result) : null; 46 return result !is null ? new NSString(result) : null;
47 } 47 }
48 48
49 public static id errorWithDomain (NSString domain, NSInteger code, NSDictionary dict) 49 public static id errorWithDomain (NSString domain, NSInteger code, NSDictionary dict)
50 { 50 {
51 objc.id result = OS.objc_msgSend(OS.class_NSError, OS.sel_errorWithDomain_1code_1userInfo_1, domain !is null ? domain.id : null, code, 51 objc.id result = OS.objc_msgSend(OS.class_NSError, OS.sel_errorWithDomain_1code_1userInfo_1, domain !is null ? domain.id_ : null, code,
52 dict !is null ? dict.id : null); 52 dict !is null ? dict.id_ : null);
53 return result !is null ? new id(result) : null; 53 return result !is null ? new id(result) : null;
54 } 54 }
55 55
56 public id initWithDomain (NSString domain, NSInteger code, NSDictionary dict) 56 public id initWithDomain (NSString domain, NSInteger code, NSDictionary dict)
57 { 57 {
58 objc.id result = OS.objc_msgSend(this.id, OS.sel_initWithDomain_1code_1userInfo_1, domain !is null ? domain.id : null, code, 58 objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithDomain_1code_1userInfo_1, domain !is null ? domain.id_ : null, code,
59 dict !is null ? dict.id : null); 59 dict !is null ? dict.id_ : null);
60 return result !is null ? new id(result) : null; 60 return result !is null ? new id(result) : null;
61 } 61 }
62 62
63 public NSString localizedDescription () 63 public NSString localizedDescription ()
64 { 64 {
65 objc.id result = OS.objc_msgSend(this.id, OS.sel_localizedDescription); 65 objc.id result = OS.objc_msgSend(this.id_, OS.sel_localizedDescription);
66 return result !is null ? new NSString(result) : null; 66 return result !is null ? new NSString(result) : null;
67 } 67 }
68 68
69 public NSString localizedFailureReason () 69 public NSString localizedFailureReason ()
70 { 70 {
71 objc.id result = OS.objc_msgSend(this.id, OS.sel_localizedFailureReason); 71 objc.id result = OS.objc_msgSend(this.id_, OS.sel_localizedFailureReason);
72 return result !is null ? new NSString(result) : null; 72 return result !is null ? new NSString(result) : null;
73 } 73 }
74 74
75 public NSArray localizedRecoveryOptions () 75 public NSArray localizedRecoveryOptions ()
76 { 76 {
77 objc.id result = OS.objc_msgSend(this.id, OS.sel_localizedRecoveryOptions); 77 objc.id result = OS.objc_msgSend(this.id_, OS.sel_localizedRecoveryOptions);
78 return result !is null ? new NSArray(result) : null; 78 return result !is null ? new NSArray(result) : null;
79 } 79 }
80 80
81 public NSString localizedRecoverySuggestion () 81 public NSString localizedRecoverySuggestion ()
82 { 82 {
83 objc.id result = OS.objc_msgSend(this.id, OS.sel_localizedRecoverySuggestion); 83 objc.id result = OS.objc_msgSend(this.id_, OS.sel_localizedRecoverySuggestion);
84 return result !is null ? new NSString(result) : null; 84 return result !is null ? new NSString(result) : null;
85 } 85 }
86 86
87 public id recoveryAttempter () 87 public id recoveryAttempter ()
88 { 88 {
89 objc.id result = OS.objc_msgSend(this.id, OS.sel_recoveryAttempter); 89 objc.id result = OS.objc_msgSend(this.id_, OS.sel_recoveryAttempter);
90 return result !is null ? new id(result) : null; 90 return result !is null ? new id(result) : null;
91 } 91 }
92 92
93 public NSDictionary userInfo () 93 public NSDictionary userInfo ()
94 { 94 {
95 objc.id result = OS.objc_msgSend(this.id, OS.sel_userInfo); 95 objc.id result = OS.objc_msgSend(this.id_, OS.sel_userInfo);
96 return result !is null ? new NSDictionary(result) : null; 96 return result !is null ? new NSDictionary(result) : null;
97 } 97 }
98 98
99 } 99 }