squeak 3.10 et CommandShell

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

squeak 3.10 et CommandShell

Frédéric Ferrère-2
Bonjour,

je rencontre un petit problème avec le package CommandShell
récupéré via SqueakMap sur une image squeak3.10-web.

L'évaluation de :

CommandShell command: 'ls'

me renvoie une erreur (voir image jointe)


Le code de la méthode de la classe CommandShell
=============
environment

    ^ environment ifNil:
        [environment := Smalltalk at: #OSProcess ifPresent:
            [:osp | osp thisOSProcess environment deepCopy]].
=============

Curieusement, la cle #OSProcess n'existe pas dans la collection Smalltalk
d'ou la valeur nil renvoyée et utilisée dans la méthode
setHomeDirectory de CommandShell.

Que faire ?

Merci.

Cordialement,
--
Frédéric

_______________________________________________
Squeak-fr mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/squeak-fr

command-shell-error.gif (36K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: squeak 3.10 et CommandShell

David T. Lewis
On Thu, Nov 20, 2008 at 12:20:07AM +0100, Fr?d?ric Ferr?re wrote:

> Bonjour,
>
> je rencontre un petit probl?me avec le package CommandShell
> r?cup?r? via SqueakMap sur une image squeak3.10-web.
>
> L'?valuation de :
>
> CommandShell command: 'ls'
>
> me renvoie une erreur (voir image jointe)
>
>
> Le code de la m?thode de la classe CommandShell
> =============
> environment
>
>    ^ environment ifNil:
>        [environment := Smalltalk at: #OSProcess ifPresent:
>            [:osp | osp thisOSProcess environment deepCopy]].
> =============
>
> Curieusement, la cle #OSProcess n'existe pas dans la collection Smalltalk
> d'ou la valeur nil renvoy?e et utilis?e dans la m?thode
> setHomeDirectory de CommandShell.
>
> Que faire ?
Bonjour Fr?d?ric,

I am sorry that I must reply in English, I hope that you do not mind.

This is a bug in CommandShell. It is fixed in CommandShell on SqueakSource,
so you can load the latest version there. I have not updated SqueakMap
though.

I recommend that you also load package OSProcess, otherwise CommandShell
is not very useful.

The correct method for CommandShell>>environment is this:

environment
        ^ environment ifNil:
                [environment := (Smalltalk at: #OSProcess ifPresent:
                        [:osp | osp thisOSProcess environment deepCopy]) ifNil: [Dictionary new]].

Sorry for my poor French ;)

Dave


_______________________________________________
Squeak-fr mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/squeak-fr
Reply | Threaded
Open this post in threaded view
|

Re: squeak 3.10 et CommandShell

Frédéric Ferrère-2
David T. Lewis a écrit :

>
> Bonjour Fr?d?ric,
>
> I am sorry that I must reply in English, I hope that you do not mind.
>
> This is a bug in CommandShell. It is fixed in CommandShell on SqueakSource,
> so you can load the latest version there. I have not updated SqueakMap
> though.
>
> I recommend that you also load package OSProcess, otherwise CommandShell
> is not very useful.
>
> The correct method for CommandShell>>environment is this:
>
> environment
> ^ environment ifNil:
> [environment := (Smalltalk at: #OSProcess ifPresent:
> [:osp | osp thisOSProcess environment deepCopy]) ifNil: [Dictionary new]].
>
> Sorry for my poor French ;)
>
> Dave
>

it works fine.

Thanks

(My english is not perfect too :) )

--
Frédéric
_______________________________________________
Squeak-fr mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/squeak-fr