How does OSX even do this? Does it record all modeless windows created (I guess the term is “registered”) that have not been destroyed when app shutdown is being requested?
I ask this because I do this on purpose for one of my apps. On app shutdown, I record all windows open and what their contents are, save a persistent file, and then that file gets opened the next time the app is opened and spawns all the windows again. Should I just skip this area of code if the app is running in 10.8 and up?
[quote=114538:@Garth Hjelte]How does OSX even do this? Does it record all modeless windows created (I guess the term is “registered”) that have not been destroyed when app shutdown is being requested?
I ask this because I do this on purpose for one of my apps. On app shutdown, I record all windows open and what their contents are, save a persistent file, and then that file gets opened the next time the app is opened and spawns all the windows again. Should I just skip this area of code if the app is running in 10.8 and up?[/quote]
Yes
OS X basically has a means to record an alias for every opened document then restores those when you open the app
Opened Document and Opened Window are two different things, though.
In my situation, sure, each opened REAL/Xojo Window corresponds to a file/document/folderitem/whatever, but given your answer I’m not sure if OSX knows what I’m doing.
Does 10.8+ do this only when your app is THE APP according to OSX that opens that file’s filetype? In other words, for example, if my “Edit Big Chunk” app opens .bigchunk files, and through REAL/Xojo App.OpenDocument function it opens it (and it’s listed in FileTypes and App.AcceptFileTypes), OSX remembers it so upon app startup OSX essentially throws a bunch of FolderItems at App.OpenDocument.