FROM : Richard Jackson
DATE : Wed Apr 13 19:13:46 2005
This should be simple - but I'm not sure where to look:
I have a Document-based app which is a "Viewer" for specific file
types. Since it doesn't create files - it only opens existing files -
I've implemented the applicationShouldOpenUntitledFile: delegate and
return "NO".
However, this means that when the app is double-clicked and opens the
user is presented with a blank screen since there is no document. The
usual next step would be to open an existing file, so I'm thinking it
would be nice to automatically bring up an "Open..." dialog.
On the other hand, if the user launches the app by dropping a file on
the app icon then I want to open that Document and NOT show the Open
dialog.
Is there an existing delegate or property that will automatically
implement this behavior?
If not, should I implement the applicationDidFinishLaunching:
delegate and call openDocument: if no other Documents are open by then?
TIA,
- Richard
DATE : Wed Apr 13 19:13:46 2005
This should be simple - but I'm not sure where to look:
I have a Document-based app which is a "Viewer" for specific file
types. Since it doesn't create files - it only opens existing files -
I've implemented the applicationShouldOpenUntitledFile: delegate and
return "NO".
However, this means that when the app is double-clicked and opens the
user is presented with a blank screen since there is no document. The
usual next step would be to open an existing file, so I'm thinking it
would be nice to automatically bring up an "Open..." dialog.
On the other hand, if the user launches the app by dropping a file on
the app icon then I want to open that Document and NOT show the Open
dialog.
Is there an existing delegate or property that will automatically
implement this behavior?
If not, should I implement the applicationDidFinishLaunching:
delegate and call openDocument: if no other Documents are open by then?
TIA,
- Richard
| Related mails | Author | Date |
|---|---|---|
| Richard Jackson | Apr 13, 19:13 | |
| Jonathon Mah | Apr 13, 19:43 |






Cocoa mail archive

