[squeak-dev] Re: MacOSX VM and scripts
Bergel, Alexandre
bergel at iam.unibe.ch
Thu Sep 4 10:56:30 UTC 2008
Thanks Andreas and John.
The problems seems to come from the VM.
The script name I provided is not part of the argument. Only two
system attributes are present: the name of the VM and the name of the
image.
I will try to compile a unix VM instead of using the Universal osx one.
Cheers,
Alexandre
On 4 Sep 2008, at 09:45, Andreas Raab wrote:
> Bergel, Alexandre wrote:
>> I am now trying to provide a script name in the command line to
>> execute a script after having open the image. However scripts are
>> not loaded apparently.
>
> The first thing you should is to look at the arguments that are
> actually coming into the image:
>
> 0 to: 10 do:[:i|
> arg := Smalltalk getSystemAttribute: i.
> arg ifNotNil:[Transcript cr; show: i; tab; show: arg].
> ].
>
> If the script is in there then it's handling in the image that is
> wrong, otherwise it's the VM. If it's in the image you can either
> write code that looks at the args explicitly (good choice if your
> image is effectively an app and not a development image) or if it's
> a dev-image, use AutoStart/AbstractLauncher (how I hate these
> "Abstract" class names - why is this not called AutoLauncher?).
> Check out CommandLineLauncherExample for this.
>
> Cheers,
> - Andreas
>
>> The command below simply opens the image, without loading the script:
>> -=-=-=-=-=-=-=-=-=-=-=-=
>> Users/alexandrebergel/Desktop/Smalltalk/Squeak/Squeak\
>> 3.8.12beta4U.app/Contents/MacOS/Squeak\ VM\ Opt $PWD/ready.image
>> $PWD/test.st
>> -=-=-=-=-=-=-=-=-=-=-=-=
>> in which test.st simply contains 10/0.
>> I would have expected a debugger to be open.
>> I tried various combinations with file:/$PWD/test.st, file:$PWD/
>> test.st, file://$PWD/test.st but this does not help to load the
>> script.
>> Any idea?
>> Cheers,
>> Alexandre
>> On 3 Sep 2008, at 17:53, Bert Freudenberg wrote:
>>>
>>> Am 03.09.2008 um 17:42 schrieb Bergel, Alexandre:
>>>
>>>> Dear List,
>>>>
>>>> I try to run the OSX VM from the command line. I run the
>>>> following command, where ready.image is a Squeak image:
>>>>
>>>> /Users/alexandrebergel/Desktop/Smalltalk/Squeak/Squeak\
>>>> 3.8.12beta4U.app/Contents/MacOS/Squeak\ VM\ Opt ready.image
>>>>
>>>> A mac file browser opens and apparently is waiting for me to
>>>> select an image. The image is not run therefore. This is strange
>>>> since I provided the name of one.
>>>
>>>
>>> You need to give the full path to the image.
>>>
>>> - Bert -
>>>
>>>
>>>
>
>
--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
More information about the Squeak-dev
mailing list
|