Phuah Yee Keat
2004-Aug-20 05:43 UTC
[Wxruby-users] wxruby-swig: where does wxclasses-2.4.2.xml comes from?
Was trying to understand more about the internals of wxruby-swig, where does the big chunk of XML comes from? I saw something similiar in Python, is that massaged out of there? The codes produced by extractxml.rb and wxclasses-2.4.2.xml is quite different from the original header files. Just for example the WxDialog class. OnXXX are non-virtual in WxWidgets, but virtual in wxruby-swig ShowModal are virtual in WxWidgets, but non-virtual in wxruby-swig I realize that wxruby-swig is in a very highly experimental stage, but would appreciate it if someone can shed some light here. Cheers, Phuah Yee Keat
Nick
2004-Aug-20 07:58 UTC
[Wxruby-users] wxruby-swig: where does wxclasses-2.4.2.xml comes from?
> Was trying to understand more about the internals of wxruby-swig, > where does the big chunk of XML comes from? I saw something similiar > in Python, is that massaged out of there?wxclasses-2.4.2.xml is something Kevin found online. We didn''t make the tools to massage it out, but we''re happily using their XML.> since http://nqxml.sourceforge.net/ > also recommends that we switch to use rexml which is shipped with ruby?I think eventually. We''re trying to get everything to build first, and then try and sort out the build environment issues. If you want to take that on, feel free! A few notes: 1) It helps if you have the latest SWIG out of CVS, though hopefully I''ve patched fixdeleting.rb to handle any problems caused. 2) set the environment variable WXRUBY_SWIG equal to something or else ''rake reswig'' won''t work. 3) If you need a batch file to kick off rake from the DOS prompt I''ve got one. 4) Rake is flaky with MinGW, but works with MSVC. 5) Try to clear any major changes with the list before implementing, just so we know whats up. Hope this helps, Nick Phuah Yee Keat wrote:> Was trying to understand more about the internals of wxruby-swig, > where does the big chunk of XML comes from? I saw something similiar > in Python, is that massaged out of there? > > The codes produced by extractxml.rb and wxclasses-2.4.2.xml is quite > different from the original header files. Just for example the > WxDialog class. > > OnXXX are non-virtual in WxWidgets, but virtual in wxruby-swig > ShowModal are virtual in WxWidgets, but non-virtual in wxruby-swig > > I realize that wxruby-swig is in a very highly experimental stage, but > would appreciate it if someone can shed some light here. > > Cheers, > Phuah Yee Keat > _______________________________________________ > wxruby-users mailing list > wxruby-users@rubyforge.org > http://rubyforge.org/mailman/listinfo/wxruby-users > > >
Curt Hibbs
2004-Aug-20 08:10 UTC
[Wxruby-users] wxruby-swig: where does wxclasses-2.4.2.xml comesfrom?
Nick wrote:> > A few notes: > > 1) It helps if you have the latest SWIG out of CVS, though hopefully > I''ve patched fixdeleting.rb to handle any problems caused. > 2) set the environment variable WXRUBY_SWIG equal to something or else > ''rake reswig'' won''t work. > 3) If you need a batch file to kick off rake from the DOS prompt I''ve > got one. > 4) Rake is flaky with MinGW, but works with MSVC. > 5) Try to clear any major changes with the list before implementing, > just so we know whats up.I think it would be a good idea to put these notes (and others that you have posted onto a page on our wiki. Then it will be easier for you and others to make quick changes whenever a new point comes up, plus you can just post the URL for new users that have questions. Curt
Kevin Smith
2004-Aug-20 08:24 UTC
[Wxruby-users] wxruby-swig: where does wxclasses-2.4.2.xml comes from?
Phuah Yee Keat wrote:> Was trying to understand more about the internals of wxruby-swig, where > does the big chunk of XML comes from?A guy created the xml file, hoping that it would eventually become the official wxWidgets documentation. From the xml, he can create HTML help pages, and just about any other format. Currently, the wxWidgets api docs are maintained in (I think) TeX files (ugh). He builds the xml file from the TeX files by running a script he wrote. Here is the home page: http://www.bzzt.net/~wxwindows/index2.html> The codes produced by extractxml.rb and wxclasses-2.4.2.xml is quite > different from the original header files. Just for example the WxDialog > class. > > OnXXX are non-virtual in WxWidgets, but virtual in wxruby-swig > ShowModal are virtual in WxWidgets, but non-virtual in wxruby-swigAny time I find an error in the xml, I submit it to the author. Sometimes the error has been in his translation scripts, in which case he fixes it and I can download an improved xml file. If the error is in the TeX files, he cannot change it. In that case, I add a special case to my extractxml.rb program. Unfortunately, there are quite a few errors in the existing official wxWindows/wxWidgets api docs. I have been told that the wx developers are reluctant to fix the 2.4 docs because they are focused on 2.5. For the specific cases you mention: All OnXxx methods must be virtual, because if they are not, they could not be overridden. I suspect if you look at the parent class .h file, you will find that they are declared virtual (possibly pure virtual). ShowModal is, in fact, declared virtual by wx. At least in the wxGTK version on my machine. Thanks for asking this question. I really appreciate the chance to put this kind of information into the mailing list archives. Kevin
Kevin Smith
2004-Aug-20 08:26 UTC
[Wxruby-users] wxruby-swig: where does wxclasses-2.4.2.xml comesfrom?
Curt Hibbs wrote:> I think it would be a good idea to put these notes (and others that you have > posted onto a page on our wiki. Then it will be easier for you and others to > make quick changes whenever a new point comes up, plus you can just post the > URL for new users that have questions.Would anyone care to volunteer to manage some kind of FAQ for wxruby? At least to start, it could just be a wiki page. Kevin
Phuah Yee Keat
2004-Aug-24 01:26 UTC
[Wxruby-users] wxruby-swig: where does wxclasses-2.4.2.xml comes from?
Nick wrote:>> since http://nqxml.sourceforge.net/ >> also recommends that we switch to use rexml which is shipped with ruby? > > I think eventually. We''re trying to get everything to build first, and > then try and sort out the build environment issues. If you want to take > that on, feel free!Played with REXML, and found this: http://www.talkaboutprogramming.com/group/comp.lang.ruby/messages/87120.html Seemed that there are problems with rexml on 1.8.1, we could use the latest rexml version, but that kills the purpose of taking away a dependancy. Cheers, Phuah Yee Keat
Phuah Yee Keat
2004-Aug-24 01:34 UTC
[Wxruby-users] wxruby-swig: where does wxclasses-2.4.2.xml comes from?
Kevin Smith wrote:>> OnXXX are non-virtual in WxWidgets, but virtual in wxruby-swig >> ShowModal are virtual in WxWidgets, but non-virtual in wxruby-swig > > For the specific cases you mention: > > All OnXxx methods must be virtual, because if they are not, they could > not be overridden. I suspect if you look at the parent class .h file, > you will find that they are declared virtual (possibly pure virtual).I am still wondering why OnOK (for example) is not virtual in WxGTK. Is it intentional? Cheers, Phuah Yee Keat
Kevin Smith
2004-Aug-24 08:13 UTC
[Wxruby-users] wxruby-swig: where does wxclasses-2.4.2.xml comes from?
Phuah Yee Keat wrote:> Kevin Smith wrote: >> All OnXxx methods must be virtual, because if they are not, they could >> not be overridden. I suspect if you look at the parent class .h file, >> you will find that they are declared virtual (possibly pure virtual). > > > I am still wondering why OnOK (for example) is not virtual in WxGTK. > Is it intentional?That definitely looks like a bug in wxWindows, to me. They override OnOK in several subclasses of wxDialog, but since it is not virtual it won''t do what it should. It would be great if you could ask the wxWidgets folks about this. Thanks, Kevin
Kevin Smith
2004-Aug-24 08:42 UTC
[Wxruby-users] wxruby-swig: where does wxclasses-2.4.2.xml comes from?
Phuah Yee Keat wrote:> Played with REXML, and found this: > http://www.talkaboutprogramming.com/group/comp.lang.ruby/messages/87120.html > > Seemed that there are problems with rexml on 1.8.1, we could use the > latest rexml version, but that kills the purpose of taking away a > dependancy.Thanks for finding that. It would be better to be using a new REXML, because eventually it will ship with ruby, and at that point we will not have any external dependencies. If you can switch us to REXML, I would really appreciate it. If not, I''ll plan to do it myself at some point. Thanks, Kevin