Launching multiple async Shells

Hi,

(On OS X)
I can execute async (mode=1) shells without problems but I can’t seem to figure out how to launch multiple async shells at the same time.
I was under the assumption that I could just launch multiple shells and then handle the results of the different instances myself in the dataavailable event (and track the different results with a handle/ID).
It seems that’s not the case because it looks like as if I launch the second one while the first one is still running, the first one quits.

I think I’m doing it totally wrong but this is what I did:
I created a class myAsyncShell with Shell as Super
Then I dragged it in the Window and called it asyncShell.
I added the datavailable and iscompleted logic under asyncShell.

Now here’s where I’m stuck. How do I call asyncShell multiple times? If I want to launch 10, do I need to prepare 10 ‘slots’ (asyncShell1…asyncShell10) upfront?
I would like to reuse asyncShell because I don’t know how many I want to launch upfront but I’m not allowed to Dim array(x) or sh1, sh2 etc… As New asyncShell.

dragging an instance to the window means you can use that ONE instance at one time

to create multiple create them in code

dim s as new myAsyncShell

// now comes the tricky part - how do I keep a reference to each one & how do I hook up the event handlers ?
// 1) an array of asyncshells and the array is a property on this window
myArrayOfAsyncShells.append s

// 2) - addhandler - this is one you probably need to read the reference and then ask about
// it lets you programmatically say which method handles which events

I understand the first part about creating them in the code. Thank you.

But about the tricky part… uff.
Are you saying that I don’t create the dataavailable and iscompleted events under myAsyncShell but create new methods and somehow make references to them?