• 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: [newbie] Handling a preferences window
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [newbie] Handling a preferences window


  • Subject: Re: [newbie] Handling a preferences window
  • From: Jeremy Dronfield <email@hidden>
  • Date: Sun, 29 Sep 2002 22:01:18 +0100

On Sunday, September 29, 2002, at 08:50 pm, Yann Bizeul wrote:

Hi there.

I'm new to the list, and I don't know if there is another list for really basic questions.

<insert sound of semi-masticated bagel chips bouncing off subscribers' screens>
Nope, they don't get any more basic than this one, we're told.

My problem is very simple, I'm designing a new application, so I draw everything in IB, and cretated my Objects and their controllers.
Now I just want to link the Preferences menu to my preference windows, I found a tutorial at apple's web site but it shows how to handle windows in another nib file, mine is in the MainMenu.nib.

In fact, I made an action in my "TSMPrefs" object called "showPreferences" and I linked it with the "Preferences" menu.

Each to their own, but it's not generally good practice to handle things like prefs in the main nib. Items which aren't central tend to be put in separate nibs. It doesn't matter much if your application is very small, but if it grows complex, you gain efficiency by farming things out.

Now I don't know what to write in my showPreferences code, how to access this NSWindow object to ask him to display ?

Assuming TSMPrefs is a subclass of NSWindowController (which it should be), just connect "Preferences..." to the object's built-in -showWindow: action method.

-Jeremy

========================================
email@hidden // email@hidden
The Alchemy Pages:
- fractious fiction at http://freespace.virgin.net/jeremy.dronfield
========================================
_______________________________________________
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.

  • Follow-Ups:
    • Re: [newbie] Handling a preferences window
      • From: Yann Bizeul <email@hidden>
References: 
 >[newbie] Handling a preferences window (From: Yann Bizeul <email@hidden>)

  • Prev by Date: Re: linking in private non-Framework libraries
  • Next by Date: Re: [NEWBIE QUESTION] What message is sent when window contents finish loading? (revisited)
  • Previous by thread: [newbie] Handling a preferences window
  • Next by thread: Re: [newbie] Handling a preferences window
  • Index(es):
    • Date
    • Thread