PDA

View Full Version : File > New, show window to input values?




MythicFrost
Feb 19, 2012, 07:30 PM
Hey,

I'm just starting to look at the File Menu in my app, and I've successfully added in code to show an open panel when you click File > Open, however I'm wanting to do this with File > New, but I'm not sure what to do yet.

Is there a built in class I can use for taking input? There's literally only a couple of things I need on it.

If not, would the right way to go about this be to create a new window and add a view to it and then display it? I've never added another window in an app before.

Appreciate any advice.



Sydde
Feb 20, 2012, 02:13 PM
I would suggest you learn how to code a document-based application. Understanding how to use NSDocument, as well as NSDocumentController is very useful stuff to know. Some, most or all of what you want to do can be completely abstracted away using document architecture.

Apple's Document Based Application Guide (https://developer.apple.com/library/mac/navigation/#section=Resource%20Types&topic=Reference)

MythicFrost
Feb 21, 2012, 09:15 AM
I would suggest you learn how to code a document-based application. Understanding how to use NSDocument, as well as NSDocumentController is very useful stuff to know. Some, most or all of what you want to do can be completely abstracted away using document architecture.

Apple's Document Based Application Guide (https://developer.apple.com/library/mac/navigation/#section=Resource%20Types&topic=Reference)
I see, thanks for the link!