Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

How can I allow the user to create different types of documents?

0
Posted

How can I allow the user to create different types of documents?

0

Some applications support multiple types of document that are really separate (rather than a single document that might be stored in a number of types). For example, AppleWorks allows you to create text documents, spreadsheets, and other types of documents, all in a single application. In these applications, opening existing documents is not usually a problem, because the document type is determined from the file being opened. But creating new documents in such an application is trickier. NSDocumentController’s newDocument: action method creates a new document of the first type listed in the application’s array of document types (as configured in Xcode). But this isn’t really enough for applications that want to support several distinct types of document. Instead you can create your own new action(s), either in your application’s delegate or in an NSDocumentController subclass. You could create several action methods and have several different New menu items, or you could have one acti

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123