• 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: one window with two documents
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: one window with two documents


  • Subject: Re: one window with two documents
  • From: Ricky Sharp <email@hidden>
  • Date: Sat, 7 Jan 2006 10:42:50 -0600

On Jan 7, 2006, at 10:23 AM, Koen van der Drift wrote:

For my app I would like to share a window for two related document files (eg the .m and .h files of a ObjC class). They are supposed to be displayed in two different NSTextViews in the same window. If the user wants to open a different set of files, a new window should open.

I started with the standard Cocoa document application, with MyDocument containing two NSString ivars and two IBOutlets for the NSTextViews. However I don't think this will work since as far as I can see there can only be one file associated with an NSDocument.

Any suggestions how I can approach this?

I've only seen diagrams showing multiple windows attached to a single document. So don't readily know if it's also possible to have multiple documents associated with a single window.


One approach may be to just start out by driving things with one of the two files (e.g. maybe always the .h). Then, override appropriate methods so that the secondary file (.m) is also opened/saved/etc.

Hmm..maybe search into using NSDocument to manage document packages. To the eyes of NSDocument, it will be working with just one "file", but under the covers, it will be working with multiple files.

___________________________________________________________
Ricky A. Sharp         mailto:email@hidden
Instant Interactive(tm)   http://www.instantinteractive.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: 
 >one window with two documents (From: Koen van der Drift <email@hidden>)

  • Prev by Date: Re: is this string styled?
  • Next by Date: Re: Getting the results out of Applescript
  • Previous by thread: one window with two documents
  • Next by thread: Re: one window with two documents
  • Index(es):
    • Date
    • Thread