• 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
Re: Writing a non-NSDocument based multiple document window apps
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.


  • Prev by Date: c# PropertyGrid for Cocoa
  • Next by Date: Re: Formating a number in a string
  • Previous by thread: Re: c# PropertyGrid for Cocoa
  • Next by thread: Umlaute in NSString
  • Index(es):
    • Date
    • Thread