On May 23, 2013, at 12:31 PM, Alex Hall wrote: How are you importing the two libraries (getResourceInfo and utilities) into your scripts? Are you using the 'load script' command, the 'parent' property, Script Debugger's library support, or some other method?
I am using properties. Here's a copy-and-paste from one of the scripts (and yes, it uses absolute paths for now - I'll change that once I have these working consistently). property utilities : load script POSIX file "/Users/mehgcap/prog/apple scripts/utilities.scpt" property getResourceInfo : load script POSIX file "/Users/mehgcap/prog/apple scripts/getResourceInfo.scpt"
Hi Alex,
Taking your methodology into consideration, check two things in your scripts:
(1) Be sure that EVERY call to a library handler is in one of these formats:
tell getResourceInfo set someResult to someHandler() end tell
tell getResourceInfo to set someResult to someHandler()
set someResult to getResourceInfo's someHandler()
set someResult to someHandler() of getResourceInfo
(2) Be sure that the properties getResourceInfo and utilities are defined just once in each script and are NOT redefined or overwritten ANYWHERE else in your scripts or libraries.
Mistakes made in either of these areas could cause the error you're seeing. These ideas are the "low hanging fruit" and your errors may be caused by something more complicated.
I have one other thought, Alex. Libraries are a GREAT idea, IMO. Consider going with a more robust method of loading libraries. AppleMods, XModule, ModuleManager, Smile, and Script Debugger come to mind. (Personally, I favor AppleMods and use it extensively in my work.)
HTH, Stan C.
|