Added CallOnInit() which allows the toolkit (wxCocoa) to do a bit of
processing around the real OnInit() call. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@21607 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -97,6 +97,9 @@ public:
|
|||||||
// class version!
|
// class version!
|
||||||
virtual bool Initialize(int& argc, wxChar **argv);
|
virtual bool Initialize(int& argc, wxChar **argv);
|
||||||
|
|
||||||
|
// This gives wxCocoa a chance to call OnInit() with a memory pool in place
|
||||||
|
virtual bool CallOnInit() { return OnInit(); }
|
||||||
|
|
||||||
// Called before OnRun(), this is a good place to do initialization -- if
|
// Called before OnRun(), this is a good place to do initialization -- if
|
||||||
// anything fails, return false from here to prevent the program from
|
// anything fails, return false from here to prevent the program from
|
||||||
// continuing. The command line is normally parsed here, call the base
|
// continuing. The command line is normally parsed here, call the base
|
||||||
|
@@ -392,7 +392,7 @@ int wxEntryReal(int& argc, wxChar **argv)
|
|||||||
WX_SUPPRESS_UNUSED_WARN(cleanupOnExit);
|
WX_SUPPRESS_UNUSED_WARN(cleanupOnExit);
|
||||||
|
|
||||||
// app initialization
|
// app initialization
|
||||||
if ( !wxTheApp->OnInit() )
|
if ( !wxTheApp->CallOnInit() )
|
||||||
{
|
{
|
||||||
// don't call OnExit() if OnInit() failed
|
// don't call OnExit() if OnInit() failed
|
||||||
return -1;
|
return -1;
|
||||||
|
Reference in New Issue
Block a user