Compiler: Xcode 7.3.1 (7D1014)
wxWidgets: OSX/cocoa 3.0.2
I am using an wxOwnerDrawnComboBox in a project being compiled for both Mac and Windows. On Windows, it works just fine, but on the Mac, it looks like an underlying class is not getting the (Mac) Peer object set. Thus, none of the class functions in wxTextEntry can work.
I am wondering what the best approach would be for fixing this. (Please read on. More below!)
FWIW, the class hierarchy is:
Code: Select all
class WXDLLIMPEXP_ADV wxOwnerDrawnComboBox : public wxWindowWithItems<wxComboCtrl, wxItemContainer> {}
class WXDLLIMPEXP_CORE wxComboCtrl : public wxGenericComboCtrl {}
class WXDLLIMPEXP_CORE wxGenericComboCtrl : public wxComboCtrlBase {}
class WXDLLIMPEXP_CORE wxComboCtrlBase : public wxControl, public wxTextEntry {}
class WXDLLIMPEXP_CORE wxTextEntry: public wxTextEntryBase {}
wxTextEntryBase is an abstract base class.
FYI, GetTextPeer() looks like this:
Code: Select all
wxTextWidgetImpl * wxTextEntry::GetTextPeer() const
{
wxWindow * const win = const_cast<wxTextEntry *>(this)->GetEditableWindow();
return win ? dynamic_cast<wxTextWidgetImpl *>(win->GetPeer()) : NULL;
}
Or am I missing some fundamental knowledge here?
Thanks!
-- forbin