This is the first time I dip my feet in Cocoa.
Here is a simple question. OS X Lion supports window state resumption when an application terminates and restarts. Good, good and good.
But for document-based applications, can the same resume function also control the state of the window when the document is closed and reopened later, but without exiting the application? (In other words, can it manage each file permanently, regardless of whether the application closes or not? Or do I need to manage it myself by storing information in document files?)
For example, iWork'09 applications really do such things: if you close the saved document and close it again, it will restore the window position, location and scroller. I do not know if he is using this using Leo-Summary.
But, on the contrary, OS X Lion TextEdit restores windows when it shuts down and restarts, but when you close a document and reopen it, it does not remember the state of the window. This makes me suspicious that using Resume without exiting may not be possible automatically (since, perhaps, Pages saves the states of windows in its own file format, but TextEdit does not work, because it uses plain text files, RTF, HTML, etc.) .
I don't have access to WWDC 2011 videos yet, but neither the OS X release notes, nor the OS X application programming guide, nor the NSWindowRestoration API docs specifically mention this.
So, the question is again: automatically remembering the state of the document window after closing and reopening it without exiting the application (for example, iWork) ... does Lion Restore support this?
Thanks a lot!