From: Takaaki T. <tt...@ja...> - 2001-08-19 00:06:13
|
At Fri, 17 Aug 2001 20:35:57 -0700, Kevin Smith <kev...@ho...> wrote: > > - it is not recommended that ruby object is owned by the `RBFLXxxx'. > > I still don't understand this. this is not my recommendation. I adopted this technique to the sample implementation which is described below. > I agree, but we can automate this using macros, templates, or our own > preprocessor (something like SWIG, I guess). By the way, did you consider > SWIG? Have you tried it on any projects? I haven't, and I'm still trying to > figure out if it would help us or not. I will not use any pre-processor like SWIG. and don't know the details of SWIG well. > > but I want to think about this issue for a few days, since I > > think that it is the most important point of Ruby/Fltk. > > and I will try to find another design improving your idea. > > Great. I'll be experimenting this weekend, which will really help me > understand how to improve my ideas, too. now I find out the nice implementation for me. it is including both of your idea and my idea. I've put the sample implementation. download the following archive and refer it. http://ruby-fltk.sourceforge.net/archive/ruby-fltk-new.tar.gz in this implementation, we create the subclass RBFLSubXxxx for each Fl_Xxxx. and in the ruby layer, we will have the class FLXxxx and FLSubXxxx for the C++ class Fl_Xxxx and RBFLSubXxxx. there are sample two script in the archive. one is for Fl_Xxxx and the other shows how to handle the event. -- Takaaki Tateishi <tt...@ja...> |