View Full Version : Making object of IB class file

Feb 2, 2009, 11:03 PM
I have made an application where I have Settings Object available in IB. this object have some outlets and actions available.
Now i need to call some methods of this class from other class. so , i am making an object like:

Settings *settingManager = [[Settings alloc] init];
[settingManager loadSettings]; //loadSettings method will display state of all outlets.

I am not able to load the states of outlets. on debugging i came to know all the outlets are not initialized.

can anyone tell me what is a problem. and i how can i resolve it ?

Feb 3, 2009, 03:00 PM
Assuming your class is properly loading a nib already, you most likely are trying to access the outlets too early, before the nib has loaded. If this is an NSWindowController subclass, call [self window] to load the nib in your loadSettings method.