2 Replies Latest reply on Feb 5, 2007 3:22 PM by SymTsb

    Class Problems

    SymTsb Level 2
      Hey guys. If you would, look at the code below. Below is the code for my button handlers in my SubMenu class. Now that I have a finished Window class, I want the SubMenu class to create the Window when an option is pressed. This works great. The issue I have is that I need this window deleted before another is created if the window exists. Any pointers would be helpful. I've tried numerous different things and as of yet, still haven't been able to get my SubMenu class to destroy the Window when a new option is pressed.
        • 1. Re: Class Problems
          abeall Level 3
          For one thing, you could overwrite it by creting the new Window at the same depth. Instead of using getNextHighestDepth, you could hard code in a value, or create a variable in the constructor(say, where is the constructor for your class??) using getNextHighestDepth and just stick with that, and maybe put a blank MC there so other calls to getNextHighestDepth from other places don't try to use that depth.
          • 2. Re: Class Problems
            SymTsb Level 2
            hey. thanks for the thought. I never thought of that. I'll try to loading into the same depth as the one before. that should work.