Tonight, I generated a full set of almost 400 swiggable .h files, one for each wxWidgets class. I used the big xml file that I mentioned earlier, which itself was (apparently) scraped from the wxWidgets html help files. Several interesting notes: 1. REXML took forever to parse the 2.5 meg xml file. I didn''t want to do stream processing, and hoped to stay with a pure-ruby solution, so I used NQXML. It is somewhat slow, but that''s ok since this doesn''t need to be run very often. It works. 2. The xml file itself is not entirely accurate. I have already discovered one case where it does not match the 2.4.2 html docs. To work around this, the app I wrote to extract .h files from the xml has a table of incorrect api entries, along with a table of missing entries. 3. To make sure it works, I have converted a single class (wxMenuBar) over to use the new .h file. Aside from xml problems (see above), it worked perfectly. I am optimistic that adding support for most classes and most methods should be quite easy. 4. The .h files could be used by anyone wanting to swig wxWidgets for any language. Kevin P.S. This weekend my focus will be on the wxRuby 0.3 release.
Excellent! (both the SWIG successes and the 0.3 release) Curt Kevin Smith wrote:> > Tonight, I generated a full set of almost 400 swiggable .h files, one > for each wxWidgets class. I used the big xml file that I mentioned > earlier, which itself was (apparently) scraped from the wxWidgets html > help files. > > Several interesting notes: > > 1. REXML took forever to parse the 2.5 meg xml file. I didn''t want to do > stream processing, and hoped to stay with a pure-ruby solution, so I > used NQXML. It is somewhat slow, but that''s ok since this doesn''t need > to be run very often. It works. > > 2. The xml file itself is not entirely accurate. I have already > discovered one case where it does not match the 2.4.2 html docs. To work > around this, the app I wrote to extract .h files from the xml has a > table of incorrect api entries, along with a table of missing entries. > > 3. To make sure it works, I have converted a single class (wxMenuBar) > over to use the new .h file. Aside from xml problems (see above), it > worked perfectly. I am optimistic that adding support for most classes > and most methods should be quite easy. > > 4. The .h files could be used by anyone wanting to swig wxWidgets for > any language. > > Kevin > > P.S. This weekend my focus will be on the wxRuby 0.3 release. > > _______________________________________________ > wxruby-users mailing list > wxruby-users@rubyforge.org > http://rubyforge.org/mailman/listinfo/wxruby-users