Squeak scripts in UNIX
Bert Freudenberg
bert at freudenbergs.de
Tue Feb 13 20:09:55 UTC 2007
On Feb 13, 2007, at 19:33 , Andreas Raab wrote:
> 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.
It actually works on Unix with an absolute path ;-)
- Bert -
More information about the Squeak-dev
mailing list
|