Squeak scripts in UNIX

Andreas Raab andreas.raab at gmx.de
Tue Feb 13 18:33:37 UTC 2007


Matej Kosik wrote:
> This is what everybody knows. However, if Squeak requires URI instead of
> path, it is actually not possible to create Squeak scripts. Is this
> true?

The relevant code is in ProjectLauncher>>startUpAfterLogin and is trying 
to recognize regular files, or rather it is even assuming regular files 
and figures out specific types of URLs:

   scriptName := (Smalltalk getSystemAttribute: 2) ifNil:[''].
   scriptName isEmpty ifFalse:[
     "figure out if script name is a URL by itself"
     isUrl := (scriptName asLowercase beginsWith:'http://') or:[
       (scriptName asLowercase beginsWith:'file://') or:[
       (scriptName asLowercase beginsWith:'ftp://')]].
     isUrl ifFalse:[scriptName := 'file:',scriptName]].

Looks like the culprit is the last line, trying to construct an 
(incorrect) file url. For starters, try fixing this line and see where 
it gets you.

Cheers,
   - Andreas



More information about the Squeak-dev mailing list