always use wxStaticCast in XRCCTRL (asserts in case of bad use in debug build)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@29999 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
b8387e0450
commit
ae688b6468
@ -291,13 +291,8 @@ private:
|
|||||||
// wxXmlResource::Get()->LoadDialog(&dlg, mainFrame, "my_dialog");
|
// wxXmlResource::Get()->LoadDialog(&dlg, mainFrame, "my_dialog");
|
||||||
// XRCCTRL(dlg, "my_textctrl", wxTextCtrl)->SetValue(wxT("default value"));
|
// XRCCTRL(dlg, "my_textctrl", wxTextCtrl)->SetValue(wxT("default value"));
|
||||||
|
|
||||||
#ifdef __WXDEBUG__
|
|
||||||
#define XRCCTRL(window, id, type) \
|
#define XRCCTRL(window, id, type) \
|
||||||
(wxDynamicCast((window).FindWindow(XRCID(id)), type))
|
(wxStaticCast((window).FindWindow(XRCID(id)), type))
|
||||||
#else
|
|
||||||
#define XRCCTRL(window, id, type) \
|
|
||||||
((type*)((window).FindWindow(XRCID(id))))
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// wxXmlResourceHandler is an abstract base class for resource handlers
|
// wxXmlResourceHandler is an abstract base class for resource handlers
|
||||||
// capable of creating a control from an XML node.
|
// capable of creating a control from an XML node.
|
||||||
|
Loading…
Reference in New Issue
Block a user