During my app workflow there is a moment when a new modal NSWindow is initialized from a nib. This window should have a save document button. Which is the recommended approach:
- Via a new NSSavePanel to the newly instantiated modal window and customizing the entire save flow here ?
- Using the main NSDocument class that receives save message from the button in the above window ? If so, how to save the document ?
- Any other scenario ?
For those interested, I have solved this creating a singleton class with accesors that allows using “global”-like variables, thus calling methods and sending messages from the newly instantiated NSWindowController is now a breeze. Todo: look into possible using KVC for this.