[wx-dev] wxCalendarCtrl changes

Robin Dunn robin at alldunn.com
Tue Apr 1 08:58:25 PDT 2008


Marcin Wojdyr wrote:
> It is also explained in the documentation how
> to use the generic control on all platforms.

Which doesn't help those who are not using C++[1], unless the language 
binding authors also provide wrappers for the generic class on all 
platforms.  But that still means that existing code will either break or 
some feature becomes non-functional unless the programmer adds some if's 
checking the platform to select one class or the other and that's one of 
the main things we try to avoid here.

Maybe better in this case is to leave wxCalendarCtrl alone and add a 
wxNativeCalendarCtrl class that provides the limited API that can be 
used with the native calendar widgets, and which uses wxCalendarCtrl for 
those platforms that don't have a native widget (but still only provides 
the limited API.)


[1] Don't forget about XRC too.  With the current code there is no way 
to use the generic control from XRC without writing a new handler for 
it, because it does not derive from wxCalendarCtrl so you can't use the 
subclass attribute with the existing handler...

-- 
Robin Dunn
Software Craftsman
http://wxPython.org  Java give you jitters?  Relax with wxPython!



More information about the wx-dev mailing list