• 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: Opening a document in the same window
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Opening a document in the same window


  • Subject: Re: Opening a document in the same window
  • From: Volker Runkel <email@hidden>
  • Date: Wed, 11 Jan 2006 19:16:32 +0100

Hi,

you could let your DocumentController decide if an "empty" Document already exists and then send the document the message to open the double-clicked file.

At the moment I am not sure if "simple" subclasses of NSDocument and NSDocumentController can already do this without much subclassing code. You will need at least a method that returns YES/NO in your NSDocument subclass dependend on the contents of your actual instance of your open document.

I recommend reading through the Documentation of both classes in the Cocoa library. If oyu need further pointers please call back either offlist or onlist.

Volker


Am 11.01.2006 um 18:55 schrieb Theodore H. Smith:

How do I get a document to open in a specified window?

Apple's TextEdit.app does exactly this.

When you open TextEdit, there is an empty window.

If you open a .txt document from the finder, that window gets used as the file editor!

So TextEdit was able to use an existing specified window, instead of opening a new one.

I'd like to be able to do the same. Any ideas anyone?
_______________________________________________
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

Attachment: smime.p7s
Description: S/MIME cryptographic signature

 _______________________________________________
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: 
 >Opening a document in the same window (From: "Theodore H. Smith" <email@hidden>)

  • Prev by Date: Opening a document in the same window
  • Next by Date: NSPopupButton with bindings and separators not possible?
  • Previous by thread: Opening a document in the same window
  • Next by thread: Re: Opening a document in the same window
  • Index(es):
    • Date
    • Thread