• 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: Trouble with preference pane
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Trouble with preference pane


  • Subject: Re: Trouble with preference pane
  • From: email@hidden
  • Date: Sun, 17 Mar 2002 23:44:19 -0800

I am creating a preference pane and want to feed my NSPopUpButton with info
from the system.

If I try the following, my PopUp are not updated with my data:
- (void) mainViewDidLoad
{
[super mainViewDidLoad];
[internalIface removeAllItems];
[internalIface addItemsWithTitles:[self getInterfaceIPList]];
}

But if I add a button and link it with:
- (IBAction)doDebug:(id)sender{
[self mainViewDidLoad];
}

This work! My PopUp are updated... I tried also with the - (void)willSelect
function but it doesn't either...

Well, seems to me there are two likely possibilities.
One, -mainViewDidLoad isn't getting called without being "bumped". Do you have any reason to believe it's getting called in the normal course of events? Or are you just assuming it is?
Two, -mainViewDidLoad is getting called, but the timing is wrong, such that internalIface hasn't been set yet, or isn't ready to have items loaded for some reason, or [self getInterfaceIPList] isn't yet prepared to return a good list because something else hasn't gotten initialized yet, etc. etc.
These sorts of problems tend to be pretty tractable with 5 or 10 minutes in a debugger, you know... :->

Ben Haller
Stick Software
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Prev by Date: Re: NSTextView with transparent text?
  • Next by Date: OT: Re: Slow Project Builder...
  • Previous by thread: Trouble with preference pane
  • Next by thread: Re: Trouble with preference pane
  • Index(es):
    • Date
    • Thread