• 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
Re: programmaticaly modify .nib files
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: programmaticaly modify .nib files


  • Subject: Re: programmaticaly modify .nib files
  • From: Nick Zitzmann <email@hidden>
  • Date: Fri, 6 May 2005 08:47:11 -0600


On May 6, 2005, at 7:28 AM, Frank D. Engel, Jr. wrote:

I think I figured out how to load the NIB file (using the NSNib and NSBundle classes),

All you need to do is use the +[NSBundle loadNibNamed:owner:] method.

but how do I actually get a reference for a specific dialog within the NIB file? There are four different versions of the dialog, and I want to display a different one depending on the parameters sent to the method.

You need to set the owner in the nib file by choosing the "File's owner" object and setting a custom class in the info window. If the nib contains a window, then you should consider subclassing NSWindowController and setting the owner to the subclass. NSWindowController has built-in nib loading methods.


But what are you putting into the dialog? If it's just a simple message and OK/Cancel/Don't Save/etc. window, then you should instead consider using the NSAlert class.

Nick Zitzmann
<http://www.chronosnet.com/>


_______________________________________________ Do not post admin requests to the list. They will be ignored. Cocoa-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
  • Follow-Ups:
    • Re: programmaticaly modify .nib files
      • From: "Frank D. Engel, Jr." <email@hidden>
References: 
 >programmaticaly modify .nib files (From: Pierre Chatel <email@hidden>)
 >Re: programmaticaly modify .nib files (From: Ondra Cada <email@hidden>)
 >Re: programmaticaly modify .nib files (From: Ondra Cada <email@hidden>)
 >Re: programmaticaly modify .nib files (From: "Frank D. Engel, Jr." <email@hidden>)

  • Prev by Date: NSTextView and bindings with manual notification
  • Next by Date: Re: What's the proper way of creating a temporary NSWindow from a Carbon window?
  • Previous by thread: Re: programmaticaly modify .nib files
  • Next by thread: Re: programmaticaly modify .nib files
  • Index(es):
    • Date
    • Thread