noreply at rubyforge.org
2009-Aug-23 15:47 UTC
[wxruby-development] [ wxruby-Bugs-26981 ] BookCtrlBase badly swig''ed: several methods missing from subclasses (like Choicebook#get_current_page)
Bugs item #26981, was opened at 23/08/2009 17:47 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=218&aid=26981&group_id=35 Category: Incorrect behavior Group: None Status: Open Resolution: None Priority: 3 Submitted By: Pascal Hurni (phi) Assigned to: Nobody (None) Summary: BookCtrlBase badly swig''ed: several methods missing from subclasses (like Choicebook#get_current_page) Initial Comment: The BookCtrlBase class (which was introduced in January 2009) that is the base class for all the *Book controls like Choicebook, Listbook, etc is badly interfaced. I wanted to use the Choicebook and made a call to #get_current_page. I received a NoMethodError exception. Sigh! No more luck with #get_page(#get_selection). Looking at the generated source file (/src/BookCtrlBase.cpp) shows no defined method in the BookCtrlBase ruby class. I found that revision 1957 (8 Jan 2009) dealt with a compiling problem with BookCtrlBase (removing ''director''). After some tweaking I found the root issue of the bug mentioned here and the one that revision 1957 worked around. The C header file for BookCtrlBase just misses the ''public'' keyword after the beginning of the class. Thus all methods are private, so are the constructors. Swig complained with the director statement because the default constructor was private and thus not available. Yes, this is certainly a late night bug ;-) The patch I submitted fix this and re-introduce the ''director'' statement (to be more orthogonal with the whole project). Only tested on WinXP 32bits (MingW). Regards, Pascal ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=218&aid=26981&group_id=35