Re: Is this a bug in AppDelegate?
Bill Pitcher
Hi Peter,
toggle quoted message
Show quoted text
I think you have the flow here a little confused. func applicationShouldOpenUntitledFile(_ sender: NSApplication) -> Bool lets the App know if there is going to be an Untiled Document, false neither the App Default nor the applicationOpenUntitledFile will be called. (Watch out that it doesn’t load an already created one automatically.) IF applicationShouldOpenUntitledFile returns TRUE func applicationOpenUntitledFile(_ sender: NSApplication) -> Bool This gives the delegate an opportunity to create an Untitled Document Returning true from this tells the App that you have taken responsibility for creating the Untiled document and that it shouldn’t. Return false at this point tells the App applicationOpenUntitledFile didn't create the Untiled Document and that it should make the default Untitled That’s my take on it, hope it helps. cheers Bill Pitcher Tutor Literacy Aotearoa - Dunedin On 6/08/2018, at 7:35 AM, Peter Teeson via Groups.Io <peter.teeson@...> wrote:I can’t swear to it, but I’m pretty certain this is a result of state restorationGood idea… However I just did this: |
|