FROM : Dave Camp
DATE : Wed Apr 06 19:14:41 2005
On Apr 6, 2005, at 9:47 AM, Stephan Ruggiero wrote:
> The problem is that I want to initialize the GUI every time the user
> activates
> the plugin.
> Something like this:
> ->>click on plugin<<-
> 1. initiate variables
> 2. set up GUI according to variables
>
> The only method that allows me to influence button states etc and is
> _not_ called twice is mainViewDidLoad.
>
> Now mainViewDidLoad is only called once (after the first activation of
> the plugin) and even before (!) willSelect
> If the user switches to another plugin and then comes back to mine,
> mainViewDidLoad is not invoked, so I do not have the chance to access
> the GUI again.
>
> willSelect and didSelect are called properly every time, but these
> methods do not
> have any effect on the GUI elements - no idea why. Maybe there are some
> bad connections in IB that would solve this???
I just tried changing my UI from didSelect and it seems to work just
fine. I added the following line:
[optionsButton setHidden:![optionsButton isHidden]];
... and every other time I click on my pref panel the button is hidden.
In other words, you should be able to do whatever you want with you UI
on didSelect and have it show up correctly.
If this is not working for you I'd suggest you have a latent problem
somewhere else in your code.
Good luck,
Dave
DATE : Wed Apr 06 19:14:41 2005
On Apr 6, 2005, at 9:47 AM, Stephan Ruggiero wrote:
> The problem is that I want to initialize the GUI every time the user
> activates
> the plugin.
> Something like this:
> ->>click on plugin<<-
> 1. initiate variables
> 2. set up GUI according to variables
>
> The only method that allows me to influence button states etc and is
> _not_ called twice is mainViewDidLoad.
>
> Now mainViewDidLoad is only called once (after the first activation of
> the plugin) and even before (!) willSelect
> If the user switches to another plugin and then comes back to mine,
> mainViewDidLoad is not invoked, so I do not have the chance to access
> the GUI again.
>
> willSelect and didSelect are called properly every time, but these
> methods do not
> have any effect on the GUI elements - no idea why. Maybe there are some
> bad connections in IB that would solve this???
I just tried changing my UI from didSelect and it seems to work just
fine. I added the following line:
[optionsButton setHidden:![optionsButton isHidden]];
... and every other time I click on my pref panel the button is hidden.
In other words, you should be able to do whatever you want with you UI
on didSelect and have it show up correctly.
If this is not working for you I'd suggest you have a latent problem
somewhere else in your code.
Good luck,
Dave
| Related mails | Author | Date |
|---|---|---|
| Stephan Ruggiero | Apr 5, 11:09 | |
| Dave Camp | Apr 5, 17:53 | |
| Douglas Norton | Apr 5, 19:24 | |
| Stephan Ruggiero | Apr 6, 09:41 | |
| Stephan Ruggiero | Apr 6, 18:47 | |
| Dave Camp | Apr 6, 19:14 |






Cocoa mail archive

