• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: "script does not understand the [handler] message" appears randomly
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: "script does not understand the [handler] message" appears randomly


  • Subject: Re: "script does not understand the [handler] message" appears randomly
  • From: Stan Cleveland <email@hidden>
  • Date: Thu, 23 May 2013 13:36:12 -0700

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.

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

  • Follow-Ups:
    • Re: "script does not understand the [handler] message" appears randomly
      • From: Alex Hall <email@hidden>
References: 
 >"script does not understand the [handler] message" appears randomly (From: Alex Hall <email@hidden>)
 >Re: "script does not understand the [handler] message" appears randomly (From: Stan Cleveland <email@hidden>)
 >Re: "script does not understand the [handler] message" appears randomly (From: Alex Hall <email@hidden>)

  • Prev by Date: Re: "script does not understand the [handler] message" appears randomly
  • Next by Date: Re: "script does not understand the [handler] message" appears randomly
  • Previous by thread: Re: "script does not understand the [handler] message" appears randomly
  • Next by thread: Re: "script does not understand the [handler] message" appears randomly
  • Index(es):
    • Date
    • Thread