Bracket MacNewFile() with __WXMAC__ checks in the docview sample.

This fixes compilation in C++11 mode: "override" results in an error on
non-Mac platforms because this method doesn't exist there and so can't be
overridden.

Closes #16903.
This commit is contained in:
Vadim Zeitlin 2015-03-19 16:42:17 +01:00
parent 0e2d9e539c
commit 05a0f97caf
2 changed files with 4 additions and 0 deletions

View File

@ -152,10 +152,12 @@ bool MyApp::OnCmdLineParsed(wxCmdLineParser& parser)
return wxApp::OnCmdLineParsed(parser);
}
#ifdef __WXMAC__
void MyApp::MacNewFile()
{
wxDocManager::GetDocumentManager()->CreateNewDocument();
}
#endif // __WXMAC__
bool MyApp::OnInit()
{

View File

@ -40,7 +40,9 @@ public:
virtual void OnInitCmdLine(wxCmdLineParser& parser) wxOVERRIDE;
virtual bool OnCmdLineParsed(wxCmdLineParser& parser) wxOVERRIDE;
#ifdef __WXMAC__
virtual void MacNewFile() wxOVERRIDE;
#endif // __WXMAC__
// our specific methods
Mode GetMode() const { return m_mode; }