• 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
readFromURL for the current document window, versus a new document window
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

readFromURL for the current document window, versus a new document window


  • Subject: readFromURL for the current document window, versus a new document window
  • From: "John Love" <email@hidden>
  • Date: Wed, 30 Jul 2008 14:45:12 -0400

The challenge is what to override in MyDocument such that when I select
"Open..." I can load a file into the currently active window *if* there is
an active window; *and* if no active document window, then do the standard
Cocoa stuff, that is, [super readFromURL ...] and load the file into the
newly created window.

I have poured over the Cocoa docs about document based apps and have
overridden readFromURL: ... but a new window always appears with the file,
even if there previously was a window active.  It appears, based on my
skimpy knowledge, that NSDocumentController's call to openDocument: leads to
addDocument:, i.e, a new document window.

John Love
_______________________________________________

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

  • Prev by Date: Re: Checking for Hackintosh
  • Next by Date: outlineView:dataCellForTableColumn:item: and bindings don't mix? Editing doesn't stick.
  • Previous by thread: Re: CALayer and CGContexts
  • Next by thread: outlineView:dataCellForTableColumn:item: and bindings don't mix? Editing doesn't stick.
  • Index(es):
    • Date
    • Thread