views:

13

answers:

1

Hey,

I have a mainMenu.xib - that sets up all my interface items (button, textfields, etc).

I have a LogController that has access to all these items via IBOutlet and IBAction. Works fine - All connected and running well.

However, I want to have NSUserDefault values pre-populated in the textfields. However, I can't figure out how - since my LogController doesn't extend a UIViewController (Like in the iPhone world) - I don't have access to delegate methods like viewDidLoad - etc - where I could put this type of logic.

I can't put it in here (since this doesn't have access to the UI elements in IB):

- (void)applicationDidFinishLaunching:(NSNotification *)aNotification {
    // Insert code here to initialize your application 
}

So for desktop applications on mac, how do I got about solving this type of problem?

+1  A: 

Your friend is

-(void)awakeFromNib

http://www.cocoadev.com/index.pl?AwakeFromNib

zakovyrya
Awesome dood, thanks!
Mr-sk