• 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: NSDocument Question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSDocument Question


  • Subject: Re: NSDocument Question
  • From: Bruce Cresanta <email@hidden>
  • Date: Mon, 07 Feb 2011 12:54:58 -0700

Ii have two subclasses of NSDocument.   One of the subclasses only ever needs one instance window.   How do I query NSWindowController for the open window, and if that fails, create it.   Sorry for the confusion.

Bruce
On Feb 7, 2011, at 10:54 AM, Quincey Morris wrote:

> On Feb 7, 2011, at 07:37, Bruce Cresanta wrote:
>
>> 	I have two types of NSDocument.   One of them only ever needs to be active one at a time (No duplicates).   How do I check to see if the window is open first and make it key, and if it is not open already, open it once?
>
> What do you mean by "two types of NSDocument"? Two subclasses? Two document types? Two file types? NSDocument already has the behavior you describe, based on the identity of the underlying file. If you don't see this behavior, then you're likely subverting it somehow, or working with two different files.
>
>

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: NSDocument Question
      • From: Quincey Morris <email@hidden>
    • Re: NSDocument Question
      • From: Sherm Pendley <email@hidden>
References: 
 >NSDocument Question (From: Bruce Cresanta <email@hidden>)
 >Re: NSDocument Question (From: Quincey Morris <email@hidden>)

  • Prev by Date: Re: Memory management about async object
  • Next by Date: NSDrawer dealloc causes kCGErrorIllegalArgument
  • Previous by thread: Re: NSDocument Question
  • Next by thread: Re: NSDocument Question
  • Index(es):
    • Date
    • Thread