Gotchas for Static Variable for a window's event?

I’m having problems with my main window’s activate event recycling through some code.

I’m looking for gotchas for creating a static variable to stop it from going into a section of the event. This section is controlled by variables set outside of the event. The section is related to working on the app’s dictionary. What I would do is declare the variable at the head of event as true, and set it to false at the end of the event.

For instance I noticed a post which to me implied even after the window closed, that the variable existed. I think it was misstated. Am I correct?

Are there other things to consider?

No, Joe is. As a Xojo Engineer, Joe was very familiar with the framework. I tried to explain static variables here for you, but ended up with just different words for exactly what Joe said.

I’m not certain how to make it any more clear, so here’s the link to Static in the documentation

Yeh. I want something that extinguishes with the window. The app as life is too long. Thanks for confirming the other way.

A property on the window would do that.

1 Like