How to setup "Open with" Squeak for images (jpeg etc)
Milan Zimmermann
milan.zimmermann at sympatico.ca
Mon Nov 17 03:01:00 UTC 2003
On November 16, 2003 02:08 pm, squeak at oafamily.com wrote:
> I haven't had too much call for such functionality yet, but it seems
> to me it would be a useful tool for the OS to be able to send messages
> to a running image. For example when a user double clicks an icon,
> follows a link in a (gasp) non scamper browser and squeak acts as a
> helper application (here is where my interest lies), or executes
> something from a command line.
From the way I use applications, this would be a great thing to have. To me
it's not realistic to think one would "live in squeak" completely including
web browsing, email etc (people may do it but I would personally feel
constraint by it).
> It would probably have to be platform specific, and might require a
> helper app, perhaps based on the VM, that just runs long enough to get
> the info over to squeak or start it up if it's not running (I think
> that's how emacs does it).
gnuserv is what is used in emacs to contact a running emacs instead of
starting new emacs for every file opened from a File Manager (etc). Something
similar would be useful ... this whole thing of "Squeak cooperating with
other applications" made me think I should write a paragraph about my
experience with that ... in a separate email :-)
Milan
> I'm also not sure how it would handle
> multiple images already running.
> Having written this, I'm sure someone will now point out that it is
> already easily achieved, but I have not spotted the solution it my,
> admittedly cursory, search.
> Any ideas or suggestions how to achieve this?
>
> Extensionally,
> Daniel Abeshouse
>
> On Sat, 2003-11-15 at 11:35, 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
|