0

I'm trying to understand the basis by which a document's window title presents a panel (save?) and contextual menu. I created a project where a new document shows the "v" (down caret) to access what appears to be save panel:

documentsVersionButton

But why wouldn't these title interactions appear in a different apps' new document?

slashlos
  • 913
  • 9
  • 17
  • 1
    Your Xcode project should have an option to set the icons for these documents. Check the project settings tab. If that is what you are asking. – adev Jul 10 '17 at 02:29
  • I'm using 8.3 / Swift 3; not seeing anything specific. I am not referring to the contextual menu on the menu bar which shows the paths to the document, but as in the picture - a pulldown button which yield the mini save dialog. I'd like to add or hijack that to allow the user to save-as, as well as capture other global settings to be encoded into the save. – slashlos Jul 10 '17 at 15:19
  • Sorry, I dont have any idea about that. – adev Jul 10 '17 at 17:24
  • Thanks; it seems a great fit to allow a UI which is centric on contextual menus, to have such on the menu bar itself rather than the application level finder menu. maybe details on this new feature ('15 ?) will become known. – slashlos Jul 10 '17 at 17:48
  • 1
    Ah I think I know what's going on; for a 'new' document and defined fileURL or other attribute the icon appears as a down caret to present the panel shown. Otherwise, the icon is not visible but a contextual menu shows the path to the file as a pop-up menu; navigating to the items brings up a Finder window with that path. But my question still stands - how to augment or replace the save dialog ? – slashlos Jul 10 '17 at 20:09
  • This isn't the only save dialog. You can accessorize the big one. The small dialog is related to autosave. – Willeke Jul 12 '17 at 11:03
  • This question is a bit ambiguously written. Could you try and edit your question to make it more clear what exactly you are trying to do? – Max von Hippel Jul 12 '17 at 19:28

1 Answers1

0

This document method

override class func autosavesInPlace() -> Bool {
    return false
}

returning true allows the "v" pull down after title to present save dialog shown above.

For my needs I'm turning instead to an auto-save model but without files relying instead on user defaults. My needs of AVAsset based docs only needed state data (position, etc), as other asset metadata info I can easily regain.

slashlos
  • 913
  • 9
  • 17