View Single Post
11-24-14, 08:45 PM   #8
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
Let's call your two objects Frame and Button. When you click on Button, you want to toggle whether Frame is shown or hidden.

To do that, you need to set an OnClick script on Button, that checks whether Frame is hidden or shown, and then shows or hides Frame as needed.

The problem with your current code is that you are setting the OnClick script on Button, which is correct, but inside that script you are checking the visible status of Button, and hiding or showing Button, which is not correct -- you need to change the script to look at and toggle Frame, not Button.

Also, having your questions about the same body of code randomly split across two threads is fairly confusing; I'd suggest sticking to one thread.
__________________
Retired author of too many addons.
Message me if you're interested in taking over one of my addons.
Don’t message me about addon bugs or programming questions.
  Reply With Quote