annotate dstep/foundation/NSAppleScript.d @ 25:b9de51448c6b

Added an id constructor. Changed the string mixin to a template mixin. Added support for building as a dynamic library
author Jacob Carlborg <doob@me.com>
date Tue, 06 Apr 2010 11:37:27 +0200
parents 19885b43130e
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
14
89f3c3ef1fd2 Added the Foundation framework
Jacob Carlborg <doob@me.com>
parents:
diff changeset
1 /**
89f3c3ef1fd2 Added the Foundation framework
Jacob Carlborg <doob@me.com>
parents:
diff changeset
2 * Copyright: Copyright (c) 2009 Jacob Carlborg.
89f3c3ef1fd2 Added the Foundation framework
Jacob Carlborg <doob@me.com>
parents:
diff changeset
3 * Authors: Jacob Carlborg
89f3c3ef1fd2 Added the Foundation framework
Jacob Carlborg <doob@me.com>
parents:
diff changeset
4 * Version: Initial created: Aug 3, 2009
89f3c3ef1fd2 Added the Foundation framework
Jacob Carlborg <doob@me.com>
parents:
diff changeset
5 * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost Software License 1.0)
89f3c3ef1fd2 Added the Foundation framework
Jacob Carlborg <doob@me.com>
parents:
diff changeset
6 */
89f3c3ef1fd2 Added the Foundation framework
Jacob Carlborg <doob@me.com>
parents:
diff changeset
7 module dstep.foundation.NSAppleScript;
89f3c3ef1fd2 Added the Foundation framework
Jacob Carlborg <doob@me.com>
parents:
diff changeset
8
89f3c3ef1fd2 Added the Foundation framework
Jacob Carlborg <doob@me.com>
parents:
diff changeset
9 import dstep.foundation.NSAppleEventDescriptor;
89f3c3ef1fd2 Added the Foundation framework
Jacob Carlborg <doob@me.com>
parents:
diff changeset
10 import dstep.foundation.NSDictionary;
89f3c3ef1fd2 Added the Foundation framework
Jacob Carlborg <doob@me.com>
parents:
diff changeset
11 import dstep.foundation.NSObject;
89f3c3ef1fd2 Added the Foundation framework
Jacob Carlborg <doob@me.com>
parents:
diff changeset
12 import dstep.foundation.NSString;
89f3c3ef1fd2 Added the Foundation framework
Jacob Carlborg <doob@me.com>
parents:
diff changeset
13 import dstep.foundation.NSURL;
16
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
14 import dstep.foundation.NSZone;
14
89f3c3ef1fd2 Added the Foundation framework
Jacob Carlborg <doob@me.com>
parents:
diff changeset
15 import dstep.objc.bridge.Bridge;
16
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
16 import dstep.objc.objc;
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
17
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
18
14
89f3c3ef1fd2 Added the Foundation framework
Jacob Carlborg <doob@me.com>
parents:
diff changeset
19
89f3c3ef1fd2 Added the Foundation framework
Jacob Carlborg <doob@me.com>
parents:
diff changeset
20 import bindings = dstep.foundation.NSAppleScript_bindings;
89f3c3ef1fd2 Added the Foundation framework
Jacob Carlborg <doob@me.com>
parents:
diff changeset
21
16
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
22 private
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
23 {
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
24 NSString NSAppleScriptErrorMessage_;
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
25 NSString NSAppleScriptErrorNumber_;
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
26 NSString NSAppleScriptErrorAppName_;
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
27 NSString NSAppleScriptErrorBriefMessage_;
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
28 NSString NSAppleScriptErrorRange_;
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
29 }
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
30
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
31 NSString NSAppleScriptErrorMessage ()
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
32 {
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
33 if (NSAppleScriptErrorMessage_)
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
34 return NSAppleScriptErrorMessage_;
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
35
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
36 return NSAppleScriptErrorMessage_ = new NSString(bindings.NSAppleScriptErrorMessage);
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
37 }
14
89f3c3ef1fd2 Added the Foundation framework
Jacob Carlborg <doob@me.com>
parents:
diff changeset
38
16
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
39 NSString NSAppleScriptErrorNumber ()
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 if (NSAppleScriptErrorNumber_)
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
42 return NSAppleScriptErrorNumber_;
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
43
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
44 return NSAppleScriptErrorNumber_ = new NSString(bindings.NSAppleScriptErrorNumber);
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
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
47 NSString NSAppleScriptErrorAppName ()
14
89f3c3ef1fd2 Added the Foundation framework
Jacob Carlborg <doob@me.com>
parents:
diff changeset
48 {
16
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
49 if (NSAppleScriptErrorAppName_)
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
50 return NSAppleScriptErrorAppName_;
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
51
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
52 return NSAppleScriptErrorAppName_ = new NSString(bindings.NSAppleScriptErrorAppName);
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
53 }
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 NSString NSAppleScriptErrorBriefMessage ()
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
56 {
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
57 if (NSAppleScriptErrorBriefMessage_)
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
58 return NSAppleScriptErrorBriefMessage_;
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 return NSAppleScriptErrorBriefMessage_ = new NSString(bindings.NSAppleScriptErrorBriefMessage);
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
61 }
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 NSString NSAppleScriptErrorRange ()
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
64 {
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
65 if (NSAppleScriptErrorRange_)
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
66 return NSAppleScriptErrorRange_;
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
67
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
68 return NSAppleScriptErrorRange_ = new NSString(bindings.NSAppleScriptErrorRange);
14
89f3c3ef1fd2 Added the Foundation framework
Jacob Carlborg <doob@me.com>
parents:
diff changeset
69 }
89f3c3ef1fd2 Added the Foundation framework
Jacob Carlborg <doob@me.com>
parents:
diff changeset
70
89f3c3ef1fd2 Added the Foundation framework
Jacob Carlborg <doob@me.com>
parents:
diff changeset
71 class NSAppleScript : NSObject, INSCopying
89f3c3ef1fd2 Added the Foundation framework
Jacob Carlborg <doob@me.com>
parents:
diff changeset
72 {
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
73 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
74
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
75 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
76 {
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
77 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
78 }
16
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 this ()
14
89f3c3ef1fd2 Added the Foundation framework
Jacob Carlborg <doob@me.com>
parents:
diff changeset
81 {
16
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
82 super(typeof(this).alloc.init.objcObject);
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
83 }
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
84
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
85 typeof(this) init ()
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
86 {
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
87 return invokeObjcSelf!(typeof(this), "init");
14
89f3c3ef1fd2 Added the Foundation framework
Jacob Carlborg <doob@me.com>
parents:
diff changeset
88 }
89f3c3ef1fd2 Added the Foundation framework
Jacob Carlborg <doob@me.com>
parents:
diff changeset
89
16
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
90 Object initWithContentsOfURL (NSURL url, ref NSDictionary errorInfo)
14
89f3c3ef1fd2 Added the Foundation framework
Jacob Carlborg <doob@me.com>
parents:
diff changeset
91 {
16
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
92 id error;
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
93
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
94 if (errorInfo)
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
95 error = new objc_object;
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
96
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
97 Object result = invokeObjcSelf!(Object, "initWithContentsOfURL:error:", NSURL, id*)(url, &error);
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
98
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
99 if (error)
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
100 errorInfo = new NSDictionary(error);
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
101
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
102 return result;
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
103 }
14
89f3c3ef1fd2 Added the Foundation framework
Jacob Carlborg <doob@me.com>
parents:
diff changeset
104
16
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
105 this (NSURL url, ref NSDictionary errorInfo)
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
106 {
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
107 typeof(this).alloc.initWithContentsOfURL(url, errorInfo);
14
89f3c3ef1fd2 Added the Foundation framework
Jacob Carlborg <doob@me.com>
parents:
diff changeset
108 }
89f3c3ef1fd2 Added the Foundation framework
Jacob Carlborg <doob@me.com>
parents:
diff changeset
109
89f3c3ef1fd2 Added the Foundation framework
Jacob Carlborg <doob@me.com>
parents:
diff changeset
110 Object initWithSource (NSString source)
89f3c3ef1fd2 Added the Foundation framework
Jacob Carlborg <doob@me.com>
parents:
diff changeset
111 {
89f3c3ef1fd2 Added the Foundation framework
Jacob Carlborg <doob@me.com>
parents:
diff changeset
112 return invokeObjcSelf!(Object, "initWithSource:", NSString)(source);
89f3c3ef1fd2 Added the Foundation framework
Jacob Carlborg <doob@me.com>
parents:
diff changeset
113 }
89f3c3ef1fd2 Added the Foundation framework
Jacob Carlborg <doob@me.com>
parents:
diff changeset
114
89f3c3ef1fd2 Added the Foundation framework
Jacob Carlborg <doob@me.com>
parents:
diff changeset
115 this (NSString source)
89f3c3ef1fd2 Added the Foundation framework
Jacob Carlborg <doob@me.com>
parents:
diff changeset
116 {
16
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
117 typeof(this).alloc.initWithSource(source);
14
89f3c3ef1fd2 Added the Foundation framework
Jacob Carlborg <doob@me.com>
parents:
diff changeset
118 }
89f3c3ef1fd2 Added the Foundation framework
Jacob Carlborg <doob@me.com>
parents:
diff changeset
119
89f3c3ef1fd2 Added the Foundation framework
Jacob Carlborg <doob@me.com>
parents:
diff changeset
120 NSString source ()
89f3c3ef1fd2 Added the Foundation framework
Jacob Carlborg <doob@me.com>
parents:
diff changeset
121 {
89f3c3ef1fd2 Added the Foundation framework
Jacob Carlborg <doob@me.com>
parents:
diff changeset
122 return invokeObjcSelf!(NSString, "source");
89f3c3ef1fd2 Added the Foundation framework
Jacob Carlborg <doob@me.com>
parents:
diff changeset
123 }
89f3c3ef1fd2 Added the Foundation framework
Jacob Carlborg <doob@me.com>
parents:
diff changeset
124
89f3c3ef1fd2 Added the Foundation framework
Jacob Carlborg <doob@me.com>
parents:
diff changeset
125 bool isCompiled ()
89f3c3ef1fd2 Added the Foundation framework
Jacob Carlborg <doob@me.com>
parents:
diff changeset
126 {
89f3c3ef1fd2 Added the Foundation framework
Jacob Carlborg <doob@me.com>
parents:
diff changeset
127 return invokeObjcSelf!(bool, "isCompiled");
89f3c3ef1fd2 Added the Foundation framework
Jacob Carlborg <doob@me.com>
parents:
diff changeset
128 }
89f3c3ef1fd2 Added the Foundation framework
Jacob Carlborg <doob@me.com>
parents:
diff changeset
129
16
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
130 bool compileAndReturnError (ref NSDictionary errorInfo)
14
89f3c3ef1fd2 Added the Foundation framework
Jacob Carlborg <doob@me.com>
parents:
diff changeset
131 {
16
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
132 id error;
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
133
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
134 if (errorInfo)
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
135 error = new objc_object;
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
136
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
137 bool result = invokeObjcSelf!(bool, "compileAndReturnError:", id*)(&error);
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
138
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
139 if (error)
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
140 errorInfo = new NSDictionary(error);
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
141
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
142 return result;
14
89f3c3ef1fd2 Added the Foundation framework
Jacob Carlborg <doob@me.com>
parents:
diff changeset
143 }
89f3c3ef1fd2 Added the Foundation framework
Jacob Carlborg <doob@me.com>
parents:
diff changeset
144
16
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
145 NSAppleEventDescriptor executeAndReturnError (ref NSDictionary errorInfo)
14
89f3c3ef1fd2 Added the Foundation framework
Jacob Carlborg <doob@me.com>
parents:
diff changeset
146 {
16
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
147 id error;
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
148
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
149 if (errorInfo)
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
150 error = new objc_object;
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
151
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
152 NSAppleEventDescriptor result = invokeObjcSelf!(NSAppleEventDescriptor, "executeAndReturnError:", id*)(&error);
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
153
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
154 if (error)
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
155 errorInfo = new NSDictionary(error);
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
156
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
157 return result;
14
89f3c3ef1fd2 Added the Foundation framework
Jacob Carlborg <doob@me.com>
parents:
diff changeset
158 }
89f3c3ef1fd2 Added the Foundation framework
Jacob Carlborg <doob@me.com>
parents:
diff changeset
159
16
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
160 NSAppleEventDescriptor executeAppleEvent (NSAppleEventDescriptor event, ref NSDictionary errorInfo)
14
89f3c3ef1fd2 Added the Foundation framework
Jacob Carlborg <doob@me.com>
parents:
diff changeset
161 {
16
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
162 id error;
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
163
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
164 if (errorInfo)
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
165 error = new objc_object;
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
166
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
167 NSAppleEventDescriptor result = invokeObjcSelf!(NSAppleEventDescriptor, "executeAppleEvent:error:", NSAppleEventDescriptor, id*)(event, &error);
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
168
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
169 if (error)
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
170 errorInfo = new NSDictionary(error);
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
171
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
172 return result;
14
89f3c3ef1fd2 Added the Foundation framework
Jacob Carlborg <doob@me.com>
parents:
diff changeset
173 }
89f3c3ef1fd2 Added the Foundation framework
Jacob Carlborg <doob@me.com>
parents:
diff changeset
174
89f3c3ef1fd2 Added the Foundation framework
Jacob Carlborg <doob@me.com>
parents:
diff changeset
175 Object copyWithZone (NSZone* zone)
89f3c3ef1fd2 Added the Foundation framework
Jacob Carlborg <doob@me.com>
parents:
diff changeset
176 {
89f3c3ef1fd2 Added the Foundation framework
Jacob Carlborg <doob@me.com>
parents:
diff changeset
177 return invokeObjcSelf!(Object, "copyWithZone:", NSZone*)(zone);
89f3c3ef1fd2 Added the Foundation framework
Jacob Carlborg <doob@me.com>
parents:
diff changeset
178 }
89f3c3ef1fd2 Added the Foundation framework
Jacob Carlborg <doob@me.com>
parents:
diff changeset
179 }
89f3c3ef1fd2 Added the Foundation framework
Jacob Carlborg <doob@me.com>
parents:
diff changeset
180