I have a single-windowed app that loads textures. I want to be able to switch textures to anything in the Open Recent menu item list that I add URLs into.
When I launch the app, each recent menu item calls readFromURL once. But subsequent selection of the menu item does not. I can see the documents in the document controller increasing, so I know that is likely why this callback isn't called.
If I return NO from readFromURL then it is called every time, but posts a dialog about the file failing to load. I want that behavior, but not the dialog.
I'm not really using the NSDocuments created, but I needed this mechanism to get at the URL to load the data. I can't really remove documents from list, so I just let them accumulate but they basically just store the URL.
What am I supposed to hook as a callback? Is there a switchToDocument callback hook/delegate?
When I launch the app, each recent menu item calls readFromURL once. But subsequent selection of the menu item does not. I can see the documents in the document controller increasing, so I know that is likely why this callback isn't called.
If I return NO from readFromURL then it is called every time, but posts a dialog about the file failing to load. I want that behavior, but not the dialog.
I'm not really using the NSDocuments created, but I needed this mechanism to get at the URL to load the data. I can't really remove documents from list, so I just let them accumulate but they basically just store the URL.
What am I supposed to hook as a callback? Is there a switchToDocument callback hook/delegate?