sending text messages in and out of squeak
from another application
David T. Lewis
lewis at mail.msen.com
Mon Aug 6 03:55:36 UTC 2007
On Sun, Aug 05, 2007 at 07:33:01PM -0700, Lawson English wrote:
> John M McIntosh wrote:
> >
> >On Aug 4, 2007, at 5:03 PM, Lawson English wrote:
> >
> >>Thanks. I found something named OSProcess, but from the
> >>documentation, I can't tell if it i s actualy workign on a Mac, or on
> >>any other OS for that matter. Nor can I figure out how to download it
> >>if need be since the latest version is listed as 4.2.2 while the
> >>SqueakMap Package Loader only lists 4.0.1, which won't load anyway
> >>due to some kind of error.
> >
> >The 3.8.18beta1U mac carbon VM in the 3.9 distribution folder now has
> >the OSProcess plugin included.
> >You just need the latest smalltalk software to use. The instructions
> >should tell you "hopefully" how to quickly test it to see if it works
> >for you.
>
> Hmmm. For some reason, the version with 3.8.18beta specified doesnt'
> quite work. A different folder, labled Squeak3.9-final-7067, seemed to
> work better, but it may have just be "cleaner" than the other one when I
> started testing.
>
> Now that I know that it works (I can even do a few simple shell commands
> from the shell window, whee), I have ot figure out how to use it. Are
> they any existing examples I might look at for implementing I/O via pipes?
Look at the class side methods in PipeableOSProcess. There are a number
of examples there, and many of the methods have examples in the method
comments. A PipeableOSProcess is a proxy for an external OS process that
has its stdin/stdout/stderr pipes connected and accessible from Squeak.
You can also create instances of OSPipe if you want to work with pipes
directly, but pay attention to blocking versus non-blocking pipes, as
you can hang up your Squeak VM by reading a blocking pipe that has no
data available.
Dave
More information about the Squeak-dev
mailing list
|