logo       

Re: Passing arguments to squeak image: msg#00072

lang.smalltalk.squeak.beginners

Subject: Re: Passing arguments to squeak image


On May 17, 2007, at 14:45 , subbukk wrote:

On Thursday 17 May 2007 4:38 pm, Bert Freudenberg wrote:
You can pass an empty argument as first option after the image name
followed by your other arguments, or deactivate the launcher in your
image.
squeak squeak.image /dev/null arg1 bag arg2 of arg3 of chips
results in error[1]. But
squeak squeak.image '' arg1 .....
and then printing "SmalltalkImage current extractParameters" gives:
a Dictionary('ARG1'->'bag' 'ARG2'->'of' 'ARG3'->'chips' )

The first case fails because String>>unzipped doesn't check for isEmptyOrNil
on self. With the patch:
self isEmptyOrNil ifTrue: [^''].

the first line works as expected.

The first case should not fail silently. The error is on purpose (though it might be more meaningful).

- Bert -


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise