Mercurial > projects > dstep
annotate dstep/foundation/NSXMLDocument.d @ 27:57371c29ef73 default tip
ObjcWrap is now automatically mixed in. Added support for building as a dylib with DMD.
author | Jacob Carlborg <doob@me.com> |
---|---|
date | Fri, 09 Apr 2010 23:00:22 +0200 |
parents | b9de51448c6b |
children |
rev | line source |
---|---|
14 | 1 /** |
2 * Copyright: Copyright (c) 2009 Jacob Carlborg. | |
3 * Authors: Jacob Carlborg | |
4 * Version: Initial created: Aug 3, 2009 | |
5 * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost Software License 1.0) | |
6 */ | |
7 module dstep.foundation.NSXMLDocument; | |
8 | |
16
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
14
diff
changeset
|
9 import dstep.foundation.NSArray; |
14 | 10 import dstep.foundation.NSData; |
16
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
14
diff
changeset
|
11 import dstep.foundation.NSDictionary; |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
14
diff
changeset
|
12 import dstep.foundation.NSError; |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
14
diff
changeset
|
13 import dstep.foundation.NSObjCRuntime; |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
14
diff
changeset
|
14 import dstep.foundation.NSString; |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
14
diff
changeset
|
15 import dstep.foundation.NSURL; |
14 | 16 import dstep.foundation.NSXMLDTD; |
16
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
14
diff
changeset
|
17 import dstep.foundation.NSXMLElement; |
14 | 18 import dstep.foundation.NSXMLNode; |
19 import dstep.objc.bridge.Bridge; | |
16
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
14
diff
changeset
|
20 import dstep.objc.objc; |
14 | 21 |
22 alias NSUInteger NSXMLDocumentContentKind; | |
23 | |
24 enum | |
25 { | |
26 NSXMLDocumentXMLKind = 0, | |
27 NSXMLDocumentXHTMLKind, | |
28 NSXMLDocumentHTMLKind, | |
29 NSXMLDocumentTextKind | |
30 } | |
31 | |
32 class NSXMLDocument : NSXMLNode | |
33 { | |
25
b9de51448c6b
Added an id constructor. Changed the string mixin to a template mixin. Added support for building as a dynamic library
Jacob Carlborg <doob@me.com>
parents:
16
diff
changeset
|
34 mixin ObjcWrap; |
b9de51448c6b
Added an id constructor. Changed the string mixin to a template mixin. Added support for building as a dynamic library
Jacob Carlborg <doob@me.com>
parents:
16
diff
changeset
|
35 |
b9de51448c6b
Added an id constructor. Changed the string mixin to a template mixin. Added support for building as a dynamic library
Jacob Carlborg <doob@me.com>
parents:
16
diff
changeset
|
36 this (id object) |
b9de51448c6b
Added an id constructor. Changed the string mixin to a template mixin. Added support for building as a dynamic library
Jacob Carlborg <doob@me.com>
parents:
16
diff
changeset
|
37 { |
b9de51448c6b
Added an id constructor. Changed the string mixin to a template mixin. Added support for building as a dynamic library
Jacob Carlborg <doob@me.com>
parents:
16
diff
changeset
|
38 super(object); |
b9de51448c6b
Added an id constructor. Changed the string mixin to a template mixin. Added support for building as a dynamic library
Jacob Carlborg <doob@me.com>
parents:
16
diff
changeset
|
39 } |
16
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
14
diff
changeset
|
40 |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
14
diff
changeset
|
41 this () |
14 | 42 { |
16
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
14
diff
changeset
|
43 super(typeof(this).alloc.init.objcObject); |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
14
diff
changeset
|
44 } |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
14
diff
changeset
|
45 |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
14
diff
changeset
|
46 typeof(this) init () |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
14
diff
changeset
|
47 { |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
14
diff
changeset
|
48 return invokeObjcSelf!(typeof(this), "init"); |
14 | 49 } |
50 | |
16
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
14
diff
changeset
|
51 Object initWithXMLString (NSString string, NSUInteger mask, ref NSError error) |
14 | 52 { |
16
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
14
diff
changeset
|
53 id err; |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
14
diff
changeset
|
54 |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
14
diff
changeset
|
55 if (error) |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
14
diff
changeset
|
56 err = new objc_object; |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
14
diff
changeset
|
57 |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
14
diff
changeset
|
58 Object result = invokeObjcSelf!(Object, "initWithXMLString:options:error:", NSString, NSUInteger, id*)(string, mask, &err); |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
14
diff
changeset
|
59 |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
14
diff
changeset
|
60 if (err) |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
14
diff
changeset
|
61 error = new NSError(err); |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
14
diff
changeset
|
62 |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
14
diff
changeset
|
63 return result; |
14 | 64 } |
65 | |
16
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
14
diff
changeset
|
66 this (NSString string, NSUInteger mask, ref NSError error) |
14 | 67 { |
16
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
14
diff
changeset
|
68 typeof(this).alloc.initWithXMLString(string, mask, error); |
14 | 69 } |
70 | |
16
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
14
diff
changeset
|
71 Object initWithContentsOfURL (NSURL url, NSUInteger mask, ref NSError error) |
14 | 72 { |
16
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
14
diff
changeset
|
73 id err; |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
14
diff
changeset
|
74 |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
14
diff
changeset
|
75 if (error) |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
14
diff
changeset
|
76 err = new objc_object; |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
14
diff
changeset
|
77 |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
14
diff
changeset
|
78 Object result = invokeObjcSelf!(Object, "initWithContentsOfURL:options:error:", NSURL, NSUInteger, id*)(url, mask, &err); |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
14
diff
changeset
|
79 |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
14
diff
changeset
|
80 if (err) |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
14
diff
changeset
|
81 error = new NSError(err); |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
14
diff
changeset
|
82 |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
14
diff
changeset
|
83 return result; |
14 | 84 } |
85 | |
16
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
14
diff
changeset
|
86 this (NSURL url, NSUInteger mask, ref NSError error) |
14 | 87 { |
16
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
14
diff
changeset
|
88 typeof(this).alloc.initWithContentsOfURL(url, mask, error); |
14 | 89 } |
90 | |
16
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
14
diff
changeset
|
91 Object initWithData (NSData data, NSUInteger mask, ref NSError error) |
14 | 92 { |
16
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
14
diff
changeset
|
93 id err; |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
14
diff
changeset
|
94 |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
14
diff
changeset
|
95 if (error) |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
14
diff
changeset
|
96 err = new objc_object; |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
14
diff
changeset
|
97 |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
14
diff
changeset
|
98 Object result = invokeObjcSelf!(Object, "initWithData:options:error:", NSData, NSUInteger, id*)(data, mask, &err); |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
14
diff
changeset
|
99 |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
14
diff
changeset
|
100 if (err) |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
14
diff
changeset
|
101 error = new NSError(err); |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
14
diff
changeset
|
102 |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
14
diff
changeset
|
103 return result; |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
14
diff
changeset
|
104 } |
14 | 105 |
16
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
14
diff
changeset
|
106 this (NSData data, NSUInteger mask, ref NSError error) |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
14
diff
changeset
|
107 { |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
14
diff
changeset
|
108 typeof(this).alloc.initWithData(data, mask, error); |
14 | 109 } |
110 | |
111 Object initWithRootElement (NSXMLElement element) | |
112 { | |
113 return invokeObjcSelf!(Object, "initWithRootElement:", NSXMLElement)(element); | |
114 } | |
115 | |
116 this (NSXMLElement element) | |
117 { | |
16
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
14
diff
changeset
|
118 typeof(this).alloc.initWithRootElement(element); |
14 | 119 } |
120 | |
121 static Class replacementClassForClass (Class cls) | |
122 { | |
16
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
14
diff
changeset
|
123 return invokeObjcSuperClass!(Class, "replacementClassForClass:", Class)(cls); |
14 | 124 } |
125 | |
126 void setCharacterEncoding (NSString encoding) | |
127 { | |
128 return invokeObjcSelf!(void, "setCharacterEncoding:", NSString)(encoding); | |
129 } | |
130 | |
131 NSString characterEncoding () | |
132 { | |
133 return invokeObjcSelf!(NSString, "characterEncoding"); | |
134 } | |
135 | |
136 void setVersion (NSString version_) | |
137 { | |
138 return invokeObjcSelf!(void, "setVersion:", NSString)(version_); | |
139 } | |
140 | |
141 NSString version_ () | |
142 { | |
143 return invokeObjcSelf!(NSString, "version"); | |
144 } | |
145 | |
146 void setStandalone (bool standalone) | |
147 { | |
148 return invokeObjcSelf!(void, "setStandalone:", bool)(standalone); | |
149 } | |
150 | |
151 bool isStandalone () | |
152 { | |
153 return invokeObjcSelf!(bool, "isStandalone"); | |
154 } | |
155 | |
156 void setDocumentContentKind (uint kind) | |
157 { | |
158 return invokeObjcSelf!(void, "setDocumentContentKind:", uint)(kind); | |
159 } | |
160 | |
161 uint documentContentKind () | |
162 { | |
163 return invokeObjcSelf!(uint, "documentContentKind"); | |
164 } | |
165 | |
166 void setMIMEType (NSString MIMEType) | |
167 { | |
168 return invokeObjcSelf!(void, "setMIMEType:", NSString)(MIMEType); | |
169 } | |
170 | |
171 NSString MIMEType () | |
172 { | |
173 return invokeObjcSelf!(NSString, "MIMEType"); | |
174 } | |
175 | |
176 void setDTD (NSXMLDTD documentTypeDeclaration) | |
177 { | |
178 return invokeObjcSelf!(void, "setDTD:", NSXMLDTD)(documentTypeDeclaration); | |
179 } | |
180 | |
181 NSXMLDTD DTD () | |
182 { | |
183 return invokeObjcSelf!(NSXMLDTD, "DTD"); | |
184 } | |
185 | |
186 void setRootElement (NSXMLNode root) | |
187 { | |
188 return invokeObjcSelf!(void, "setRootElement:", NSXMLNode)(root); | |
189 } | |
190 | |
191 NSXMLElement rootElement () | |
192 { | |
193 return invokeObjcSelf!(NSXMLElement, "rootElement"); | |
194 } | |
195 | |
196 void insertChild (NSXMLNode child, NSUInteger index) | |
197 { | |
198 return invokeObjcSelf!(void, "insertChild:atIndex:", NSXMLNode, NSUInteger)(child, index); | |
199 } | |
200 | |
201 void insertChildren (NSArray children, NSUInteger index) | |
202 { | |
203 return invokeObjcSelf!(void, "insertChildren:atIndex:", NSArray, NSUInteger)(children, index); | |
204 } | |
205 | |
206 void removeChildAtIndex (NSUInteger index) | |
207 { | |
208 return invokeObjcSelf!(void, "removeChildAtIndex:", NSUInteger)(index); | |
209 } | |
210 | |
211 void setChildren (NSArray children) | |
212 { | |
213 return invokeObjcSelf!(void, "setChildren:", NSArray)(children); | |
214 } | |
215 | |
216 void addChild (NSXMLNode child) | |
217 { | |
218 return invokeObjcSelf!(void, "addChild:", NSXMLNode)(child); | |
219 } | |
220 | |
221 void replaceChildAtIndex (NSUInteger index, NSXMLNode node) | |
222 { | |
223 return invokeObjcSelf!(void, "replaceChildAtIndex:withNode:", NSUInteger, NSXMLNode)(index, node); | |
224 } | |
225 | |
226 NSData XMLData () | |
227 { | |
228 return invokeObjcSelf!(NSData, "XMLData"); | |
229 } | |
230 | |
231 NSData XMLDataWithOptions (NSUInteger options) | |
232 { | |
233 return invokeObjcSelf!(NSData, "XMLDataWithOptions:", NSUInteger)(options); | |
234 } | |
235 | |
16
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
14
diff
changeset
|
236 Object objectByApplyingXSLT (NSData xslt, NSDictionary arguments, ref NSError error) |
14 | 237 { |
16
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
14
diff
changeset
|
238 id err; |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
14
diff
changeset
|
239 |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
14
diff
changeset
|
240 if (error) |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
14
diff
changeset
|
241 err = new objc_object; |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
14
diff
changeset
|
242 |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
14
diff
changeset
|
243 Object result = invokeObjcSelf!(Object, "objectByApplyingXSLT:arguments:error:", NSData, NSDictionary, id*)(xslt, arguments, &err); |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
14
diff
changeset
|
244 |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
14
diff
changeset
|
245 if (err) |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
14
diff
changeset
|
246 error = new NSError(err); |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
14
diff
changeset
|
247 |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
14
diff
changeset
|
248 return result; |
14 | 249 } |
250 | |
16
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
14
diff
changeset
|
251 Object objectByApplyingXSLTString (NSString xslt, NSDictionary arguments, ref NSError error) |
14 | 252 { |
16
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
14
diff
changeset
|
253 id err; |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
14
diff
changeset
|
254 |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
14
diff
changeset
|
255 if (error) |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
14
diff
changeset
|
256 err = new objc_object; |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
14
diff
changeset
|
257 |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
14
diff
changeset
|
258 Object result = invokeObjcSelf!(Object, "objectByApplyingXSLTString:arguments:error:", NSString, NSDictionary, id*)(xslt, arguments, &err); |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
14
diff
changeset
|
259 |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
14
diff
changeset
|
260 if (err) |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
14
diff
changeset
|
261 error = new NSError(err); |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
14
diff
changeset
|
262 |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
14
diff
changeset
|
263 return result; |
14 | 264 } |
265 | |
16
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
14
diff
changeset
|
266 Object objectByApplyingXSLTAtURL (NSURL xsltURL, NSDictionary argument, ref NSError error) |
14 | 267 { |
16
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
14
diff
changeset
|
268 id err; |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
14
diff
changeset
|
269 |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
14
diff
changeset
|
270 if (error) |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
14
diff
changeset
|
271 err = new objc_object; |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
14
diff
changeset
|
272 |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
14
diff
changeset
|
273 Object result = invokeObjcSelf!(Object, "objectByApplyingXSLTAtURL:arguments:error:", NSURL, NSDictionary, id*)(xsltURL, argument, &err); |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
14
diff
changeset
|
274 |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
14
diff
changeset
|
275 if (err) |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
14
diff
changeset
|
276 error = new NSError(err); |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
14
diff
changeset
|
277 |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
14
diff
changeset
|
278 return result; |
14 | 279 } |
280 | |
16
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
14
diff
changeset
|
281 bool validateAndReturnError (ref NSError error) |
14 | 282 { |
16
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
14
diff
changeset
|
283 id err; |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
14
diff
changeset
|
284 |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
14
diff
changeset
|
285 if (error) |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
14
diff
changeset
|
286 err = new objc_object; |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
14
diff
changeset
|
287 |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
14
diff
changeset
|
288 bool result = invokeObjcSelf!(bool, "validateAndReturnError:", id*)(&err); |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
14
diff
changeset
|
289 |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
14
diff
changeset
|
290 if (err) |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
14
diff
changeset
|
291 error = new NSError(err); |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
14
diff
changeset
|
292 |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
14
diff
changeset
|
293 return result; |
14 | 294 } |
295 } | |
296 |