わかった。だから、言いましょう:
- のを返す際の
myCollection
クラス、クラスmyObject
、およびプロパティobjects
がありますmyCollection
NSArray
myObject
.sdef
とクラスのファイルを適切に設定したとするmyCollection
と、そこでもプロパティmyObject
を定義するにはどうすればよいですか?objects
つまり、これまでのところ、私はそのようなことをすることができます:
tell application "myApplication"
collection's activeObject's name
end tell
私が欲しいのはmyObject
、配列の要素としてsにアクセスできるようにすることです。
tell application "myApplication"
set Obj to collection's object 0
end tell
これはこれまでの私の.sdef(ほぼ...)です:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE dictionary SYSTEM "file://localhost/System/Library/DTDs/sdef.dtd">
<dictionary xmlns:xi="http://www.w3.org/2003/XInclude">
<xi:include href="file:///System/Library/ScriptingDefinitions/CocoaStandard.sdef" xpointer="xpointer(/dictionary/suite)"/>
<suite name="myApplication Suite" code="myRm" description="myApplication Suite">
<class name="application" code="camy" description="myApplication's top-level scripting object." inherits="application">
<cocoa class="myApplication"/>
<property name="myname" code="PEnm" description="The name of the application" type="text" access="r">
<cocoa key="myname"/>
</property>
<property name="currentContents" code="PEnc" description="The current contents" type="text" access="r">
<cocoa name="currentContents" />
</property>
<property name="activeDocument" code="PEad" description="The active document" type="document" access="r">
<cocoa name="activeDocument" />
</property>
</class>
<class name="document" code="cDoc" description="myApplication document">
<cocoa class="myDocument"/>
<property name="alias" code="cDal" description="The document's alias" type="text" access="r">
<cocoa key="alias" />
</property>
<property name="content" code="cDco" description="The document's content" type="text" access="rw">
<cocoa key="content" />
</property>
</class>
</suite>
</dictionary>
どうすればいいですか?