I've run into a problem that seems to be a recurrence of something that was supposed to have been solved: the need to "wxPyTypeCast" a wxCalendarCtrl. I'm running Python 2.4 (Activestate Windows distro) and wxPython 2.6 (freshly downloaded). Here's a piece of a little test app that shows the problem:
class MyApp( wxApp ):
def OnInit( self ):
self.res = wxXmlResource( GUI_FILENAME )
self.frame = self.res.LoadFrame( None, GUI_MAINFRAME_NAME )
self.cal = XRCCTRL(self.frame, "Cal")
print self.cal.GetValue()
self.frame.Show(1)
and here's the XRC (generated by XRCed):
<?xml version="1.0" ?>
<resource>
<object class="wxFrame" name="FRAME1">
<title></title>
<object class="wxCalendarCtrl" name="Cal"/>
</object>
</resource>
Trying to run this gets "*** AttributeError: 'Control' object has no attribute 'GetValue'".
Running under pdb (in Emacs), and breaking at the print statement, "p self.cal" shows "<wx._core.Control; proxy of C++ wxControl instance at _18775501_p_wxControl>". (Also under pdb, using the wxWidget version macros, I get 2.6.1 for the major, minor, and release number.)
Any good words of advice?
Thanks,
Don Dwiggins
Advanced Publishing Technology