Does anyone know if the XRC hand-coded methods in Window.i are still required after my recent change to return the correct types? Also, given that wxWindow.h is included all over the place, I think we need to move some of that stuff out into a common .i that''s included for all wxWindow descendants. Roy
Roy Sutton wrote:> Does anyone know if the XRC hand-coded methods in Window.i are still > required after my recent change to return the correct types?I tried cutting out the relevant stuff in Window.i and recompiling Window and Dialog (just for a quick test). It seems that the calls to Dialog#find_window_by_id in the XRC sample then return instances of Wx::Window, not Wx::Button as they should do I think? Would be good to return to this perh. when new SWIG is out.> Also, > given that wxWindow.h is included all over the place, I think we need to > move some of that stuff out into a common .i that''s included for all > wxWindow descendants. >Not certain which stuff you''re thinking of. Generally, I think I prefer to keep the header files reasonably closely aligned with the organisation of methods in WxWidgets, but I''m open to discussion.
Sorry for the late reply. Trying to clear out my wxruby inbox. Alex Fenton wrote:> Roy Sutton wrote: >> Also, >> given that wxWindow.h is included all over the place, I think we need to >> move some of that stuff out into a common .i that''s included for all >> wxWindow descendants. >> > > Not certain which stuff you''re thinking of. Generally, I think I prefer > to keep the header files reasonably closely aligned with the > organisation of methods in WxWidgets, but I''m open to discussion.I would also like to know more specifically what parts you are thinking of. I''m a big fan of eliminating duplicate code, when possible. Kevin
Kevin Smith wrote:> Sorry for the late reply. Trying to clear out my wxruby inbox. > > Alex Fenton wrote: > >> Roy Sutton wrote: >> >>> Also, >>> given that wxWindow.h is included all over the place, I think we need to >>> move some of that stuff out into a common .i that''s included for all >>> wxWindow descendants. >>> >>> >> Not certain which stuff you''re thinking of. Generally, I think I prefer >> to keep the header files reasonably closely aligned with the >> organisation of methods in WxWidgets, but I''m open to discussion. >> > > I would also like to know more specifically what parts you are thinking > of. I''m a big fan of eliminating duplicate code, when possible.wxWindows.h is included by many, many files. Any typemaps or SWIG directives in Window.i have to be duplicated in every .i file. Or, we make a common one. Roy