I cut-n-pasted the public section from the wxWindows headers. Several things were missing so it seemed the easiest way to fix it. This fixed a problem with the way the overloaded new was being handled. This correctly generated all the versions so that it won''t have the problem with the non-initialized default parameters. I will admit I haven''t done serious testing on this but it -does- make the bigdemo work, which is a big improvement for me. Also, I don''t know whether or not we need to add the protected members. I don''t believe other classes expose them but I didn''t really look into it. _______________________________________________ wxruby-users mailing list wxruby-users@rubyforge.org http://rubyforge.org/mailman/listinfo/wxruby-users
Roy Sutton wrote:> I cut-n-pasted the public section from the wxWindows headers. Several > things were missing so it seemed the easiest way to fix it. This fixed > a problem with the way the overloaded new was being handled. This > correctly generated all the versions so that it won''t have the problem > with the non-initialized default parameters.This makes sense. There appears to be a flaw in swig where if you have default parameters after a typemap that folds two paramters into one (e.g. int n, wxString choices[]), it gets confused. With the alternative version available (that takes an arraystring), swig is able to simply map the incoming array to that array, avoiding the confusion. Any place that we are typemapping an int,array we will have this problem, so we should try to make sure that each case also has an alternative wxArrayString or wxArrayInt version available.> I will admit I haven''t > done serious testing on this but it -does- make the bigdemo work, which > is a big improvement for me.Which part of bigdemo did this improve for you? I still can''t run the CheckListBox part of that demo.> Also, I don''t know whether or not we need > to add the protected members. I don''t believe other classes expose them > but I didn''t really look into it.I don''t think we should expose protected members, at least until someone comes up with a good reason to do so. I''m concerned that they may vary from platform to platform. The patch you sent seemed to have a typo (you accidentally deleted the default constructor), and didn''t delete a dangling icky comment. So I cleaned it up slightly, and checked it in. Good detective work. Kevin
Kevin Smith wrote:> This makes sense. There appears to be a flaw in swig where if you have > default parameters after a typemap that folds two paramters into one > (e.g. int n, wxString choices[]), it gets confused. With the > alternative version available (that takes an arraystring), swig is > able to simply map the incoming array to that array, avoiding the > confusion. > > Any place that we are typemapping an int,array we will have this > problem, so we should try to make sure that each case also has an > alternative wxArrayString or wxArrayInt version available.This is definitely a problem. It''s what was causing the other unitialized problem I was complaining about the other day, too, I think. I will see if there''s a workaround in that file, too.> >> I will admit I haven''t done serious testing on this but it -does- >> make the bigdemo work, which is a big improvement for me. > > > Which part of bigdemo did this improve for you? I still can''t run the > CheckListBox part of that demo.For me, it makes the wxCheckListBox sample work. I''ll check out the latest tarball to be sure it''s still working.> I don''t think we should expose protected members, at least until > someone comes up with a good reason to do so. I''m concerned that they > may vary from platform to platform.That was my thinking> The patch you sent seemed to have a typo (you accidentally deleted the > default constructor), and didn''t delete a dangling icky comment. So I > cleaned it up slightly, and checked it in.Hmm! Glad you caught that. The comments were -really- icky in that file.
Roy Sutton wrote:> For me, it makes the wxCheckListBox sample work. I''ll check out the > latest tarball to be sure it''s still working.I just checked in two tweaks that allow it to work for me. It was passing incorrect parameters to a StaticText constructor, which was crashing my system. Then, the splitter on the right side was being initialized in a way that wedged it right up at the tab line, and couldn''t be moved. It works now. I really like this bigdemo thing. It''s a great way to exercise all the classes in one central location. I haven''t heard from Robert Carlin lately, but if you''re out there: Thanks Robert for porting bigdemo from wxPython! Kevin