Mercurial > projects > dwt-mac
comparison dwt/internal/cocoa/NSArray.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 |
---|---|
39 super(id); | 39 super(id); |
40 } | 40 } |
41 | 41 |
42 public void addObserver_forKeyPath_options_context_ (NSObject observer, NSString keyPath, objc.id options, objc.id context) | 42 public void addObserver_forKeyPath_options_context_ (NSObject observer, NSString keyPath, objc.id options, objc.id context) |
43 { | 43 { |
44 OS.objc_msgSend(this.id, OS.sel_addObserver_1forKeyPath_1options_1context_1, observer !is null ? observer.id : null, | 44 OS.objc_msgSend(this.id_, OS.sel_addObserver_1forKeyPath_1options_1context_1, observer !is null ? observer.id_ : null, |
45 keyPath !is null ? keyPath.id : null, options, context); | 45 keyPath !is null ? keyPath.id_ : null, options, context); |
46 } | 46 } |
47 | 47 |
48 public void addObserver_toObjectsAtIndexes_forKeyPath_options_context_ (NSObject observer, NSIndexSet indexes, NSString keyPath, objc.id options, | 48 public void addObserver_toObjectsAtIndexes_forKeyPath_options_context_ (NSObject observer, NSIndexSet indexes, NSString keyPath, objc.id options, |
49 objc.id context) | 49 objc.id context) |
50 { | 50 { |
51 OS.objc_msgSend(this.id, OS.sel_addObserver_1toObjectsAtIndexes_1forKeyPath_1options_1context_1, observer !is null ? observer.id : null, | 51 OS.objc_msgSend(this.id_, OS.sel_addObserver_1toObjectsAtIndexes_1forKeyPath_1options_1context_1, observer !is null ? observer.id_ : null, |
52 indexes !is null ? indexes.id : null, keyPath !is null ? keyPath.id : null, options, context); | 52 indexes !is null ? indexes.id_ : null, keyPath !is null ? keyPath.id_ : null, options, context); |
53 } | 53 } |
54 | 54 |
55 public static id array () | 55 public static id array () |
56 { | 56 { |
57 objc.id result = OS.objc_msgSend(OS.class_NSArray, OS.sel_array); | 57 objc.id result = OS.objc_msgSend(OS.class_NSArray, OS.sel_array); |
58 return result !is null ? new id(result) : null; | 58 return result !is null ? new id(result) : null; |
59 } | 59 } |
60 | 60 |
61 public NSArray arrayByAddingObject (id anObject) | 61 public NSArray arrayByAddingObject (id anObject) |
62 { | 62 { |
63 objc.id result = OS.objc_msgSend(this.id, OS.sel_arrayByAddingObject_1, anObject !is null ? anObject.id : null); | 63 objc.id result = OS.objc_msgSend(this.id_, OS.sel_arrayByAddingObject_1, anObject !is null ? anObject.id_ : null); |
64 return result is this.id ? this : (result !is null ? new NSArray(result) : null); | 64 return result is this.id_ ? this : (result !is null ? new NSArray(result) : null); |
65 } | 65 } |
66 | 66 |
67 public NSArray arrayByAddingObjectsFromArray (NSArray otherArray) | 67 public NSArray arrayByAddingObjectsFromArray (NSArray otherArray) |
68 { | 68 { |
69 objc.id result = OS.objc_msgSend(this.id, OS.sel_arrayByAddingObjectsFromArray_1, otherArray !is null ? otherArray.id : null); | 69 objc.id result = OS.objc_msgSend(this.id_, OS.sel_arrayByAddingObjectsFromArray_1, otherArray !is null ? otherArray.id_ : null); |
70 return result is this.id ? this : (result !is null ? new NSArray(result) : null); | 70 return result is this.id_ ? this : (result !is null ? new NSArray(result) : null); |
71 } | 71 } |
72 | 72 |
73 public static id arrayWithArray (NSArray array) | 73 public static id arrayWithArray (NSArray array) |
74 { | 74 { |
75 objc.id result = OS.objc_msgSend(OS.class_NSArray, OS.sel_arrayWithArray_1, array !is null ? array.id : null); | 75 objc.id result = OS.objc_msgSend(OS.class_NSArray, OS.sel_arrayWithArray_1, array !is null ? array.id_ : null); |
76 return result !is null ? new id(result) : null; | 76 return result !is null ? new id(result) : null; |
77 } | 77 } |
78 | 78 |
79 public static id arrayWithContentsOfFile (NSString path) | 79 public static id arrayWithContentsOfFile (NSString path) |
80 { | 80 { |
81 objc.id result = OS.objc_msgSend(OS.class_NSArray, OS.sel_arrayWithContentsOfFile_1, path !is null ? path.id : null); | 81 objc.id result = OS.objc_msgSend(OS.class_NSArray, OS.sel_arrayWithContentsOfFile_1, path !is null ? path.id_ : null); |
82 return result !is null ? new id(result) : null; | 82 return result !is null ? new id(result) : null; |
83 } | 83 } |
84 | 84 |
85 public static id arrayWithContentsOfURL (NSURL url) | 85 public static id arrayWithContentsOfURL (NSURL url) |
86 { | 86 { |
87 objc.id result = OS.objc_msgSend(OS.class_NSArray, OS.sel_arrayWithContentsOfURL_1, url !is null ? url.id : null); | 87 objc.id result = OS.objc_msgSend(OS.class_NSArray, OS.sel_arrayWithContentsOfURL_1, url !is null ? url.id_ : null); |
88 return result !is null ? new id(result) : null; | 88 return result !is null ? new id(result) : null; |
89 } | 89 } |
90 | 90 |
91 public static id arrayWithObject (id anObject) | 91 public static id arrayWithObject (id anObject) |
92 { | 92 { |
93 objc.id result = OS.objc_msgSend(OS.class_NSArray, OS.sel_arrayWithObject_1, anObject !is null ? anObject.id : null); | 93 objc.id result = OS.objc_msgSend(OS.class_NSArray, OS.sel_arrayWithObject_1, anObject !is null ? anObject.id_ : null); |
94 return result !is null ? new id(result) : null; | 94 return result !is null ? new id(result) : null; |
95 } | 95 } |
96 | 96 |
97 public static id static_arrayWithObjects_ (id arrayWithObjects) | 97 public static id static_arrayWithObjects_ (id arrayWithObjects) |
98 { | 98 { |
99 objc.id result = OS.objc_msgSend(OS.class_NSArray, OS.sel_arrayWithObjects_1, arrayWithObjects !is null ? arrayWithObjects.id : null); | 99 objc.id result = OS.objc_msgSend(OS.class_NSArray, OS.sel_arrayWithObjects_1, arrayWithObjects !is null ? arrayWithObjects.id_ : null); |
100 return result !is null ? new id(result) : null; | 100 return result !is null ? new id(result) : null; |
101 } | 101 } |
102 | 102 |
103 public static id static_arrayWithObjects_count_ (/*const*/objc.id* objects, NSUInteger cnt) | 103 public static id static_arrayWithObjects_count_ (/*const*/objc.id* objects, NSUInteger cnt) |
104 { | 104 { |
106 return result !is null ? new id(result) : null; | 106 return result !is null ? new id(result) : null; |
107 } | 107 } |
108 | 108 |
109 public NSString componentsJoinedByString (NSString separator) | 109 public NSString componentsJoinedByString (NSString separator) |
110 { | 110 { |
111 objc.id result = OS.objc_msgSend(this.id, OS.sel_componentsJoinedByString_1, separator !is null ? separator.id : null); | 111 objc.id result = OS.objc_msgSend(this.id_, OS.sel_componentsJoinedByString_1, separator !is null ? separator.id_ : null); |
112 return result !is null ? new NSString(result) : null; | 112 return result !is null ? new NSString(result) : null; |
113 } | 113 } |
114 | 114 |
115 public bool containsObject (id anObject) | 115 public bool containsObject (id anObject) |
116 { | 116 { |
117 return OS.objc_msgSend(this.id, OS.sel_containsObject_1, anObject !is null ? anObject.id : null) !is null; | 117 return OS.objc_msgSend(this.id_, OS.sel_containsObject_1, anObject !is null ? anObject.id_ : null) !is null; |
118 } | 118 } |
119 | 119 |
120 public NSUInteger count () | 120 public NSUInteger count () |
121 { | 121 { |
122 return OS.objc_msgSend(this.id, OS.sel_count); | 122 return cast(NSUInteger) OS.objc_msgSend(this.id_, OS.sel_count); |
123 } | 123 } |
124 | 124 |
125 public NSString description () | 125 public NSString description () |
126 { | 126 { |
127 objc.id result = OS.objc_msgSend(this.id, OS.sel_description); | 127 objc.id result = OS.objc_msgSend(this.id_, OS.sel_description); |
128 return result !is null ? new NSString(result) : null; | 128 return result !is null ? new NSString(result) : null; |
129 } | 129 } |
130 | 130 |
131 public NSString descriptionWithLocale_ (id locale) | 131 public NSString descriptionWithLocale_ (id locale) |
132 { | 132 { |
133 objc.id result = OS.objc_msgSend(this.id, OS.sel_descriptionWithLocale_1, locale !is null ? locale.id : null); | 133 objc.id result = OS.objc_msgSend(this.id_, OS.sel_descriptionWithLocale_1, locale !is null ? locale.id_ : null); |
134 return result !is null ? new NSString(result) : null; | 134 return result !is null ? new NSString(result) : null; |
135 } | 135 } |
136 | 136 |
137 public NSString descriptionWithLocale_indent_ (id locale, objc.id level) | 137 public NSString descriptionWithLocale_indent_ (id locale, objc.id level) |
138 { | 138 { |
139 objc.id result = OS.objc_msgSend(this.id, OS.sel_descriptionWithLocale_1indent_1, locale !is null ? locale.id : null, level); | 139 objc.id result = OS.objc_msgSend(this.id_, OS.sel_descriptionWithLocale_1indent_1, locale !is null ? locale.id_ : null, level); |
140 return result !is null ? new NSString(result) : null; | 140 return result !is null ? new NSString(result) : null; |
141 } | 141 } |
142 | 142 |
143 public NSArray filteredArrayUsingPredicate (NSPredicate predicate) | 143 public NSArray filteredArrayUsingPredicate (NSPredicate predicate) |
144 { | 144 { |
145 objc.id result = OS.objc_msgSend(this.id, OS.sel_filteredArrayUsingPredicate_1, predicate !is null ? predicate.id : null); | 145 objc.id result = OS.objc_msgSend(this.id_, OS.sel_filteredArrayUsingPredicate_1, predicate !is null ? predicate.id_ : null); |
146 return result is this.id ? this : (result !is null ? new NSArray(result) : null); | 146 return result is this.id_ ? this : (result !is null ? new NSArray(result) : null); |
147 } | 147 } |
148 | 148 |
149 public id firstObjectCommonWithArray (NSArray otherArray) | 149 public id firstObjectCommonWithArray (NSArray otherArray) |
150 { | 150 { |
151 objc.id result = OS.objc_msgSend(this.id, OS.sel_firstObjectCommonWithArray_1, otherArray !is null ? otherArray.id : null); | 151 objc.id result = OS.objc_msgSend(this.id_, OS.sel_firstObjectCommonWithArray_1, otherArray !is null ? otherArray.id_ : null); |
152 return result !is null ? new id(result) : null; | 152 return result !is null ? new id(result) : null; |
153 } | 153 } |
154 | 154 |
155 public void getObjects_ (objc.id objects) | 155 public void getObjects_ (objc.id objects) |
156 { | 156 { |
157 OS.objc_msgSend(this.id, OS.sel_getObjects_1, objects); | 157 OS.objc_msgSend(this.id_, OS.sel_getObjects_1, objects); |
158 } | 158 } |
159 | 159 |
160 public void getObjects_range_ (objc.id objects, NSRange range) | 160 public void getObjects_range_ (objc.id objects, NSRange range) |
161 { | 161 { |
162 OS.objc_msgSend(this.id, OS.sel_getObjects_1range_1, objects, range); | 162 OS.objc_msgSend(this.id_, OS.sel_getObjects_1range_1, objects, range); |
163 } | 163 } |
164 | 164 |
165 public NSUInteger indexOfObject_ (id anObject) | 165 public NSUInteger indexOfObject_ (id anObject) |
166 { | 166 { |
167 return OS.objc_msgSend(this.id, OS.sel_indexOfObject_1, anObject !is null ? anObject.id : null); | 167 return cast(NSUInteger) OS.objc_msgSend(this.id_, OS.sel_indexOfObject_1, anObject !is null ? anObject.id_ : null); |
168 } | 168 } |
169 | 169 |
170 public NSUInteger indexOfObject_inRange_ (id anObject, NSRange range) | 170 public NSUInteger indexOfObject_inRange_ (id anObject, NSRange range) |
171 { | 171 { |
172 return OS.objc_msgSend(this.id, OS.sel_indexOfObject_1inRange_1, anObject !is null ? anObject.id : null, range); | 172 return cast(NSUInteger) OS.objc_msgSend(this.id_, OS.sel_indexOfObject_1inRange_1, anObject !is null ? anObject.id_ : null, range); |
173 } | 173 } |
174 | 174 |
175 public NSUInteger indexOfObjectIdenticalTo_ (id anObject) | 175 public NSUInteger indexOfObjectIdenticalTo_ (id anObject) |
176 { | 176 { |
177 return OS.objc_msgSend(this.id, OS.sel_indexOfObjectIdenticalTo_1, anObject !is null ? anObject.id : null); | 177 return cast(NSUInteger) OS.objc_msgSend(this.id_, OS.sel_indexOfObjectIdenticalTo_1, anObject !is null ? anObject.id_ : null); |
178 } | 178 } |
179 | 179 |
180 public NSUInteger indexOfObjectIdenticalTo_inRange_ (id anObject, NSRange range) | 180 public NSUInteger indexOfObjectIdenticalTo_inRange_ (id anObject, NSRange range) |
181 { | 181 { |
182 return OS.objc_msgSend(this.id, OS.sel_indexOfObjectIdenticalTo_1inRange_1, anObject !is null ? anObject.id : null, range); | 182 return cast(NSUInteger) OS.objc_msgSend(this.id_, OS.sel_indexOfObjectIdenticalTo_1inRange_1, anObject !is null ? anObject.id_ : null, range); |
183 } | 183 } |
184 | 184 |
185 public NSArray initWithArray_ (NSArray array) | 185 public NSArray initWithArray_ (NSArray array) |
186 { | 186 { |
187 objc.id result = OS.objc_msgSend(this.id, OS.sel_initWithArray_1, array !is null ? array.id : null); | 187 objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithArray_1, array !is null ? array.id_ : null); |
188 return result !is null ? this : null; | 188 return result !is null ? this : null; |
189 } | 189 } |
190 | 190 |
191 public NSArray initWithArray_copyItems_ (NSArray array, bool flag) | 191 public NSArray initWithArray_copyItems_ (NSArray array, bool flag) |
192 { | 192 { |
193 objc.id result = OS.objc_msgSend(this.id, OS.sel_initWithArray_1copyItems_1, array !is null ? array.id : null, flag); | 193 objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithArray_1copyItems_1, array !is null ? array.id_ : null, flag); |
194 return result !is null ? this : null; | 194 return result !is null ? this : null; |
195 } | 195 } |
196 | 196 |
197 public NSArray initWithContentsOfFile (NSString path) | 197 public NSArray initWithContentsOfFile (NSString path) |
198 { | 198 { |
199 objc.id result = OS.objc_msgSend(this.id, OS.sel_initWithContentsOfFile_1, path !is null ? path.id : null); | 199 objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithContentsOfFile_1, path !is null ? path.id_ : null); |
200 return result !is null ? this : null; | 200 return result !is null ? this : null; |
201 } | 201 } |
202 | 202 |
203 public NSArray initWithContentsOfURL (NSURL url) | 203 public NSArray initWithContentsOfURL (NSURL url) |
204 { | 204 { |
205 objc.id result = OS.objc_msgSend(this.id, OS.sel_initWithContentsOfURL_1, url !is null ? url.id : null); | 205 objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithContentsOfURL_1, url !is null ? url.id_ : null); |
206 return result !is null ? this : null; | 206 return result !is null ? this : null; |
207 } | 207 } |
208 | 208 |
209 public NSArray initWithObjects_ (id initWithObjects) | 209 public NSArray initWithObjects_ (id initWithObjects) |
210 { | 210 { |
211 objc.id result = OS.objc_msgSend(this.id, OS.sel_initWithObjects_1, initWithObjects !is null ? initWithObjects.id : null); | 211 objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithObjects_1, initWithObjects !is null ? initWithObjects.id_ : null); |
212 return result !is null ? this : null; | 212 return result !is null ? this : null; |
213 } | 213 } |
214 | 214 |
215 public NSArray initWithObjects_count_ (/*const*/objc.id* objects, NSUInteger cnt) | 215 public NSArray initWithObjects_count_ (/*const*/objc.id* objects, NSUInteger cnt) |
216 { | 216 { |
217 objc.id result = OS.objc_msgSend(this.id, OS.sel_initWithObjects_1count_1, objects, cnt); | 217 objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithObjects_1count_1, objects, cnt); |
218 return result !is null ? this : null; | 218 return result !is null ? this : null; |
219 } | 219 } |
220 | 220 |
221 public bool isEqualToArray (NSArray otherArray) | 221 public bool isEqualToArray (NSArray otherArray) |
222 { | 222 { |
223 return OS.objc_msgSend(this.id, OS.sel_isEqualToArray_1, otherArray !is null ? otherArray.id : null) !is null; | 223 return OS.objc_msgSend(this.id_, OS.sel_isEqualToArray_1, otherArray !is null ? otherArray.id_ : null) !is null; |
224 } | 224 } |
225 | 225 |
226 public id lastObject () | 226 public id lastObject () |
227 { | 227 { |
228 objc.id result = OS.objc_msgSend(this.id, OS.sel_lastObject); | 228 objc.id result = OS.objc_msgSend(this.id_, OS.sel_lastObject); |
229 return result !is null ? new id(result) : null; | 229 return result !is null ? new id(result) : null; |
230 } | 230 } |
231 | 231 |
232 public void makeObjectsPerformSelector_ (objc.SEL aSelector) | 232 public void makeObjectsPerformSelector_ (objc.SEL aSelector) |
233 { | 233 { |
234 OS.objc_msgSend(this.id, OS.sel_makeObjectsPerformSelector_1, aSelector); | 234 OS.objc_msgSend(this.id_, OS.sel_makeObjectsPerformSelector_1, aSelector); |
235 } | 235 } |
236 | 236 |
237 public void makeObjectsPerformSelector_withObject_ (objc.SEL aSelector, id argument) | 237 public void makeObjectsPerformSelector_withObject_ (objc.SEL aSelector, id argument) |
238 { | 238 { |
239 OS.objc_msgSend(this.id, OS.sel_makeObjectsPerformSelector_1withObject_1, aSelector, argument !is null ? argument.id : null); | 239 OS.objc_msgSend(this.id_, OS.sel_makeObjectsPerformSelector_1withObject_1, aSelector, argument !is null ? argument.id_ : null); |
240 } | 240 } |
241 | 241 |
242 public objc.id objectAtIndex (NSUInteger index) | 242 public objc.id objectAtIndex (NSUInteger index) |
243 { | 243 { |
244 objc.id result = OS.objc_msgSend(this.id, OS.sel_objectAtIndex_1, index); | 244 objc.id result = OS.objc_msgSend(this.id_, OS.sel_objectAtIndex_1, index); |
245 return result; | 245 return result; |
246 // return result !is null ? new id(result) : null; | 246 // return result !is null ? new id(result) : null; |
247 } | 247 } |
248 | 248 |
249 public NSEnumerator objectEnumerator () | 249 public NSEnumerator objectEnumerator () |
250 { | 250 { |
251 objc.id result = OS.objc_msgSend(this.id, OS.sel_objectEnumerator); | 251 objc.id result = OS.objc_msgSend(this.id_, OS.sel_objectEnumerator); |
252 return result !is null ? new NSEnumerator(result) : null; | 252 return result !is null ? new NSEnumerator(result) : null; |
253 } | 253 } |
254 | 254 |
255 public NSArray objectsAtIndexes (NSIndexSet indexes) | 255 public NSArray objectsAtIndexes (NSIndexSet indexes) |
256 { | 256 { |
257 objc.id result = OS.objc_msgSend(this.id, OS.sel_objectsAtIndexes_1, indexes !is null ? indexes.id : null); | 257 objc.id result = OS.objc_msgSend(this.id_, OS.sel_objectsAtIndexes_1, indexes !is null ? indexes.id_ : null); |
258 return result is this.id ? this : (result !is null ? new NSArray(result) : null); | 258 return result is this.id_ ? this : (result !is null ? new NSArray(result) : null); |
259 } | 259 } |
260 | 260 |
261 public NSArray pathsMatchingExtensions (NSArray filterTypes) | 261 public NSArray pathsMatchingExtensions (NSArray filterTypes) |
262 { | 262 { |
263 objc.id result = OS.objc_msgSend(this.id, OS.sel_pathsMatchingExtensions_1, filterTypes !is null ? filterTypes.id : null); | 263 objc.id result = OS.objc_msgSend(this.id_, OS.sel_pathsMatchingExtensions_1, filterTypes !is null ? filterTypes.id_ : null); |
264 return result is this.id ? this : (result !is null ? new NSArray(result) : null); | 264 return result is this.id_ ? this : (result !is null ? new NSArray(result) : null); |
265 } | 265 } |
266 | 266 |
267 public void removeObserver_forKeyPath_ (NSObject observer, NSString keyPath) | 267 public void removeObserver_forKeyPath_ (NSObject observer, NSString keyPath) |
268 { | 268 { |
269 OS.objc_msgSend(this.id, OS.sel_removeObserver_1forKeyPath_1, observer !is null ? observer.id : null, keyPath !is null ? keyPath.id : null); | 269 OS.objc_msgSend(this.id_, OS.sel_removeObserver_1forKeyPath_1, observer !is null ? observer.id_ : null, keyPath !is null ? keyPath.id_ : null); |
270 } | 270 } |
271 | 271 |
272 public void removeObserver_fromObjectsAtIndexes_forKeyPath_ (NSObject observer, NSIndexSet indexes, NSString keyPath) | 272 public void removeObserver_fromObjectsAtIndexes_forKeyPath_ (NSObject observer, NSIndexSet indexes, NSString keyPath) |
273 { | 273 { |
274 OS.objc_msgSend(this.id, OS.sel_removeObserver_1fromObjectsAtIndexes_1forKeyPath_1, observer !is null ? observer.id : null, | 274 OS.objc_msgSend(this.id_, OS.sel_removeObserver_1fromObjectsAtIndexes_1forKeyPath_1, observer !is null ? observer.id_ : null, |
275 indexes !is null ? indexes.id : null, keyPath !is null ? keyPath.id : null); | 275 indexes !is null ? indexes.id_ : null, keyPath !is null ? keyPath.id_ : null); |
276 } | 276 } |
277 | 277 |
278 public NSEnumerator reverseObjectEnumerator () | 278 public NSEnumerator reverseObjectEnumerator () |
279 { | 279 { |
280 objc.id result = OS.objc_msgSend(this.id, OS.sel_reverseObjectEnumerator); | 280 objc.id result = OS.objc_msgSend(this.id_, OS.sel_reverseObjectEnumerator); |
281 return result !is null ? new NSEnumerator(result) : null; | 281 return result !is null ? new NSEnumerator(result) : null; |
282 } | 282 } |
283 | 283 |
284 public void setValue (id value, NSString key) | 284 public void setValue (id value, NSString key) |
285 { | 285 { |
286 OS.objc_msgSend(this.id, OS.sel_setValue_1forKey_1, value !is null ? value.id : null, key !is null ? key.id : null); | 286 OS.objc_msgSend(this.id_, OS.sel_setValue_1forKey_1, value !is null ? value.id_ : null, key !is null ? key.id_ : null); |
287 } | 287 } |
288 | 288 |
289 public NSData sortedArrayHint () | 289 public NSData sortedArrayHint () |
290 { | 290 { |
291 objc.id result = OS.objc_msgSend(this.id, OS.sel_sortedArrayHint); | 291 objc.id result = OS.objc_msgSend(this.id_, OS.sel_sortedArrayHint); |
292 return result !is null ? new NSData(result) : null; | 292 return result !is null ? new NSData(result) : null; |
293 } | 293 } |
294 | 294 |
295 public NSArray sortedArrayUsingDescriptors (NSArray sortDescriptors) | 295 public NSArray sortedArrayUsingDescriptors (NSArray sortDescriptors) |
296 { | 296 { |
297 objc.id result = OS.objc_msgSend(this.id, OS.sel_sortedArrayUsingDescriptors_1, sortDescriptors !is null ? sortDescriptors.id : null); | 297 objc.id result = OS.objc_msgSend(this.id_, OS.sel_sortedArrayUsingDescriptors_1, sortDescriptors !is null ? sortDescriptors.id_ : null); |
298 return result is this.id ? this : (result !is null ? new NSArray(result) : null); | 298 return result is this.id_ ? this : (result !is null ? new NSArray(result) : null); |
299 } | 299 } |
300 | 300 |
301 public NSArray sortedArrayUsingFunction_context_ (objc.id comparator, objc.id context) | 301 public NSArray sortedArrayUsingFunction_context_ (objc.id comparator, objc.id context) |
302 { | 302 { |
303 objc.id result = OS.objc_msgSend(this.id, OS.sel_sortedArrayUsingFunction_1context_1, comparator, context); | 303 objc.id result = OS.objc_msgSend(this.id_, OS.sel_sortedArrayUsingFunction_1context_1, comparator, context); |
304 return result is this.id ? this : (result !is null ? new NSArray(result) : null); | 304 return result is this.id_ ? this : (result !is null ? new NSArray(result) : null); |
305 } | 305 } |
306 | 306 |
307 public NSArray sortedArrayUsingFunction_context_hint_ (objc.id comparator, objc.id context, NSData hint) | 307 public NSArray sortedArrayUsingFunction_context_hint_ (objc.id comparator, objc.id context, NSData hint) |
308 { | 308 { |
309 objc.id result = OS.objc_msgSend(this.id, OS.sel_sortedArrayUsingFunction_1context_1hint_1, comparator, context, | 309 objc.id result = OS.objc_msgSend(this.id_, OS.sel_sortedArrayUsingFunction_1context_1hint_1, comparator, context, |
310 hint !is null ? hint.id : null); | 310 hint !is null ? hint.id_ : null); |
311 return result is this.id ? this : (result !is null ? new NSArray(result) : null); | 311 return result is this.id_ ? this : (result !is null ? new NSArray(result) : null); |
312 } | 312 } |
313 | 313 |
314 public NSArray sortedArrayUsingSelector (objc.id comparator) | 314 public NSArray sortedArrayUsingSelector (objc.id comparator) |
315 { | 315 { |
316 objc.id result = OS.objc_msgSend(this.id, OS.sel_sortedArrayUsingSelector_1, comparator); | 316 objc.id result = OS.objc_msgSend(this.id_, OS.sel_sortedArrayUsingSelector_1, comparator); |
317 return result is this.id ? this : (result !is null ? new NSArray(result) : null); | 317 return result is this.id_ ? this : (result !is null ? new NSArray(result) : null); |
318 } | 318 } |
319 | 319 |
320 public NSArray subarrayWithRange (NSRange range) | 320 public NSArray subarrayWithRange (NSRange range) |
321 { | 321 { |
322 objc.id result = OS.objc_msgSend(this.id, OS.sel_subarrayWithRange_1, range); | 322 objc.id result = OS.objc_msgSend(this.id_, OS.sel_subarrayWithRange_1, range); |
323 return result is this.id ? this : (result !is null ? new NSArray(result) : null); | 323 return result is this.id_ ? this : (result !is null ? new NSArray(result) : null); |
324 } | 324 } |
325 | 325 |
326 public id valueForKey (NSString key) | 326 public id valueForKey (NSString key) |
327 { | 327 { |
328 objc.id result = OS.objc_msgSend(this.id, OS.sel_valueForKey_1, key !is null ? key.id : null); | 328 objc.id result = OS.objc_msgSend(this.id_, OS.sel_valueForKey_1, key !is null ? key.id_ : null); |
329 return result !is null ? new id(result) : null; | 329 return result !is null ? new id(result) : null; |
330 } | 330 } |
331 | 331 |
332 public bool writeToFile (NSString path, bool useAuxiliaryFile) | 332 public bool writeToFile (NSString path, bool useAuxiliaryFile) |
333 { | 333 { |
334 return OS.objc_msgSend(this.id, OS.sel_writeToFile_1atomically_1, path !is null ? path.id : null, useAuxiliaryFile) !is null; | 334 return OS.objc_msgSend(this.id_, OS.sel_writeToFile_1atomically_1, path !is null ? path.id_ : null, useAuxiliaryFile) !is null; |
335 } | 335 } |
336 | 336 |
337 public bool writeToURL (NSURL url, bool atomically) | 337 public bool writeToURL (NSURL url, bool atomically) |
338 { | 338 { |
339 return OS.objc_msgSend(this.id, OS.sel_writeToURL_1atomically_1, url !is null ? url.id : null, atomically) !is null; | 339 return OS.objc_msgSend(this.id_, OS.sel_writeToURL_1atomically_1, url !is null ? url.id_ : null, atomically) !is null; |
340 } | 340 } |
341 | 341 |
342 } | 342 } |