Giving a script to squeak

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Giving a script to squeak

Damien Cassou-3
Hi,

I can't pass a script to squeak and get it executed:

$ cat test.sq
Transcript cr; show: 'Hello, world'.
$ squeak Squeak3.9-final-7067.image test.sq &

Results in:

CodeLoader(Object)>>error:
        Receiver: a CodeLoader
        Arguments and temporary variables:
                aString: 'No content to install'
        Receiver's instance variables:
                baseURL: ''
                sourceFiles: an Array(a HTTPDownloadRequest)
                segments: nil
                publicKey: nil

CodeLoader>>installSourceFile:
        Receiver: a CodeLoader
        Arguments and temporary variables:
                aStream: nil
                contents: nil
                trusted: nil
        Receiver's instance variables:
                baseURL: ''
                sourceFiles: an Array(a HTTPDownloadRequest)
                segments: nil
                publicKey: nil

[] in CodeLoader>>installSourceFiles {[:req | self installSourceFile:
req contentStream]}
        Arguments and temporary variables:
                req: a HTTPDownloadRequest

Array(SequenceableCollection)>>do:
        Receiver: an Array(a HTTPDownloadRequest)
        Arguments and temporary variables:
                aBlock: [] in CodeLoader>>installSourceFiles {[:req | self
installSourceFile: r...etc...
                index: 1
                indexLimiT: 1
        Receiver's instance variables:
an Array(a HTTPDownloadRequest)


--- The full stack ---
CodeLoader(Object)>>error:
CodeLoader>>installSourceFile:
[] in CodeLoader>>installSourceFiles {[:req | self installSourceFile:
req contentStream]}
Array(SequenceableCollection)>>do:
 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
CodeLoader>>installSourceFiles
ProjectLauncher>>startUpAfterLogin
ProjectLauncher>>startUp
[] in AutoStart class>>startUp: {[launcher startUp]}
...

--
Damien Cassou

Reply | Threaded
Open this post in threaded view
|

Re: Giving a script to squeak

Bert Freudenberg
You have to give a full path. Squeak does not know about Unix's idea  
of a current working directory.

- Bert -

On Nov 20, 2007, at 17:02 , Damien Cassou wrote:

> Hi,
>
> I can't pass a script to squeak and get it executed:
>
> $ cat test.sq
> Transcript cr; show: 'Hello, world'.
> $ squeak Squeak3.9-final-7067.image test.sq &
>
> Results in:
>
> CodeLoader(Object)>>error:
> Receiver: a CodeLoader
> Arguments and temporary variables:
> aString: 'No content to install'
> Receiver's instance variables:
> baseURL: ''
> sourceFiles: an Array(a HTTPDownloadRequest)
> segments: nil
> publicKey: nil
>
> CodeLoader>>installSourceFile:
> Receiver: a CodeLoader
> Arguments and temporary variables:
> aStream: nil
> contents: nil
> trusted: nil
> Receiver's instance variables:
> baseURL: ''
> sourceFiles: an Array(a HTTPDownloadRequest)
> segments: nil
> publicKey: nil
>
> [] in CodeLoader>>installSourceFiles {[:req | self installSourceFile:
> req contentStream]}
> Arguments and temporary variables:
> req: a HTTPDownloadRequest
>
> Array(SequenceableCollection)>>do:
> Receiver: an Array(a HTTPDownloadRequest)
> Arguments and temporary variables:
> aBlock: [] in CodeLoader>>installSourceFiles {[:req | self
> installSourceFile: r...etc...
> index: 1
> indexLimiT: 1
> Receiver's instance variables:
> an Array(a HTTPDownloadRequest)
>
>
> --- The full stack ---
> CodeLoader(Object)>>error:
> CodeLoader>>installSourceFile:
> [] in CodeLoader>>installSourceFiles {[:req | self installSourceFile:
> req contentStream]}
> Array(SequenceableCollection)>>do:
>  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
> CodeLoader>>installSourceFiles
> ProjectLauncher>>startUpAfterLogin
> ProjectLauncher>>startUp
> [] in AutoStart class>>startUp: {[launcher startUp]}
> ...
>
> --
> Damien Cassou
>


Reply | Threaded
Open this post in threaded view
|

Re: Giving a script to squeak

keith1y
In reply to this post by Damien Cassou-3
Damien Cassou wrote:
> Hi,
>
> I can't pass a script to squeak and get it executed:
>
>  
If you load Launcher (friend of Installer) it fixes that problem. It
also theoretically allows you to run a script before the GUI process has
started which could be used to ressurect images with a broken gui process.

Keith

Reply | Threaded
Open this post in threaded view
|

Re: Giving a script to squeak

Hilaire Fernandes-4
In reply to this post by Damien Cassou-3
I described it there in the French FAQ,

http://community.ofset.org/index.php/FAQ_d%C3%A9veloppeur_Squeak#Comment_d.C3.A9marrer_l.27image_avec_un_script_en_Smalltalk_.3F

Don't know if the URL will go through.

Hilaire

Damien Cassou a écrit :

> Hi,
>
> I can't pass a script to squeak and get it executed:
>
> $ cat test.sq
> Transcript cr; show: 'Hello, world'.
> $ squeak Squeak3.9-final-7067.image test.sq &
>
> Results in:
>
> CodeLoader(Object)>>error:
> Receiver: a CodeLoader
> Arguments and temporary variables:
> aString: 'No content to install'
> Receiver's instance variables:
> baseURL: ''
> sourceFiles: an Array(a HTTPDownloadRequest)
> segments: nil
> publicKey: nil
>
> CodeLoader>>installSourceFile:
> Receiver: a CodeLoader
> Arguments and temporary variables:
> aStream: nil
> contents: nil
> trusted: nil
> Receiver's instance variables:
> baseURL: ''
> sourceFiles: an Array(a HTTPDownloadRequest)
> segments: nil
> publicKey: nil
>
> [] in CodeLoader>>installSourceFiles {[:req | self installSourceFile:
> req contentStream]}
> Arguments and temporary variables:
> req: a HTTPDownloadRequest
>
> Array(SequenceableCollection)>>do:
> Receiver: an Array(a HTTPDownloadRequest)
> Arguments and temporary variables:
> aBlock: [] in CodeLoader>>installSourceFiles {[:req | self
> installSourceFile: r...etc...
> index: 1
> indexLimiT: 1
> Receiver's instance variables:
> an Array(a HTTPDownloadRequest)
>
>
> --- The full stack ---
> CodeLoader(Object)>>error:
> CodeLoader>>installSourceFile:
> [] in CodeLoader>>installSourceFiles {[:req | self installSourceFile:
> req contentStream]}
> Array(SequenceableCollection)>>do:
>  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
> CodeLoader>>installSourceFiles
> ProjectLauncher>>startUpAfterLogin
> ProjectLauncher>>startUp
> [] in AutoStart class>>startUp: {[launcher startUp]}
> ...
>


Reply | Threaded
Open this post in threaded view
|

Re: Giving a script to squeak

Damien Cassou-3
In reply to this post by Bert Freudenberg
Thank you very much to all of you.

2007/11/20, Bert Freudenberg <[hidden email]>:

> You have to give a full path. Squeak does not know about Unix's idea
> of a current working directory.
>
> - Bert -
>
> On Nov 20, 2007, at 17:02 , Damien Cassou wrote:
>
> > Hi,
> >
> > I can't pass a script to squeak and get it executed:
> >
> > $ cat test.sq
> > Transcript cr; show: 'Hello, world'.
> > $ squeak Squeak3.9-final-7067.image test.sq &
> >
> > Results in:
> >
> > CodeLoader(Object)>>error:
> >       Receiver: a CodeLoader
> >       Arguments and temporary variables:
> >               aString:        'No content to install'
> >       Receiver's instance variables:
> >               baseURL:        ''
> >               sourceFiles:    an Array(a HTTPDownloadRequest)
> >               segments:       nil
> >               publicKey:      nil
> >
> > CodeLoader>>installSourceFile:
> >       Receiver: a CodeLoader
> >       Arguments and temporary variables:
> >               aStream:        nil
> >               contents:       nil
> >               trusted:        nil
> >       Receiver's instance variables:
> >               baseURL:        ''
> >               sourceFiles:    an Array(a HTTPDownloadRequest)
> >               segments:       nil
> >               publicKey:      nil
> >
> > [] in CodeLoader>>installSourceFiles {[:req | self installSourceFile:
> > req contentStream]}
> >       Arguments and temporary variables:
> >               req:    a HTTPDownloadRequest
> >
> > Array(SequenceableCollection)>>do:
> >       Receiver: an Array(a HTTPDownloadRequest)
> >       Arguments and temporary variables:
> >               aBlock:         [] in CodeLoader>>installSourceFiles {[:req | self
> > installSourceFile: r...etc...
> >               index:  1
> >               indexLimiT:     1
> >       Receiver's instance variables:
> > an Array(a HTTPDownloadRequest)
> >
> >
> > --- The full stack ---
> > CodeLoader(Object)>>error:
> > CodeLoader>>installSourceFile:
> > [] in CodeLoader>>installSourceFiles {[:req | self installSourceFile:
> > req contentStream]}
> > Array(SequenceableCollection)>>do:
> >  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
> > CodeLoader>>installSourceFiles
> > ProjectLauncher>>startUpAfterLogin
> > ProjectLauncher>>startUp
> > [] in AutoStart class>>startUp: {[launcher startUp]}
> > ...
> >
> > --
> > Damien Cassou
> >
>
>
>


--
Damien Cassou