From: Takaaki T. <tt...@kt...> - 2001-11-18 01:53:04
|
Hello, I'd like to inform you that I've released the version 0.4 of Ruby/FLTK. You can download the source archive and the binary for cygwin at the following URL: http://ruby-fltk.sourceforge.net/ Regards, -- Takaaki Tateishi <tt...@kt...> |
From: Kent D. <ke...@st...> - 2001-11-23 21:45:22
|
Takaaki Tateishi wrote: > I'd like to inform you that I've released the version 0.4 of Ruby/FLTK. > You can download the source archive and the binary for cygwin at the > following URL: > http://ruby-fltk.sourceforge.net/ Hi. I have some small problems with 0.4. I'm running Mandrake 8.0, Ruby 1.6.4 (and 1.6.5), gcc 2.96 <SNIP> g++ -fPIC -O3 -pipe -mcpu=pentiumpro -march=i586 -ffast-math -fno-strength-reduce -I/usr/lib/ruby/1.6/i586-linux-gnu -I/usr/include -DHAVE_X11_X_H -DHAVE_X11_XLOCALE_H -DHAVE_SETLOCALE -DHAVE_FL_FL_H -I/usr/local/include -I/usr/X11R6/include -DUSE_GL -I/usr/local/include -I/usr/X11R6/include -c -o flmenu.o flmenu.cc flmenu.cc:145:20: warning: extra tokens at end of #undef directive g++ -fPIC -O3 -pipe -mcpu=pentiumpro -march=i586 -ffast-math -fno-strength-reduce -I/usr/lib/ruby/1.6/i586-linux-gnu -I/usr/include -DHAVE_X11_X_H -DHAVE_X11_XLOCALE_H -DHAVE_SETLOCALE -DHAVE_FL_FL_H -I/usr/local/include -I/usr/X11R6/include -DUSE_GL -I/usr/local/include -I/usr/X11R6/include -c -o flscroll.o flscroll.cc flscroll.cc:29:3: warning: pasting "::" and "HORIZONTAL" does not give a valid preprocessing token flscroll.cc:30:3: warning: pasting "::" and "VERTICAL" does not give a valid preprocessing token flscroll.cc:31:3: warning: pasting "::" and "BOTH" does not give a valid preprocessing token flscroll.cc:32:3: warning: pasting "::" and "HORIZONTAL_ALWAYS" does not give a valid preprocessing token flscroll.cc:33:3: warning: pasting "::" and "BOTH_ALWAYS" does not give a valid preprocessing token </SNIP> This all compiles, but those warnings look scary. Is this something I should worry about? But I also got the ol' rb_gc_mark problem. <SNIP> flwidget.cc: In function `void rb_fl_mark (Fl_Widget *)': /usr/local/lib/ruby/1.6/i686-linux/intern.h:189: too many arguments to function `void rb_gc_mark ()' flwidget.cc:34: at this point in file </SNIP> But this seemed to be the GCC 2.96 fault. I changed the intern.h of Ruby to read void rb_gc_mark(VALUE); and the flwidget.cc in ruby-fltk to read rb_gc_mark( (long unsigned int)(userdata)); I know, I should update :-) ________________________ Now, as for something _functional_ I'm missing. FL_SYMBOL_LABEL. I was hoping for find SYMBOL_LABEL constant in Fltk, as I want my buttons to show those nice arrow pictures. When I didn't find, it I tried this: 10.times{|i| upbutton = Fltk::Button.new( x, y ,butw, h/(4*3), '@#2<-' ). labeltype=i } and noticed that the second button (labeltype=1) doesn't show anything (a.k.a. it is FL_NO_LABEL), but the other types don't appear to work. (labeltype>5 all also go blank.) -- <[ Kent Dahl ]>================<[ http://www.stud.ntnu.no/~kentda/ ]> )____(stud.techn.;ind.øk.data)||(softwareDeveloper.at(Trustix))_( /"Opinions expressed are mine and not those of my Employer, "\ ( "the University, my girlfriend, stray cats, banana fruitflies, " ) \"nor the frontal lobe of my left cerebral hemisphere. "/ |
From: Takaaki T. <tt...@kt...> - 2001-11-24 02:06:39
|
At Fri, 23 Nov 2001 22:56:33 -0500, Kent Dahl <ke...@st...> wrote: > -I/usr/X11R6/include -c -o flmenu.o flmenu.cc > flmenu.cc:145:20: warning: extra tokens at end of #undef directive .. > flscroll.cc:29:3: warning: pasting "::" and "HORIZONTAL" does not give a > valid preprocessing token .. These are my faults. I've fixed them on the cvs. > I changed the intern.h of Ruby to read > void rb_gc_mark(VALUE); > and the flwidget.cc in ruby-fltk to read > rb_gc_mark( (long unsigned int)(userdata)); This is correct. Actually ruby-1.7 has void rb_gc_mark _((VALUE)); in the intern.h. > Now, as for something _functional_ I'm missing. FL_SYMBOL_LABEL. I've also added them. Thanks, -- Takaaki Tateishi <tt...@kt...> |
From: Kent D. <ke...@st...> - 2001-11-24 21:22:14
|
Takaaki Tateishi wrote: > I've also added them. Thank you! With these, I've got my first running version of MasterMind in Ruby using FLTK. MasterMind is one of those games I write in every new language I learn, to help me get a feel for various parts of the language, and in this case Ruby-FLTK too. For the curious: http://www.stud.ntnu.no/~kentda/public/coding/ruby/projects/toys/ but the rules aren't explained in-game yet. Ok, back to nagging :-) I'm thinking of writing the example Editor FLTK application in Ruby-FLTK. http://www.fltk.org/doc-1.0/editor.html#editor But when I tried to set up a MenuBar, I got stumped. I cannot find any MenuItem class, but perhaps I don't need it? Are there any samples of using menus and menubars in Ruby-FLTK? -- <[ Kent Dahl ]>================<[ http://www.stud.ntnu.no/~kentda/ ]> )____(stud.techn.;ind.øk.data)||(softwareDeveloper.at(Trustix))_( /"Opinions expressed are mine and not those of my Employer, "\ ( "the University, my girlfriend, stray cats, banana fruitflies, " ) \"nor the frontal lobe of my left cerebral hemisphere. "/ |
From: Takaaki T. <tt...@kt...> - 2001-11-25 04:10:35
|
At Sat, 24 Nov 2001 22:33:34 -0500, > But when I tried to set up a MenuBar, I got stumped. I cannot find any > MenuItem class, but perhaps I don't need it? Are there any samples of > using menus and menubars in Ruby-FLTK? Wrappers to Fl_Menu_Item have not been available yet. But I think we can use Menu#add() method to do such things simply. See also test/menu_bar.rb. -- Takaaki Tateishi <tt...@kt...> |
From: Kent D. <ke...@st...> - 2001-11-27 20:47:28
|
Kent Dahl wrote: > With these, I've got my first running version of MasterMind in Ruby > using FLTK. ... > For the curious: > http://www.stud.ntnu.no/~kentda/public/coding/ruby/projects/toys/ Hi again. I've got most of the "Simple Text Editor" sample application in FLTK up and running in Ruby-FLTK, however it does require the newest cvs (+ implementation of Fltk.input, which I sent a naive version of on the devel list.) One thing I haven't got working yet, is Alt-shortcuts. The samples show "^n" which mean Ctrl+n, but I'm not sure how to do all the various shortcuts that are shown in the tutorial. It has (FL_ALT + 's') and (FL_ALT + FL_SHIFT + 's') Ideally, I think it should be possible to have a method you pass in the Fltk::ALT constant with the character to some "shortcut creator", so that we don't end up with more regexp-look-alike magical character sequences ;-) Oh, and Kevin: Where is the Space Monkeys thingie available? It sounds cool! -- <[ Kent Dahl ]>================<[ http://www.stud.ntnu.no/~kentda/ ]> )____(stud.techn.;ind.øk.data)||(softwareDeveloper.at(Trustix))_( /"Opinions expressed are mine and not those of my Employer, "\ ( "the University, my girlfriend, stray cats, banana fruitflies, " ) \"nor the frontal lobe of my left cerebral hemisphere. "/ |
From: Takaaki T. <tt...@kt...> - 2001-11-28 12:01:17
|
At Tue, 27 Nov 2001 21:59:10 -0500, Kent Dahl <ke...@st...> wrote: > I've got most of the "Simple Text Editor" sample application in FLTK up > and running in Ruby-FLTK, however it does require the newest cvs (+ > implementation of Fltk.input, which I sent a naive version of on the > devel list.) I'd like to provide the ruby-fltk with your editor. Can I absorb it? > "^n" which mean Ctrl+n, but I'm not sure how to do all the various > shortcuts that are shown in the tutorial. > It has (FL_ALT + 's') and (FL_ALT + FL_SHIFT + 's') > Ideally, I think it should be possible to have a method you pass in the > Fltk::ALT constant with the character to some "shortcut creator", so > that we don't end up with more > regexp-look-alike magical character sequences ;-) "#s" and "+s" mean FL_ALT + 's' and FL_SHIFT + 's' respectively. But I fixed Menu_#add() so that we can pass an integer value like this: @menu.add("file/exit2", FLTK::CTRL + ?q){ exit(0) } This line is a part of test/menu_bar.rb I modified today. Thank you for your advice. -- Takaaki Tateishi <tt...@kt...> |
From: Kevin S. <kev...@ya...> - 2001-11-29 01:43:27
|
--- Kent Dahl <ke...@st...> wrote: > Oh, and Kevin: Where is the Space Monkeys thingie > available? It sounds cool! I have just now released the Ruby/FLTK version. It's rough, but works just as well as the GTK version ever did. Actually, a bit better because I improved the command interface slightly. The zip file is now linked from my main page, or you can grab it directly from http://www.qualitycode.com/code/monkeys-fltk.zip Oh, I didn't update the README, so ignore the stuff at the bottom about a keyboard interface. The command to run the game is: ruby uigame.rb Let me know if you actually play it! Kevin __________________________________________________ Do You Yahoo!? Yahoo! GeoCities - quick and easy web site hosting, just $8.95/month. http://geocities.yahoo.com/ps/info1 |