[ot/newbie] Changing init code of widgets in Interface Builder
[ot/newbie] Changing init code of widgets in Interface Builder
- Subject: [ot/newbie] Changing init code of widgets in Interface Builder
- From: Carl Gherardi <email@hidden>
- Date: Thu, 6 Jun 2002 15:32:48 +0800
Hi,
I've got a series of drop down menus in my main application window that i'd
like to "fill" with menus from a preference file during startup.
Do I need to subclass NSPopUpButton and add it to the interface or can I
edit something else to add initialization code?
On the same note, I've subclassed NSView and I want to set up some default
values for variables fo the class.
I (think I) have correctly attempted to override init, but even:
- (void)/(id)init
{
NSLog(@"NSView subclass instantiating");
}
doens't print a thing.
I've (temporarily) got around the problem by placing the init code in a
block
- (void)drawRect:(NSRect)rect
{
if(!blah)
{
blah++;
//init data structures here
}
//Drawing stuff here
}
Pointers much appreciated (as were the last set :)
Thanks
Carl
_______________________________________________
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.