Debugging a plugin

David T. Lewis lewis at mail.msen.com
Wed Feb 1 16:08:19 UTC 2006


On Wed, Feb 01, 2006 at 02:22:34PM -0000, Bob.Cowdery at CGI-Europe.com wrote:
> David Lewis wrote:
> 
> > "Open a console window with stdin, stdout, and stderr streams attached."
> > OSProcess thisOSProcess openConsole.
> 
> What console should this open. I don't get any console.

It should open a separate Windows window (possibly hidden behind the
Squeak window).

> 
> > "Write to the standard output stream, displayed on the console"
> > OSProcess thisOSProcess stdOut
> >   nextPutAll: 'this is the standard output stream';
> >   nextPut: Character lf.
> 
> OSProcess thisOSProcess stdOut returns me nil.

Hmm, the plugin is not working then. I'm away from my Squeak computer
so I can't help much at the moment, but the two things I would check
are:

1) Plugin paths can be confusing. If you have an older copy of the OSPP
plugin (as would have gotten whenever you installed OSProcess from
SqueakMap), make sure you are not running that one instead of the more
recent OSPP 4.0 that I sent to you. There is a #primitiveVersionString
primitive in OSPP identifies the actual version of the plugin that you
are running. I don't remember for sure, but I think I put a method in
the OSPP source (download from SqueakMap) that calls the primitive,
probably it's "OSProcessPlugin primVersionString" or something like that.

2) Are you building a VM from the latest SVN sources by any chance?
If so, the #stdOut method won't work due to some recent security
changes to the Windows FilePlugin. If that's the problem, you can
probably just comment out the security checks in the Windows
FilePlugin support code as a workaround (I don't have any better
solution at the moment).

Dave




More information about the Squeak-dev mailing list