[squeak-dev] Sponsored bug of the day: !s in a startup script cause SyntaxErrors

Bob Arning arning315 at comcast.net
Sat Mar 2 11:55:15 UTC 2013


Yes,

CodeLoader >> installSourceFile:

does a #fileIn on your startup file, which means it does expect a chunk 
format. One solution would be to make sure your startup is in that format

(FileStream fileNamed: 'chunkedStartUp')
     nextChunkPut: 'FileStream stdout nextPutAll: ''! is an exclamation 
mark''; flush.';
     flush;
     close

or if your raw startup is in a file already

(FileStream fileNamed: 'chunkedStartUp')
     nextChunkPut: (FileStream readOnlyFileNamed: 'rawStartup') 
contentsOfEntireFile;
     flush;
     close

Cheers,
Bob

On 3/2/13 6:26 AM, Frank Shearar wrote:
> http://bugs.squeak.org/view.php?id=7732 says
>
> Sample startup demonstrating the problem:
>
>      FileStream stdout nextPutAll: '! is an exclamation mark'; flush.
>
> which causes a SyntaxError whose content is:
>
>      FileStream stdout nextPutAll: Unmatched string quote ->'
> ----
> This is probably caused by something thinking the startup script is in
> chunk format?
> ----
>
> The bug is spectacularly annoying because you simply (*) cannot run a
> script headless without first verifying that it works headfully. And
> come on, the ! is in a _string_.
>
> frank
>
>
> (*) The whole startup script process needs to be reworked, and that's
> well out of scope for this ticket or this thread, and we actually need
> some kind of headless UIManager, and that too is out of scope for now!
>
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20130302/11049e44/attachment.htm


More information about the Squeak-dev mailing list