RE: Dynamically changing scripting dictionary
RE: Dynamically changing scripting dictionary
- Subject: RE: Dynamically changing scripting dictionary
- From: "Christopher Hickman" <email@hidden>
- Date: Thu, 13 Oct 2005 15:34:50 -0400
From
<http://developer.apple.com/releasenotes/AppleScript/AppleScript.htmlKnown
Bugs and Limitations>
Known Bugs and Limitations
Dynamic generation of sdefs is not supported. sdefs in single-file
applications are not supported.
So, no it is not correct. It was designed to support dynamic sdefs, but it
doesn't yet.
Topher
-----Original Message-----
From: cocoa-dev-bounces+tophu=email@hidden
[mailto:cocoa-dev-bounces+tophu=email@hidden] On Behalf Of Mark
Dawson
Sent: Friday, October 07, 2005 1:09 PM
To: Apple Mailing List
Subject: Dynamically changing scripting dictionary
It appears that Cocoa allows for dynamic script dictionaries,
updating the app's dictionary when bundles are loaded in, via the
NSScriptSuiteRegistry. Is this correct? Does this mean that if I
load a plug-in that adds new objects or options to existing app
objects, that plug-in can supply updated script information, with the
result that the user can script that new functionality?
I had a follow-on question: How are script dictionaries recognized?
loadSuitesFromBundle says "Loads the suite definitions in bundle. for
each suite found". oadSuiteWithDictionary:fromBundle references .
scriptSuite property lists, with a mention of .sdef in 10.4.
I also wanted to make sure that I didn't remove any existing
registered pieces. For example, if my app supported font color and
size, I might have the following dictionary (from the Cocoa examples):
<class name="rich text" plural="rich text" code="ctxt"
description="Rich (styled) text">
<cocoa class="NSTextStorage"/>
<type type="text"/>
<property name="color" code="colr" type="color"
description="The color of the first character.">
<cocoa key="foregroundColor"/>
</property>
<property name="font" code="font" type="text"
description="The name of the font of the first character.">
<cocoa key="fontName"/>
</property>
<element type="character"/>
<element type="paragraph"/>
<element type="word"/>
<element type="attribute run"/>
<element type="attachment"/>
</class>
If I had a plug-in that added font size capability, would it have the
following definition?
<class name="rich text" plural="rich text" code="ctxt"
description="Rich (styled) text">
<cocoa class="NSTextStorage"/>
<type type="text"/>
<property name="size" code="ptsz" type="integer"
description="The size in points of the first character.">
<cocoa key="fontSize"/>
</property>
</class>
thanks,
mark _______________________________________________
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
_______________________________________________
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