XMLCTRL() macro now uses wxDynamicCast in debug builds
(should help in catching typo bugs when accessing XRC controls) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@10280 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -216,9 +216,13 @@ extern wxXmlResource *wxTheXmlResource;
|
||||
// wxTheXmlResource->LoadDialog(&dlg, mainFrame, "my_dialog");
|
||||
// XMLCTRL(dlg, "my_textctrl", wxTextCtrl)->SetValue(wxT("default value"));
|
||||
|
||||
#ifdef __WXDEBUG__
|
||||
#define XMLCTRL(window, id, type) \
|
||||
(wxDynamicCast((window).FindWindow(XMLID(id)), type))
|
||||
#else
|
||||
#define XMLCTRL(window, id, type) \
|
||||
((type*)((window).FindWindow(XMLID(id))))
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
class WXDLLEXPORT wxXmlResourceHandler : public wxObject
|
||||
|
Reference in New Issue
Block a user