From: Bernard D. <bde...@ea...> - 2002-03-12 20:33:05
|
[Originally reported to alphatcl-developers]: Hello, I'm currently developping an AppleScript Menu and enhancing the AppleScript mode for Alpha8 : everything goes fine except for two problems (a bug and a mistake) I have found in the Tclapplescript shared library. I'm not sure if this is the right place to report them, so I'll mention them here and please forward them or tell me whom I should send them to. Here are the two problems 1- this is with the "AppleScript execute" command. When the first two characters of your script are a comment sign (double dash) the interpreter gets confused and thinks it is an option : it sends an error message : "Error, no value given for switch etc," followed by the entire text of your script. To avoid this, the code for the tclOSAExecuteCmd (in tclMacOSA.c) should be made more robust. To tell the truth I don't really see the necessity of a check for an "--" option since this command doesn't have any switch. Anyway, as a temporary and very simple workaround in my Tcl code, I have inserted a blank space at the beginning of the text of the script I transmit to "AppleScript execute" : proc Scrp::doExecute {text} { AppleScript execute " $text" } 2- Not really a bug, just a mistake in the doc. It says that the syntax to delete a context is AppleScript delete scriptName This is not true. The syntax must be AppleScript delete what scriptName where 'what' is either "context" or "script". Cheers Bernard BTW this AppleScript Menu will help solving several problems of interapplication communication when the Apple Events syntax is not available. _______________________________________________ AlphaTcl-developers mailing list Alp...@li... https://lists.sourceforge.net/lists/listinfo/alphatcl-developers |