• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: PreferencePane plugin: awakeFromNib gets called twice
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: PreferencePane plugin: awakeFromNib gets called twice


  • Subject: Re: PreferencePane plugin: awakeFromNib gets called twice
  • From: Dave Camp <email@hidden>
  • Date: Wed, 6 Apr 2005 10:14:41 -0700

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

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >Re: PreferencePane plugin: awakeFromNib gets called twice (From: Stephan Ruggiero <email@hidden>)

  • Prev by Date: Re: Need help with Radio Buttons...
  • Next by Date: Re: Need help with Radio Buttons...
  • Previous by thread: Re: PreferencePane plugin: awakeFromNib gets called twice
  • Next by thread: How to get custom widgets into nib file window ?
  • Index(es):
    • Date
    • Thread