Multiple shell data in one DataAvailable event

Hi,

I’m using the Shell Array(subclass Shell) like below, and I treat the returned Shell data in DataAvailable event.
I need to have several Shell structure for handling multiple requests ( it is the same pattern of requests and JOBID is just different ).
For the one JOBID, it works well.

'shell handling…
'ReDim mgetRepShell_COMPMON(-1) // Clear any prior shells
Dim shell_COMPMON As getRepShell_COMPMON

// Create a new shell
shell_COMPMON = New getRepShell_COMPMON
mgetRepShell_COMPMON.Append(shell_COMPMON)

However, if the Application has multiple requests from user, as you expect multiple shell instances will be created.
I was wondering if how one DataAvailable event can handle these multiple requests.
I’m processing the Shell data by using Me.ReadAll.

Can you let me know how I can distinguish these different returned data with the same DataAvailable event?

Thanks in advance,

Since these are all different shell instances the data available events would be fired in each instance of the shell. That means you can distinguish them by simply knowing which instance the event fired in. One way to do this would be to have a property in your shell class that stores an identifier of some kind.

You could simply assign the array index to this property after appending the shell to the array. Then in the data available event you can find out which indexed instance you’re in by reading that property back.

I hope that makes sense and I understood your intent with the question.

Nice. I seem to understand it. Thank you.
Can you give me very simple code about it?

Sorry about that. It has been just 3 months since I went over Xojo.

Thank you Kevin,
I will try that and get you posted once I make it.