From: Stefano Crocco Date: 2009-04-30T04:39:22+09:00 Subject: Re: WxRuby "source code" On Wednesday 29 April 2009, Pito Salas wrote: > |I was trying to figure out what the correct parameters are for > |ScrolledWindow.new. > | > |In the doc I saw some detrails > |(http://wxruby.rubyforge.org/doc/scrolledwindow.html#ScrolledWindow_new) > |but I still couldnt see what I was doing wrong. > | > |So I looked at the sources for the gem, and found no explicit definition > |of the class and methods, but a mention of wxruby2, the 'binary > |library'. What's that? > | > |Then looking deeper I found the wxruby2 gem's sources, where again no > |explicit mention about ScrolledWindow.new. It looks to me like wxruby2 > |is a ruby "api" to the underlying c library. There's mention of Swig, > |what's that? You're right, wxruby2 is a ruby binding to the WxWidgets C++ library (http://wxwidgets.org/). Swig (http://www.swig.org/) is a tool which makes eaiser to generate bindings from C(++) to several other language, including ruby by automatically create some of the code needed to do so. The scrolledwindow.i file you mention below is one of the files needed by Swig and, if I'm not mistaken (I've never used Swig myself) it plays a role similar to those of .h files in C. As for your problem, I think the wxwidgets web site may have some more documentation, but it will be for C++, so there will be differences from ruby. Other than that, you can ask on the wxruby mailing list (http://wxruby.rubyforge.org/wiki/wiki.pl?MailingLists), or even here. In any case, you'll need to post the code which causes the problem, or at least explain what the problem is and post any error message you think relevant. I hope this helps Stefano