readFromURL for the current document window, versus a new document window
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