Keeping Variables Alive
On 4 Jun, 13:14, "Jim Cone" wrote:
The collection still reset to nothing when I added the second combobox.
That is new to me.
I am glad it isn't just me going mad then.
In any case, I try to avoid public variables. *
I will pass a collection object to other subs/function as needed an then
set it to nothing when exiting.
I don't really see that I have much option here. There is an
initialisation phase which checks the data and builds an array of OLE
links to data items in a third-party application (which in turn links
to embedded code in an engine conrtoller, which links to a dynamometer
controller...). At some future point the user can hit a second button
and start the test. In the meantime there is no thread running. I
don't want to go through the time-consuming data check and array
creation process every time, but there is no thread active to pass the
data to the second-phase code when the user presses the button. I am
not using the globals for their globality so much as for their static-
ness. Or that was the plan anyway.
|