• 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
Single instance of properties window
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Single instance of properties window


  • Subject: Single instance of properties window
  • From: Derrick Bass <email@hidden>
  • Date: Mon, 3 Oct 2005 08:10:29 -0500

I have a document based program and I implemented a properties window (it is supposed to work much like the properties window in QuickTime player).

When the user chooses "Show Info" the "showInfo:" action of my document class does the following:
NSWindowController* controller;
controller = [[NSWindowController alloc] initWithWindowNibName:@"Properties" owner:self];
[controller setShouldCloseDocument:NO];
[self addWindowController: controller];
[controller showWindow:self];
[controller release];


The trouble comes if the user chooses "Show Info" again… I get another instance of the properties window! What I want, of course, is for the currently open info window to pop forward. Is there some easy way to do that?

(By the way, I didn't create the window in makeWindowControllers because the application calls showWindows; but I only want the info window to show if the user calls it up. Also, when the user dismisses it, I want it to really go away and not just disappear, because keeping it up to date is pretty taxing.)

Derrick

_______________________________________________
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: Single instance of properties window
      • From: Sherm Pendley <email@hidden>
  • Prev by Date: Re: No respond from Switch button on NSTableView
  • Next by Date: [ANN] Advanced Mac OS X Programming
  • Previous by thread: Re: No respond from Switch button on NSTableView
  • Next by thread: Re: Single instance of properties window
  • Index(es):
    • Date
    • Thread