In this case I’ve got a container control, lets call it “X”, created by a button (“A”). When another button (“B”) is pressed X should no longer be visible.
Sometimes when B is pressed, X will not yet exist (conserving memory). I want to able to add a line in B that determines whether X exists before trying to act on it. Without this, I get a “does not exist” error.
that’s the point, I only want it created if I’m going to use it. When I move from it, it should disappear. However, pressing B will occur when “o” doesn’t exist.
the programming is basically, press B and if “o” exists then turn it off.
Or else, I could have a number of unused controls hanging out in the memory (wouldn’t that slow down the web page?)
dim o as myContainer
o = new myContainer
then “o” isn’t going to be available anywhere else in the program. Make “o” a property of the window, so you can test it for nil.