• 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
[ot/newbie] Changing init code of widgets in Interface Builder
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[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.

  • Prev by Date: Re: [ANN] improved image view
  • Next by Date: Re: Any way to draw a PixMapHandle into an NSView??
  • Previous by thread: How to print a window PLUS its open drawer
  • Next by thread: Re: [ot/newbie] Changing init code of widgets in Interface Builder
  • Index(es):
    • Date
    • Thread