How to setup "Open with" Squeak for images (jpeg etc)
Milan Zimmermann
milan.zimmermann at sympatico.ca
Sun Nov 16 10:04:26 UTC 2003
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
|