call them Flow and Section. Unfortunately, there is no indication in the file extension or anywhere
else as to which type any given file is (and no hope of getting the data supplier to tag the files).
So I subclassed NSDocumentController as per the following advice on Apple's Document-Based
Applications FAQ:
// If you need to customize the Open panel, you have encountered one of the clear times
// when an NSDocumentController subclass is needed. You can override the NSDocumentController’s
// runModalOpenPanel:forTypes: method to customize the panel or add an accessory view.
I then successfully added a customized Open panel. The customization is simply a drop box that
allows the user to indicate if the file is a Flow or a Section file.
Now for the question: I would like to allow a quick way of re-opening the file short of re-doing
the Open panel. The Open Recent menu item seems perfect for this, except that it doesn't
save the file type. I suppose I could save a huge database of all files opened in the past by
all users and remember what type each file was, but that seems like work. Instead I modified
the name of the Open Recent menu item to Open Recent (Flow) and made a second item
called Open Recent (Section). Unfortunately, there I stalled. I could find no way to select
which one stored a recently opened file name. Worse, Cocoa seems to randomly select which
one it will use to store recent names. Sometime one, sometimes the other, sometimes both.
Does Cocoa allow two Recent File items? If so, how should this be implemented?
Any other comments / suggestions?
Many thanks,
Mark