I've recently noticed that use of NSSavePanel in our macOS application causes one or more warnings to the console, like this:
WARNING: <NSSavePanel: 0x171a466d0> found it necessary to prepare implicitly; please prepare panels using NSSavePanel rather than NSApplication or NSWindow.
WARNING: <NSSavePanel: 0x171a466d0> found it necessary to start implicitly; please start panels using NSSavePanel rather than NSApplication or NSWindow.
WARNING: <NSSavePanel: 0x171a466d0> running implicitly; please run panels using NSSavePanel rather than NSApplication.
We are running the save panel modally, as supported by NSSavePanel.h:
In other code, we use RunModalSheetForDialog() which gives a similar warning:
<NSSavePanel: 0x7f9c70224810> running implicitly; please run panels using NSSavePanel rather than NSApplication.
Why these warnings, and what can I do about it?
WARNING: <NSSavePanel: 0x171a466d0> found it necessary to prepare implicitly; please prepare panels using NSSavePanel rather than NSApplication or NSWindow.
WARNING: <NSSavePanel: 0x171a466d0> found it necessary to start implicitly; please start panels using NSSavePanel rather than NSApplication or NSWindow.
WARNING: <NSSavePanel: 0x171a466d0> running implicitly; please run panels using NSSavePanel rather than NSApplication.
We are running the save panel modally, as supported by NSSavePanel.h:
Code Block NSSavePanel * panel = [NSSavePanel savePanel]; [panel setTitle:@"Record Movie"]; ... NSModalResponse rtn = [panel runModal];
In other code, we use RunModalSheetForDialog() which gives a similar warning:
<NSSavePanel: 0x7f9c70224810> running implicitly; please run panels using NSSavePanel rather than NSApplication.
Why these warnings, and what can I do about it?