Subclassed Shell vs. Shell as window control

I have built an application that runs a command line tool using an asynchronous shell, as a control in my main window. Works just fine.

I’m trying to rewrite the application so that I can insatiate multiple instances of a shell so that I can split the work I’m doing in that one shell.

In my preliminary testing the shell isn’t working. I’ve subleased a Shell object and coded the methods and properties I need but when I run the subclassed shell’s method (self.execute(theCommand)) I do get a Completedevent firing but no Self.result. (I am expecting a result – if I run the exact same command through the shell as a control in the window I get the result I expect… and at least some error string in the result if there is anything wrong with theCommand)

Here is where I instantiate a shell instance, set the properties and invoke the method:

divideIntoBatches(projectFolder)
var stamper_01 As new StamperShell
stamper_01.ExecuteMode = shell.ExecuteModes.Asynchronous
stamper_01.Canonical = False
stamper_01.TimeOut = 0
stamper_01.Arguments = ""
stamper_01.myBatch = batch_01
stamper_01.searchString = SearchStringTextfield.value
stamper_01.stampRefID

Any thoughts as to why it might not be working?

Thanks!

You need to put those shell objects in an array attached to the window.
Otherwise your shell dies at the end of the method.