scripting problems
scripting problems
- Subject: scripting problems
- From: Ken Victor <email@hidden>
- Date: Sun, 14 Aug 2005 14:07:36 -0700
i'm building a (core data) document based scriptable application. my
sdef file specifies that my document class contains elements xxx and
i've specifed (also in the sdef file) the XXX class. also in the sdef
file, i have a "show" command as follows:
<command name="show" code='cSHW' description="command descripion">
<cocoa class="ScriptCommand"/>
<direct-parameter description='my description'>
<type type="specifier"/>
</direct-parameter>
<result type="window" description="the shown window"/>
</command>
my ScriptCommand object is a subclass of NSScriptCommand and has its
own executeCommand method which returns a single NSWindow object.
if i execute the script command:
show xxx 1 of document 1
then everything works properly.
however, if i executs the script command:
show xxxs 1 thru 2 of document 1
or
show every xxx of document 1
then instead of getting back a single window, the script result is a
list with one window in it! (this is based on the result window or
appleevent log in script editor showing it as:
{window id 3062})
however, the console log and the xcode debugger window (with the
global domain NSScriptingDebugLogLevel set to 1) show the result as a
single object:
2005-08-14 13:38:11.547 MyApp[21144] Result: <TC_Window: 0x340d40>
so... where, how, why is my single NSWindow returned from
[ScriptCommand executeCommand] being converted into a list? or more
to the immediate point, what do i have to do to get only a single
object returned instead of a list?
thanx,
ken
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden