FROM : Dimitri Bouniol
DATE : Fri Jun 30 21:40:00 2006
I am under the impression (I might and probably am wrong) that each
NSDocument has to have its own Window. In my app, I would like to
have a complex layout where I could have tabbed windows that could
change window, or be opened in any other of my apps with ease. I plan
to use NSFileManager to handle saving and opening, and to have a
complete array of documents (NSObjects, not NSDocuments), and a
complete array of all windows that would handle documents. I also
have a delegate of NSApp to get the following methods:
- (BOOL)applicationOpenUntitledFile:(NSApplication *)
theApplication // only called when you click the dock icon
- (BOOL)application:(NSApplication *)theApplication openFile:
(NSString *)filename //works
- (void)application:(NSApplication *)sender openFiles:(NSArray *)
filenames //works, even when there is only 1 file
On Jun 30, 2006, at 6:40 AM, I. Savant wrote:
>
> It sounds like you're making this far more difficult than needed.
> If you don't want to handle documents, use a standard Cocoa
> application (non-document-based). If you want to handle documents,
> use a Cocoa document-based application. You don't have to implement
> everything with your NSDocument subclass. Just implement what you
> need to get the document opened and get at its contents the "Cocoa
> Way".
>
> A more focused response, however, will probably require more
> information from you as to exactly what you're doing with the
> contents of these documents. If you're going to manipulate them at
> all, you really should be using the document architecture and
> you're only making it harder on yourself trying to short-circuit it.
>
> Unless I've completely misunderstood your request, my advice to
> you is to stop where you're at and review the document
> architecture, then reevaluate your approach. This architecture
> practically does everything for you when dealing with opening /
> manipulating documents of any kind; it's unlikely that bypassing it
> altogether is the right approach for your project.
>
> I hope this is helpful.
>
> --
> I.S.
--
Dimitri Bouniol
<email_removed>
DATE : Fri Jun 30 21:40:00 2006
I am under the impression (I might and probably am wrong) that each
NSDocument has to have its own Window. In my app, I would like to
have a complex layout where I could have tabbed windows that could
change window, or be opened in any other of my apps with ease. I plan
to use NSFileManager to handle saving and opening, and to have a
complete array of documents (NSObjects, not NSDocuments), and a
complete array of all windows that would handle documents. I also
have a delegate of NSApp to get the following methods:
- (BOOL)applicationOpenUntitledFile:(NSApplication *)
theApplication // only called when you click the dock icon
- (BOOL)application:(NSApplication *)theApplication openFile:
(NSString *)filename //works
- (void)application:(NSApplication *)sender openFiles:(NSArray *)
filenames //works, even when there is only 1 file
On Jun 30, 2006, at 6:40 AM, I. Savant wrote:
>
> It sounds like you're making this far more difficult than needed.
> If you don't want to handle documents, use a standard Cocoa
> application (non-document-based). If you want to handle documents,
> use a Cocoa document-based application. You don't have to implement
> everything with your NSDocument subclass. Just implement what you
> need to get the document opened and get at its contents the "Cocoa
> Way".
>
> A more focused response, however, will probably require more
> information from you as to exactly what you're doing with the
> contents of these documents. If you're going to manipulate them at
> all, you really should be using the document architecture and
> you're only making it harder on yourself trying to short-circuit it.
>
> Unless I've completely misunderstood your request, my advice to
> you is to stop where you're at and review the document
> architecture, then reevaluate your approach. This architecture
> practically does everything for you when dealing with opening /
> manipulating documents of any kind; it's unlikely that bypassing it
> altogether is the right approach for your project.
>
> I hope this is helpful.
>
> --
> I.S.
--
Dimitri Bouniol
<email_removed>
| Related mails | Author | Date |
|---|---|---|
| Dimitri Bouniol | Jun 30, 02:48 | |
| Francis Derive | Jun 30, 07:38 | |
| Dimitri Bouniol | Jun 30, 09:54 | |
| I. Savant | Jun 30, 15:40 | |
| Dimitri Bouniol | Jun 30, 21:40 | |
| Chris Hanson | Jun 30, 22:35 | |
| Dimitri Bouniol | Jun 30, 22:42 |






Cocoa mail archive

