From: Jim I. <ji...@ap...> - 2002-03-12 23:47:20
|
Bernard, Yes, whenever you are sending a command that is stored in a variable, you need to add the "--". This is true of a number of commands in Tcl, however... Jim > > > Jim Ingham wrote: > >> On 3/12/02 12:31 PM, "Bernard Desgraupes (by way of Jon Guyer)" >> <bde...@ea...> wrote: >> >> >>> 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. >> >> Yes it does, it takes the -context switch. You can say: >> >> AppleScript execute -context contextToken <Some Script Data> >> > > Oh, that's right, sorry, I was too quick. > There still is this risk of a clash between "--" as a switch and "--" as a > comment sign at > the beginning of an AppleScript script. > This means that we should _always_ use the -- switch in "AppleScript execute" > to be safe. > > Cheers > > Bernard > > > _______________________________________________ > Tcl-mac mailing list > Tc...@li... > https://lists.sourceforge.net/lists/listinfo/tcl-mac > -- ++=++=++=++=++=++=++=++=++=++=++=++=++=++=++=++=++=++=++= Jim Ingham ji...@ap... Developer Tools - gdb |