Replace Connect() with Bind() in all samples and utils too
Still use Connect() in unit tests which were written explicitly for it and in EventConnector, which can't use Bind() as it uses a variable for the event type. No real changes, just use the newer and more convenient function.
This commit is contained in:
parent
d4f380e16e
commit
5f7a6bd15b
32 changed files with 291 additions and 583 deletions
|
|
@ -220,14 +220,14 @@ MyFrame::MyFrame()
|
|||
#endif // wxUSE_ACCEL
|
||||
|
||||
// connect it only now, after creating m_textWindow
|
||||
Connect(wxEVT_SIZE, wxSizeEventHandler(MyFrame::OnSize));
|
||||
Bind(wxEVT_SIZE, &MyFrame::OnSize, this);
|
||||
}
|
||||
|
||||
MyFrame::~MyFrame()
|
||||
{
|
||||
// and disconnect it to prevent accessing already deleted m_textWindow in
|
||||
// the size event handler if it's called during destruction
|
||||
Disconnect(wxEVT_SIZE, wxSizeEventHandler(MyFrame::OnSize));
|
||||
Unbind(wxEVT_SIZE, &MyFrame::OnSize, this);
|
||||
|
||||
// also prevent its use as log target
|
||||
delete wxLog::SetActiveTarget(NULL);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue