Re: Writing a non-NSDocument based multiple document window apps
Re: Writing a non-NSDocument based multiple document window apps
- Subject: Re: Writing a non-NSDocument based multiple document window apps
- From: Amilcar Meneses Viveros <email@hidden>
- Date: Mon, 22 Mar 2004 07:50:08 -0600 (CST)
If you like write your application with the behaviour of a document-based
you can take the TexEdit example (when you install Cocoa it's example is
in the path
/Developer/Examples/AppKit/TextEdit
). And many of the apple documentation take this application like example.
In the another hand, If you like write a Document-based application you
can read the manual
/Developer/Documentation/Cocoa/TasksAndConcepts/ProgrammingTopics/Documents
now, recently I had a problem with the application termination and the
only that you would rewrite is the "-(BOOL)isDocumentEdited" in your
Document class and decide when your document is edited. If I understand
well you like and application connecting with a data-base, maybe in this
case you document class is a well place for decide it. For make an
document editable you would send the method "setDocumentEdited", with YES
argument, to the window that show your document.
In the case that you need all the list of your document (for example if
you have a Controller object) you can use the following lines:
NSArray *documents = [[NSDocumentController sharedDocumentController]
documents];
unsigned count = (!documents)?0:[documents count];
I hope it's could be help for you
Regards
Amilcar
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.