• 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: "Frank D. Engel, Jr." <email@hidden>
  • Date: Fri, 6 May 2005 15:26:16 -0400

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Yeah, that works great!

Thank you.

On May 6, 2005, at 11:13 AM, Frank D. Engel, Jr. wrote:

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


On May 6, 2005, at 10:47 AM, Nick Zitzmann 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.

I was using a different one, but that seems to make sense considering the below; so then do I give that class outlets I can assign the dialogs (NSPanel objects) to, and assigning the owner using that method determines which object of that class gets access to them?


Okay, I'll try that.  Sounds good.

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.

I used the NSAlert class for the only dialog of this type in the framework, which is a custom database-access framework. The dialogs are variations on a login dialog, offering username and password fields, and several others, depending on the situation (thus four versions of the dialog).


Thank you!

- -----------------------------------------------------------
Frank D. Engel, Jr.  <email@hidden>

$ ln -s /usr/share/kjvbible /usr/manual
$ true | cat /usr/manual | grep "John 3:16"
John 3:16 For God so loved the world, that he gave his only begotten Son, that whosoever believeth in him should not perish, but have everlasting life.
$
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (Darwin)


iD8DBQFCe4md7aqtWrR9cZoRAgcnAJ9W7Ng2yma3GzLiLUqSRZmhKaiYjQCgkdxj
El/Rm5lZXOCM7Ue8sWB+fYw=
=a9kY
-----END PGP SIGNATURE-----



___________________________________________________________
$0 Web Hosting with up to 200MB web space, 1000 MB Transfer
10 Personalized POP and Web E-mail Accounts, and much more.
Signup at www.doteasy.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


- -----------------------------------------------------------
Frank D. Engel, Jr.  <email@hidden>

$ ln -s /usr/share/kjvbible /usr/manual
$ true | cat /usr/manual | grep "John 3:16"
John 3:16 For God so loved the world, that he gave his only begotten Son, that whosoever believeth in him should not perish, but have everlasting life.
$
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (Darwin)


iD8DBQFCe8TY7aqtWrR9cZoRAocnAJ9EnsgYWvj1AxJOaLEHXvllAsVp2ACbBV86
lq4m9mi2B658uhYZ8kIY3rQ=
=rEtz
-----END PGP SIGNATURE-----



___________________________________________________________
$0 Web Hosting with up to 200MB web space, 1000 MB Transfer
10 Personalized POP and Web E-mail Accounts, and much more.
Signup at www.doteasy.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


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>)
 >Re: programmaticaly modify .nib files (From: Nick Zitzmann <email@hidden>)
 >Re: programmaticaly modify .nib files (From: "Frank D. Engel, Jr." <email@hidden>)

  • Prev by Date: Re: NSOutlineView problem
  • Next by Date: Re: CoreData issue when updating a file format
  • Previous by thread: Re: programmaticaly modify .nib files
  • Next by thread: posting message to text view from C-function
  • Index(es):
    • Date
    • Thread