SD doesn't reconize library with termonology

I tried to figure out how to create an AppleScript Library with terminology inspired by Shane’s
in SD. I couldn’t so I tried Script Editor which was used in the video. My version is Version 2.11 (229); not the same as in the video: different button to open/close its bundle and no check box for selecting AppleScript/Objective-C Library in particular.
I made the sdef,

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE dictionary SYSTEM "file://localhost/System/Library/DTDs/sdef.dtd">
 <suite name="Text Utilities" code="NYTT" description="Commands to edit text">
  <command name="transform text" code="NYTTTRNS" description="">
   <direct-parameter type="text" description="The text to transform."/>
   <parameter name="to" code="ToCs" type="case conversion" description=".."/>
  <enumeration name="case conversion" code="CSEC">
   <enumerator name="upper case" code="UppC" description=""/>
   <enumerator name="lower case" code="Lowc" description=""/>
   <enumerator name="word case" code="WrdC" description=""/>

created a new document in SE, re-saved it as .scptd, dragged the above sdef into the bundle, re-saved it and closed the window. I put the scptd into my Home Library Folder.

I created a new script in SE using the command.

use script "Terminoly test 004"  
transform text "blahblah" to upper case

It recognized the terminology but gag on the Obj-C so I added a use framework “Foundation” statement to the sdef and it worked.

use framework "Foundation"
on transform text sourceText to caseIndicator
    set the sourceString to current application's NSString's stringWithString:sourceText
    -- apply the indicated transformation to the Cocoa string
	if the caseIndicator is upper case then
	set the adjustedString to sourceString's uppercaseString()
else if the caseIndicator is lower case then
	set the adjustedString to sourceString's lowercaseString()
	set the adjustedString to sourceString's capitalizedString()
end if
-- convert from Cocoa string to AppleScript text
return (adjustedStri

Next I created the same script in SD. It didn’t recognize the terminology/compile.

What am I doing wrong? How can I create the Script Library with Terminology in SD?


I’ve found quitting and relaunching Script Debugger is pretty much required after making changes to an SDEF.

Also, as for editing an SDEF I use SDEF Editor as a helper. (I also edit in BBEdit, which is what I think Shane uses). SDEF editor was linked to in this conversation:

It’s available here:

But, that page seems to have version 1.3, I have version 1.9 installed. Not sure where I got that, might have been here at the SD Forum?

EDIT: Yes, I did get it here at the SD Forum. See this post:

Last Version is 1.9.1:


Quitting and relaunching solved both problems.
Thanks for the ling to the SDEF editor.

1 Like

Cool, thanks! I’ll update!

1 Like