XRC problems

OK. You're right, that was a bug with my button names, but what about
wxCalendarCtrl?

How can I make it work? I've read in previous postings of
wxPython-users, that it does return wxConstrolPtr instead of
wxCalendarCtrl or smth., but how can I make that XRCCTRL return the
right class' object in the best and right way?

This is the situation in which wxPyTypeCast should be useful... Unfortunately,
it doesn't work for wxCalendarCtrl objects (the problem seems to be that wx.py
does not import wxPython.calendar, so globals() does not contain
"wxCalendarCtrlPtr"): is this a bug?

Alberto

P.S: I'm still not able to get emails from the list (I have to read it from
ASPN), and I get no response from wxPython-users-help too :frowning:

Alberto Griggio wrote:

OK. You're right, that was a bug with my button names, but what about wxCalendarCtrl?

How can I make it work? I've read in previous postings of wxPython-users, that it does return wxConstrolPtr instead of wxCalendarCtrl or smth., but how can I make that XRCCTRL return the right class' object in the best and right way?

This is the situation in which wxPyTypeCast should be useful... Unfortunately,
it doesn't work for wxCalendarCtrl objects (the problem seems to be that wx.py
does not import wxPython.calendar, so globals() does not contain
"wxCalendarCtrlPtr"): is this a bug?

I think you're right. There was this problem - I've read something about it in the wxPython-users list archive. And somebody from the wxPyhon team answered that it sould be fixed.

So, there is another question: has that been fixed? Which version does/will contain this fix?

···

--
Andrei Sosnin
http://zzx.ath.cx

  <!-- : it all depends on your vision : -->

Alberto Griggio wrote:

OK. You're right, that was a bug with my button names, but what about wxCalendarCtrl?

How can I make it work? I've read in previous postings of wxPython-users, that it does return wxConstrolPtr instead of wxCalendarCtrl or smth., but how can I make that XRCCTRL return the right class' object in the best and right way?

This is the situation in which wxPyTypeCast should be useful... Unfortunately,
it doesn't work for wxCalendarCtrl objects (the problem seems to be that wx.py
does not import wxPython.calendar, so globals() does not contain
"wxCalendarCtrlPtr"): is this a bug?

Alberto

Here it is, btw, the message where this bug has been clearly mentioned:

···

===============================================================================

Subject: Re: [wxPython-users] wxPyTypeCast, FindWindowById, and wxCalendarCtrl
From: *Robin Dunn*
Date: Thu, *23 Jan 2003* 10:11:40 -0800

...

I'll add it to my todo list. A better fix would be to add

  import wx
  wx.wxCalendatCtrlPtr = wxCalendarCtrlPtr

to calendar.py. That way you don't have to import calendar all the time
even if you don't use it.

===============================================================================

And it was only 1 week ago... I guess, the fixed version will not be so soon...

Uhh, what shall I do now? Make three controls instead of one? :frowning: Pity.

--
Andrei Sosnin
http://zzx.dyn.ee

<!-- : it all depends on your vision : -->