[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [MacPerl] Fix for Alpha editor/MacPerl curly quotes bug.



On Sun, 16 Feb 1997, Dan Herron wrote:
> I think this is either an Alpha thing or a general AppleEvent thing.
> Anyway, Alpha seems to use curly-quotes to delimit some of the parameters
> it sends to MacPerl. A quick fix would be to make Alpha straighten out all
> the quotes before wrapping it up for MacPerl. You still wouldn't get curly
> quotes in your script, but at least you wouldn't get mysterious failures.

AEBuild (part of the AEGizmos package) uses curly quotes to delimit
arguments in Apple Events. I don't know how to escape embedded curly
quotes ('\' doesn't do it), so it does look like the only fix would be to
substitute straight quotes. 

> Does anybody know anything about AppleEvents? Is this specific to Alpha? If
> not, is there some way to protect or escape curly-quotes? The chr(211)
> stuff obviously won't work in all cases.
> 
> (On a related note--MacPerl seems to mis-count line numbers if any
> commented lines precede the #!/usr/local/bin/perl line. I.e., it might say
> there's an error on line 20, but _really_ mean line 25. Is this a bug in
> MacPerl or must nothing occur before that line?)

The line number reported in the error-messages window is just the text
returned by MacPerl.  The macperl-mode code in Alpha may add a line or two
of text to your script before sending it to MacPerl, and so there will be
a discrepancy (of just one or two) between the line numbers referred to by
MacPerl and those of your original file.  Alpha keeps track of this,
however, and makes the appropriate adjustment when it highlights errors in
your script.  It would probably be possible to change all line references
in MacPerl's error output, too, if people thought it was worthwhile.

Is Alpha highlighting the wrong line when you have an error?  If so, it
would be useful to have a description of how to reproduce the problem. 

Cheers,

Tom

(Alpha perl.tcl author)
-------------------------------------------------------------------------
W. Thomas Pollard                                    Schrodinger, Inc.
pollard@psgvb.com                                  http://www.psgvb.com/
-------------------------------------------------------------------------