I’ve identified what appears to be an application hang with one of our customers where when they Quit one of our apps, the window closes, but the App continues to run. It turns out that there can be a sequence where a long running thread can be started and the user then elects to Quit. The Quit closes the open windows, but the thread which could run for 3 or 4 minutes is still running.
In App.CancelClose, I added a call to thLoadTapeState.Kill (the thread that’s running), but the compiler tells me “This item does not exist” with the Kill highlighted.
thLoadTapeState is a global project object and is not assigned to a specific window or code module.
I get the very same error for a thread placed the same way. But if I put a subclass on a window, then the State property is recognized. Maybe you can use that for a workaround.
is thLoadTapeState a global variable defined in a module as a property ?
is it namespaced ?
I’m not exactly clear on how its defined which probably plays into why the compiler thinks it doesn’t exist
If you truly added it to the project, then that is just the subclass definition. You have to be acting on an instance.
What does that code look like? Is it literally thLoadTapeState.Run? Or is it something else? If app.Open can execute thLoadTapeState.Run, then app.CancelClose can execute thLoadTapeState.Kill. So there’s something you’re not telling us.