Re: Trouble with preference pane
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.