Hey folks.
I’m trying to access data (managedObject in an ArrayController) without a Document. First, is this possible (I can’t see why it would be)? And, if so any tips? I’ve followed the ole tutorial (http://www.macgeekery.com/development/adding_basic_applescript_to_core_data_applications) but, because I don’t have a document I’m not exactly sure what the AS looks like, or what to tell to give me my objects.
Here’s the AS I’m working with:
with timeout of 3600 seconds -- 1 hour
tell application "clinque"
try
set theLinq to the first linq
set theContent to the properties of theLinq
on error errMsg number errNum
activate
display alert "AppleScript Error" message errMsg & " (" & errNum & ")" buttons {"OK"} default button "OK"
end try
end tell
end timeout
linq is a managed object that is setup in a suite:
<suite name="Clinque Suite" code="clnQ" description="Suite containing Clinque specific commands">
<class name="linqItem" code="linQ" plural="linqs" inherits="linq">
<cocoa class="Linq"/>
<property name="url" code="LnQu" description="The url of the linq." type="text">
<cocoa key="url"/>
</property>
<property name="tags" code="tags" description="The tags associated with the linq." type="text">
<cocoa key="tags"/>
</property>
<property name="note" code="note" description="The linq's notes." type="text">
<cocoa key="note"/>
</property>
<property name="id" code="ID " description="The ID of the linq." type="text" access="r">
<cocoa key="id"/>
</property>
</class>
</suite>
Any help?