How to setup "Open with" Squeak for images (jpeg etc)

ducasse ducasse at iam.unibe.ch
Sun Nov 16 09:15:58 UTC 2003


Hi milan

I do not know if this is adequate for you but a draft of my forthcoming 
book is available at
http://scgwiki.iam.unibe.ch:8080/StephaneDucasseWiki/4

The idea is to have father writing with their kids small programs and 
learn this way how to program
and have fun.



Stef


On Dimanche, nov 16, 2003, at 11:04 Europe/Zurich, Milan Zimmermann 
wrote:

> Bert,
>
> Thanks, I am definitely going to try this - I have never done any 
> Smalltalk or
> Squeak coding, so this is a good chance. Will let you know a 
> success/failure,
>
> Milan
>
> On November 15, 2003 11:35 am, Bert Freudenberg wrote:
>> Milan Zimmermann wrote:
>>> Hi,
>>>
>>> I'd like to setup my kid's PC (Linux w. KDE) for them to be able to 
>>> open
>>> images with Squeak from the file manager. The idea is that by 
>>> clicking on
>>> a "my-graphics.jpeg" file in the OS File Manager, squeak would start 
>>> and
>>> open the image using the Paint, ideally in a new project. (I guess
>>> similarly what "Find + View" would do.)
>>>
>>> I am not asking about how to define the file type association, rather
>>> whether it's possible to execute Squeak with a set of options to 
>>> start
>>> Squeak, run Paint and edit the image, I am thinking something like:
>>>
>>> # squeak  image  script-which-opens-paint  my-graphics.jpeg
>>>
>>> Is something like this possible? I guess it would be usefull to have
>>> squeak acting as "viewer/editor" for any file types that squeak can
>>> handle ..
>>
>> The script could look like this:
>> 	| stream filename image sketch |
>>
>> 	filename := Smalltalk getSystemAttribute: 3.
>> 	stream := FileStream readOnlyFileNamed: filename.
>> 	[image := Form fromBinaryStream: stream] ensure: [stream close].
>> 	sketch := SketchMorph withForm: image.
>> 	sketch openInWorld
>>
>> and would be called like this:
>>
>> squeak /full/path/to/my.image /full/path/to/script.st
>> /full/path/to/image.jpeg
>
>




More information about the Squeak-dev mailing list