From andreas_s at hotmail.com Sun Feb 1 01:26:31 2009 From: andreas_s at hotmail.com (Andreas S) Date: Sun, 1 Feb 2009 06:26:31 +0000 Subject: [fxruby-users] fxruby and the new ruby 1.9.1 Message-ID: Ruby 1.9.1 was just officially released and it might be too premature to report this. However, release note for fxruby 1.6.18 mentioned "minor fixes for compatibility with ruby 1.9.1". So I dare my self to send this. Two problems I encountered: 1. gem install fxruby Error due to ext/fox16/extconf.rb using File.move. Changing it to use FileUtils.move fixes it (along with require 'fileutils'). 2. The following code works before with ruby 1.8.7, fxruby 1.6.16/18, fox 1.16 but not with ruby 1.9.1, fxruby 1.6.18, fox 1.16. Left click on column header is not working for ruby1.9.1/fxruby1.6.18 (works if SEL_RIGHTBUTTONRELEASE handle is not defined) require 'fox16' include Fox app = FXApp.new 'a', 'b' win = FXMainWindow.new app, 'jello', :width => 400, :height => 500 table = FXTable.new(win, :opts => LAYOUT_FILL) table.setTableSize 2, 2 table.columnHeader.connect SEL_COMMAND do |a, b, c| puts "HEADER CLICK" end #=== The above works if the following SEL_RIGHTBUTTONRELEASE is removed table.columnHeader.connect SEL_RIGHTBUTTONRELEASE do |a, b, c| put "HEADER RIGHTCLICKRELEASE" end #=== win.show PLACEMENT_SCREEN app.create app.run -andre _________________________________________________________________ Windows Live? Hotmail?:?more than just e-mail. http://windowslive.com/explore?ocid=TXT_TAGLM_WL_t2_hm_justgotbetter_explore_012009 -------------- next part -------------- An HTML attachment was scrubbed... URL: From stuart_clarke86 at yahoo.com Sun Feb 1 08:32:33 2009 From: stuart_clarke86 at yahoo.com (Stuart Clarke) Date: Sun, 1 Feb 2009 13:32:33 +0000 (GMT) Subject: [fxruby-users] Problems with FX frame layout Message-ID: <344741.99151.qm@web86608.mail.ird.yahoo.com> I am having a nightmare with the layout of my GUI, the attached picture shows the layout I wish to achieve. I have a menu bar, then a tabbook under a horzional seperator, to the right of the tabbook is a narrow frame containing text. I have got this up and running however when i try to add a further frame (which is at the very botton running from right to left) I get problems. I no this is because my global frame is Horizontal and it arranges all new items left to right. How do i get around this? I was thinking maybe the splitter but that doesnt seems to have the flexibilty i need. Below is my code for setting up the layout of my GUI and within each frame will be additional text frames etc. ??? #Window layout ??? window = FXHorizontalFrame.new(self, LAYOUT_SIDE_TOP|LAYOUT_FILL_X|LAYOUT_FILL_Y) ??? tabbook = FXTabBook.new(window,:opts => FRAME_SUNKEN|LAYOUT_FILL_X|LAYOUT_LEFT) ??? md5List = FXVerticalFrame.new(window, :opts => FRAME_SUNKEN|LAYOUT_FILL_X|LAYOUT_BOTTOM) ??? idDesc = FXVerticalFrame.new(window, :opts => FRAME_SUNKEN|LAYOUT_RIGHT) Thanks in advance -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: menu.JPG Type: image/jpeg Size: 7643 bytes Desc: not available URL: From stuart_clarke86 at yahoo.com Sun Feb 1 18:45:24 2009 From: stuart_clarke86 at yahoo.com (Stuart Clarke) Date: Sun, 1 Feb 2009 23:45:24 +0000 (GMT) Subject: [fxruby-users] Problems with FX frame layout In-Reply-To: <344741.99151.qm@web86608.mail.ird.yahoo.com> Message-ID: <277241.71224.qm@web86610.mail.ird.yahoo.com> Not to worry I have fixed this now. Thanks anyway --- On Sun, 1/2/09, Stuart Clarke wrote: From: Stuart Clarke Subject: [fxruby-users] Problems with FX frame layout To: fxruby-users at rubyforge.org Date: Sunday, 1 February, 2009, 1:32 PM I am having a nightmare with the layout of my GUI, the attached picture shows the layout I wish to achieve. I have a menu bar, then a tabbook under a horzional seperator, to the right of the tabbook is a narrow frame containing text. I have got this up and running however when i try to add a further frame (which is at the very botton running from right to left) I get problems. I no this is because my global frame is Horizontal and it arranges all new items left to right. How do i get around this? I was thinking maybe the splitter but that doesnt seems to have the flexibilty i need. Below is my code for setting up the layout of my GUI and within each frame will be additional text frames etc. ??? #Window layout ??? window = FXHorizontalFrame.new(self, LAYOUT_SIDE_TOP|LAYOUT_FILL_X|LAYOUT_FILL_Y) ??? tabbook = FXTabBook.new(window,:opts => FRAME_SUNKEN|LAYOUT_FILL_X|LAYOUT_LEFT) ??? md5List = FXVerticalFrame.new(window, :opts => FRAME_SUNKEN|LAYOUT_FILL_X|LAYOUT_BOTTOM) ??? idDesc = FXVerticalFrame.new(window, :opts => FRAME_SUNKEN|LAYOUT_RIGHT) Thanks in advance _______________________________________________ fxruby-users mailing list fxruby-users at rubyforge.org http://rubyforge.org/mailman/listinfo/fxruby-users -------------- next part -------------- An HTML attachment was scrubbed... URL: From stuart_clarke86 at yahoo.com Sun Feb 1 18:48:49 2009 From: stuart_clarke86 at yahoo.com (Stuart Clarke) Date: Sun, 1 Feb 2009 23:48:49 +0000 (GMT) Subject: [fxruby-users] show(PLACEMENT_MAXIMIZED) Message-ID: <658887.87048.qm@web86602.mail.ird.yahoo.com> Hi, I want my GUI to be maximized upon being latched, which I thought would be simple with the following code: ? def create ??? super ??? show(PLACEMENT_MAXIMIZED) ? end end This maximises the GUI however it cuts the very top of the GUI off (the blue bar on you internet browser for example). How do I stop this? At the moment the user cannot see the close, maximise and restore buttons. Many thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: From lyle at lylejohnson.name Mon Feb 2 10:57:43 2009 From: lyle at lylejohnson.name (Lyle Johnson) Date: Mon, 2 Feb 2009 09:57:43 -0600 Subject: [fxruby-users] fxruby and the new ruby 1.9.1 In-Reply-To: References: Message-ID: <485DCD5E-1831-477C-9CC2-B60C75927193@lylejohnson.name> On Feb 1, 2009, at 12:26 AM, Andreas S wrote: > Ruby 1.9.1 was just officially released and it might be too > premature to report this. However, release note for fxruby 1.6.18 > mentioned "minor fixes for compatibility with ruby 1.9.1". So I dare > my self to send this. > > Two problems I encountered: > 1. gem install fxruby > Error due to ext/fox16/extconf.rb using File.move. Changing it > to use FileUtils.move fixes it (along with require 'fileutils'). You're right, sorry about that. I thought I had fixed that awhile back, but it turns out I just wasn't exercising that part of the installation script and so I assumed it was no longer a problem. > 2. The following code works before with ruby 1.8.7, fxruby > 1.6.16/18, fox 1.16 but not with ruby 1.9.1, fxruby 1.6.18, fox > 1.16. Left click on column header is not working for ruby1.9.1/ > fxruby1.6.18 (works if SEL_RIGHTBUTTONRELEASE handle is not defined) OK, I'll log a bug report for this and see what can be done. -------------- next part -------------- An HTML attachment was scrubbed... URL: From kb9agt at gmail.com Thu Feb 5 16:44:45 2009 From: kb9agt at gmail.com (Douglas Allen) Date: Thu, 5 Feb 2009 15:44:45 -0600 Subject: [fxruby-users] GTK2 In-Reply-To: <472242.54507.qm@web30008.mail.mud.yahoo.com> References: <472242.54507.qm@web30008.mail.mud.yahoo.com> Message-ID: Thanks Dave. I am enrolled and falling behind. I may give the next batch a try. With the quizzes I'm okay but the exercises are getting tough. I may need more time like with http://www.sapphiresteel.com/The-Book-Of-Ruby On 1/28/09, dave L wrote: > regarding your comment about learning more basic ruby my i suggest this FREE online site. > > www.rubylearning.com > I did 2 class (bit thick :)). > and then sat on my hands until recently. > > may even redo it again sometime this year. > > lost of mentors/assistant instructors etc. > expectations? > you participate in forums by posting your code and helping others. > 1 lession (a number of excerises last 1 week - Sat - Sat) all at India Std Time. > > have a look it's worth it and FREE - course is 3 months (12 weeks). > > cheers, > > dave. > > > --- On Thu, 29/1/09, Douglas Allen wrote: > > > From: Douglas Allen > > Subject: [fxruby-users] GTK2 > > To: fxruby-users at rubyforge.org > > Received: Thursday, 29 January, 2009, 10:12 AM > > > I am looking at using gtk2 now that I have just tasted > > fox16. I tend > > to play with these programs when I first discover them but > > after a > > while go on to something else. I have GUI tool kits for > > both now and > > was wanting to see if others here have tried gtk2 also. I > > will get > > into a forum there when I learn a little more basic ruby. > > There is an > > online course for FXruby here: > > > > http://rubylearning.com/blog/2008/10/20/fxruby-yaml-activerecord-and-database-a-new-course/ > > > > Looking for folks interested in GTK2. > > > _______________________________________________ > > fxruby-users mailing list > > fxruby-users at rubyforge.org > > http://rubyforge.org/mailman/listinfo/fxruby-users > > > Easy recipes for Christmas entertaining on Yahoo!Xtra Lifestyle- http://nz.lifestyle.yahoo.com/food-recipes > _______________________________________________ > fxruby-users mailing list > fxruby-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/fxruby-users > From rob.mccabe at gmail.com Sat Feb 7 13:38:55 2009 From: rob.mccabe at gmail.com (Rob McCabe) Date: Sat, 7 Feb 2009 13:38:55 -0500 Subject: [fxruby-users] Error installing MacPorts rb-fxruby... Message-ID: Hi all, I'm encountering an error while trying to install the MacPorts version of fxruby on a Intel Mac running 10.4.11. It appears to be having trouble installing and building the 'fox' library prerequisite. It looks like it's having trouble generating the libraries: "-o .libs/libFOX-1.6.0.0.34.dylib" and "-o libFOX-1.6.la". The errors generated are: /usr/libexec/gcc/i686-apple-darwin8/4.0.1/libtool: can't locate file for: -lGLU /usr/libexec/gcc/i686-apple-darwin8/4.0.1/libtool: file: -lGLU is not an object file (not allowed in a library) /usr/libexec/gcc/i686-apple-darwin8/4.0.1/libtool: can't locate file for: -lGL /usr/libexec/gcc/i686-apple-darwin8/4.0.1/libtool: file: -lGL is not an object file (not allowed in a library) My understanding is that GLU and GL are OpenGL libs and should just "be there" with the OS, right? The version of fox it's trying to install is 1.6.34. My version of MacPorts is 1.70... I had just completely uninstalled my previous version and installed 1.70 from scratch. I've tried "port clean" on the fox and Xft2 packages and tried the install again, with no luck. I poked around in /usr/lib but did not see libs named "*GL*"... any idea where these should be hanging out? Any other suggestions? Thanks in advance! Rob -------------- next part -------------- An HTML attachment was scrubbed... URL: From wbparsons at cshore.com Sat Feb 7 16:33:34 2009 From: wbparsons at cshore.com (William B. Parsons) Date: Sat, 7 Feb 2009 16:33:34 -0500 Subject: [fxruby-users] filtering input to FXTable Message-ID: <20090207163334.0545784e.wbparsons@cshore.com> I'm working on an application that has a spreadsheet-like interface using an FXTable. The allowable input varies according to the column, so that one column may only have integer values, another monetary values (123.45), &c. I gather that with an FXTextField widget, this could be accomplished by connecting to the SEL_VERIFY message and rejecting illegal input, but this does not seem to be available for FXTable. How can I accomplish this with FXTable? -- Will Parsons From stuart_clarke86 at yahoo.com Sun Feb 8 13:34:00 2009 From: stuart_clarke86 at yahoo.com (Stuart Clarke) Date: Sun, 8 Feb 2009 18:34:00 +0000 (GMT) Subject: [fxruby-users] Table example and FXTabBook Message-ID: <105021.53854.qm@web86603.mail.ird.yahoo.com> Hi, Before I invest to much of my time in this I was wondering is it possible to embed a table (like the one in the FX examples directory - table.rb) into a text field in a tab? I have a tab and currently I just push out all my data from an array onto a text area using array.join("\n"). I would like to put this into a structured table for example data A????????? data B???????? data C Can I do this? I assume it will need to be a loop to create new rows each time a new entry is read from the array? Many thanks Stuart -------------- next part -------------- An HTML attachment was scrubbed... URL: From lyle at lylejohnson.name Sun Feb 8 17:58:39 2009 From: lyle at lylejohnson.name (Lyle Johnson) Date: Sun, 8 Feb 2009 16:58:39 -0600 Subject: [fxruby-users] Table example and FXTabBook In-Reply-To: <105021.53854.qm@web86603.mail.ird.yahoo.com> References: <105021.53854.qm@web86603.mail.ird.yahoo.com> Message-ID: On Feb 8, 2009, at 12:34 PM, Stuart Clarke wrote: > Before I invest to much of my time in this I was wondering is it > possible to embed a table (like the one in the FX examples directory > - table.rb) into a text field in a tab? You can't embed an FXTable into an FXText or FXTextField widget, but you can certainly put an FXTable inside any container widget (e.g. an FXVerticalFrame) that you'd typically use as a tab page. -------------- next part -------------- An HTML attachment was scrubbed... URL: From lyle at lylejohnson.name Mon Feb 9 11:06:51 2009 From: lyle at lylejohnson.name (Lyle Johnson) Date: Mon, 9 Feb 2009 10:06:51 -0600 Subject: [fxruby-users] FXIconList sort function In-Reply-To: <20090203232643.C5500185810A@rubyforge.org> References: <20090203232643.C5500185810A@rubyforge.org> Message-ID: <3AF6B0F3-5C17-427D-A22D-A31C7956C051@lylejohnson.name> On Feb 3, 2009, at 5:26 PM, Jonathan Hadders wrote: > I'm trying to implement an FXIconList with multiple columns so that > the list can be sorted in ascending or descending order based on any > of the columns (much like FXFileList, I believe). I ran across an > earlier post of yours (8/5/2003 - http://www.varioustopics.com/ruby/189237-fxiconlist-questions.html) > and understand subclassing the FXIconListItem and FXIconList, but > then you mention changing "the current sorting method". I wasn't > sure how to do that and then noticed FXRuby bug #1655, which sounds > like its related. > > Is there a workaround for this? How can I "set the sorting method" > that sortItems() uses? Thanks for any help you could provide! That functionality is no longer available in FXRuby (if it ever was) and I'm not sure what it would take to get it working. Without getting too bogged down in the details (but I could if you'd like ;), the basic problem is that the mechanism that FOX provides for overriding the default FXIconList sorting algorithm doesn't give us enough context (on the Ruby side) to know which FXIconList it's associated with. From gatolinux at gmail.com Fri Feb 13 13:53:19 2009 From: gatolinux at gmail.com (GatoLinux) Date: Fri, 13 Feb 2009 12:53:19 -0600 Subject: [fxruby-users] install.rb:655:in `command': system("make") failed (RuntimeError) Message-ID: Hello! I used this command: ruby install.rb config -- \ --with-fox-include=/opt/fox-1.6.35/include/ --with-fox-lib=/opt/fox-1.6.35/lib/ to configure FXRuby; then, I ran: ruby install.rb setup followed by ruby install.rb install but I got this installation error: In file included from include/FXRuby.h:825, from include/FXRbCommon.h:93, from ui_wrap.cpp:584: include/inlinestubs.h: In function `void FXApp_init(FX::FXApp*, VALUE, bool)': include/inlinestubs.h:20: error: `RARRAY_LEN' was not declared in this scope ui_wrap.cpp: In function `void FXFileSelector_setPatternList(FX::FXFileSelector*, VALUE)': ui_wrap.cpp:1016: error: `RARRAY_LEN' was not declared in this scope ui_wrap.cpp: In function `VALUE _wrap_FXComboBox_fillItems(int, VALUE*, VALUE)': ui_wrap.cpp:4979: error: `RARRAY_LEN' was not declared in this scope ui_wrap.cpp: In function `VALUE _wrap_FXListBox_fillItems(int, VALUE*, VALUE)': ui_wrap.cpp:5444: error: `RARRAY_LEN' was not declared in this scope ui_wrap.cpp: In function `VALUE _wrap_FXTreeListBox_fillItems(int, VALUE*, VALUE)': ui_wrap.cpp:5903: error: `RARRAY_LEN' was not declared in this scope make: *** [ui_wrap.o] Error 1 install.rb:655:in `command': system("make") failed (RuntimeError) from install.rb:664:in `make' from install.rb:1258:in `setup_dir_ext' from install.rb:1532:in `traverse' from install.rb:1549:in `dive_into' from install.rb:1530:in `traverse' from install.rb:1534:in `traverse' from install.rb:1533:in `traverse' from install.rb:1549:in `dive_into' from install.rb:1530:in `traverse' from install.rb:1524:in `exec_task_traverse' from install.rb:1519:in `exec_task_traverse' from install.rb:1246:in `exec_setup' from install.rb:996:in `exec_setup' from install.rb:826:in `invoke' from install.rb:773:in `invoke' from install.rb:1578 So, I was unable to install FXRuby (version 1.6.13) from its sources. Can you give me any clue to fix this issue? I am running Slackware 11.0 with fox-1.6.35 Regards, GatoLinux -------------- next part -------------- An HTML attachment was scrubbed... URL: From lyle at lylejohnson.name Fri Feb 13 18:48:22 2009 From: lyle at lylejohnson.name (Lyle Johnson) Date: Fri, 13 Feb 2009 17:48:22 -0600 Subject: [fxruby-users] install.rb:655:in `command': system("make") failed (RuntimeError) In-Reply-To: References: Message-ID: <397F82D6-D454-4CC3-A4EA-C3AB2341DBFC@lylejohnson.name> What version of Ruby are you building against? I thought the RARRAY_LEN macro had been available for awhile now. On Feb 13, 2009, at 12:53 PM, GatoLinux wrote: > Hello! > > > I used this command: > > > ruby install.rb config -- \ --with-fox-include=/opt/fox-1.6.35/ > include/ --with-fox-lib=/opt/fox-1.6.35/lib/ > > to configure FXRuby; then, I ran: > > ruby install.rb setup followed by ruby install.rb install > > but I got this installation error: > > > In file included from include/FXRuby.h:825, > from include/FXRbCommon.h:93, > from ui_wrap.cpp:584: > include/inlinestubs.h: In function `void FXApp_init(FX::FXApp*, > VALUE, bool)': > include/inlinestubs.h:20: error: `RARRAY_LEN' was not declared in > this scope > ui_wrap.cpp: In function `void > FXFileSelector_setPatternList(FX::FXFileSelector*, VALUE)': > ui_wrap.cpp:1016: error: `RARRAY_LEN' was not declared in this scope > ui_wrap.cpp: In function `VALUE _wrap_FXComboBox_fillItems(int, > VALUE*, VALUE)': > ui_wrap.cpp:4979: error: `RARRAY_LEN' was not declared in this scope > ui_wrap.cpp: In function `VALUE _wrap_FXListBox_fillItems(int, > VALUE*, VALUE)': > ui_wrap.cpp:5444: error: `RARRAY_LEN' was not declared in this scope > ui_wrap.cpp: In function `VALUE _wrap_FXTreeListBox_fillItems(int, > VALUE*, VALUE)': > ui_wrap.cpp:5903: error: `RARRAY_LEN' was not declared in this scope > make: *** [ui_wrap.o] Error 1 > install.rb:655:in `command': system("make") failed (RuntimeError) > from install.rb:664:in `make' > from install.rb:1258:in `setup_dir_ext' > from install.rb:1532:in `traverse' > from install.rb:1549:in `dive_into' > from install.rb:1530:in `traverse' > from install.rb:1534:in `traverse' > from install.rb:1533:in `traverse' > from install.rb:1549:in `dive_into' > from install.rb:1530:in `traverse' > from install.rb:1524:in `exec_task_traverse' > from install.rb:1519:in `exec_task_traverse' > from install.rb:1246:in `exec_setup' > from install.rb:996:in `exec_setup' > from install.rb:826:in `invoke' > from install.rb:773:in `invoke' > from install.rb:1578 > > So, I was unable to install FXRuby (version 1.6.13) from its sources. > > Can you give me any clue to fix this issue? > > I am running Slackware 11.0 with fox-1.6.35 > > > Regards, > > > > GatoLinux > _______________________________________________ > fxruby-users mailing list > fxruby-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/fxruby-users From davidm at astro.berkeley.edu Sat Feb 14 00:43:20 2009 From: davidm at astro.berkeley.edu (David MacMahon) Date: Fri, 13 Feb 2009 21:43:20 -0800 Subject: [fxruby-users] install.rb:655:in `command': system("make") failed (RuntimeError) In-Reply-To: <397F82D6-D454-4CC3-A4EA-C3AB2341DBFC@lylejohnson.name> References: <397F82D6-D454-4CC3-A4EA-C3AB2341DBFC@lylejohnson.name> Message-ID: Hi, Lyle, FWIW, I also ran into this problem when building fxruby against Ruby 1.8.5 (on SuSE 10.1, I think). I think I just hacked definitions of these macros into 1.8.5's ruby.h file... RARRAY_LEN RARRAY_PTR RSTRING_LEN RSTRING_PTR I took the definitions from a 1.8.6 ruby.h file. IMHO, it wouldn't be a bad thing to put them in an fxruby include file with #ifndef guards around them. Dave On Feb 13, 2009, at 15:48 , Lyle Johnson wrote: > What version of Ruby are you building against? I thought the > RARRAY_LEN macro had been available for awhile now. > > On Feb 13, 2009, at 12:53 PM, GatoLinux wrote: > >> Hello! >> >> >> I used this command: >> >> >> ruby install.rb config -- \ --with-fox-include=/opt/fox-1.6.35/ >> include/ --with-fox-lib=/opt/fox-1.6.35/lib/ >> >> to configure FXRuby; then, I ran: >> >> ruby install.rb setup followed by ruby install.rb install >> >> but I got this installation error: >> >> >> In file included from include/FXRuby.h:825, >> from include/FXRbCommon.h:93, >> from ui_wrap.cpp:584: >> include/inlinestubs.h: In function `void FXApp_init(FX::FXApp*, >> VALUE, bool)': >> include/inlinestubs.h:20: error: `RARRAY_LEN' was not declared in >> this scope >> ui_wrap.cpp: In function `void FXFileSelector_setPatternList >> (FX::FXFileSelector*, VALUE)': >> ui_wrap.cpp:1016: error: `RARRAY_LEN' was not declared in this scope >> ui_wrap.cpp: In function `VALUE _wrap_FXComboBox_fillItems(int, >> VALUE*, VALUE)': >> ui_wrap.cpp:4979: error: `RARRAY_LEN' was not declared in this scope >> ui_wrap.cpp: In function `VALUE _wrap_FXListBox_fillItems(int, >> VALUE*, VALUE)': >> ui_wrap.cpp:5444: error: `RARRAY_LEN' was not declared in this scope >> ui_wrap.cpp: In function `VALUE _wrap_FXTreeListBox_fillItems(int, >> VALUE*, VALUE)': >> ui_wrap.cpp:5903: error: `RARRAY_LEN' was not declared in this scope >> make: *** [ui_wrap.o] Error 1 >> install.rb:655:in `command': system("make") failed (RuntimeError) >> from install.rb:664:in `make' >> from install.rb:1258:in `setup_dir_ext' >> from install.rb:1532:in `traverse' >> from install.rb:1549:in `dive_into' >> from install.rb:1530:in `traverse' >> from install.rb:1534:in `traverse' >> from install.rb:1533:in `traverse' >> from install.rb:1549:in `dive_into' >> from install.rb:1530:in `traverse' >> from install.rb:1524:in `exec_task_traverse' >> from install.rb:1519:in `exec_task_traverse' >> from install.rb:1246:in `exec_setup' >> from install.rb:996:in `exec_setup' >> from install.rb:826:in `invoke' >> from install.rb:773:in `invoke' >> from install.rb:1578 >> >> So, I was unable to install FXRuby (version 1.6.13) from its sources. >> >> Can you give me any clue to fix this issue? >> >> I am running Slackware 11.0 with fox-1.6.35 >> >> >> Regards, >> >> >> >> GatoLinux >> _______________________________________________ >> fxruby-users mailing list >> fxruby-users at rubyforge.org >> http://rubyforge.org/mailman/listinfo/fxruby-users > _______________________________________________ > fxruby-users mailing list > fxruby-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/fxruby-users From lyle at lylejohnson.name Sat Feb 14 11:33:50 2009 From: lyle at lylejohnson.name (Lyle Johnson) Date: Sat, 14 Feb 2009 10:33:50 -0600 Subject: [fxruby-users] install.rb:655:in `command': system("make") failed (RuntimeError) In-Reply-To: References: <397F82D6-D454-4CC3-A4EA-C3AB2341DBFC@lylejohnson.name> Message-ID: <7E577695-D3B6-41C8-BCD5-6DC50228220B@lylejohnson.name> Dave, Thanks. I'll look at adding those #defines in the next release. Ruby 1.8.6 has been available for so long now that I didn't consider I might be breaking back-compatibility! Sent from my iPhone On Feb 13, 2009, at 11:43 PM, David MacMahon wrote: > Hi, Lyle, > > FWIW, I also ran into this problem when building fxruby against Ruby > 1.8.5 (on SuSE 10.1, I think). I think I just hacked definitions of > these macros into 1.8.5's ruby.h file... > > RARRAY_LEN > RARRAY_PTR > RSTRING_LEN > RSTRING_PTR > > I took the definitions from a 1.8.6 ruby.h file. > > IMHO, it wouldn't be a bad thing to put them in an fxruby include > file with #ifndef guards around them. > > Dave > > On Feb 13, 2009, at 15:48 , Lyle Johnson wrote: > >> What version of Ruby are you building against? I thought the >> RARRAY_LEN macro had been available for awhile now. >> >> On Feb 13, 2009, at 12:53 PM, GatoLinux wrote: >> >>> Hello! >>> >>> >>> I used this command: >>> >>> >>> ruby install.rb config -- \ --with-fox-include=/opt/fox-1.6.35/ >>> include/ --with-fox-lib=/opt/fox-1.6.35/lib/ >>> >>> to configure FXRuby; then, I ran: >>> >>> ruby install.rb setup followed by ruby install.rb install >>> >>> but I got this installation error: >>> >>> >>> In file included from include/FXRuby.h:825, >>> from include/FXRbCommon.h:93, >>> from ui_wrap.cpp:584: >>> include/inlinestubs.h: In function `void FXApp_init(FX::FXApp*, >>> VALUE, bool)': >>> include/inlinestubs.h:20: error: `RARRAY_LEN' was not declared in >>> this scope >>> ui_wrap.cpp: In function `void >>> FXFileSelector_setPatternList(FX::FXFileSelector*, VALUE)': >>> ui_wrap.cpp:1016: error: `RARRAY_LEN' was not declared in this scope >>> ui_wrap.cpp: In function `VALUE _wrap_FXComboBox_fillItems(int, >>> VALUE*, VALUE)': >>> ui_wrap.cpp:4979: error: `RARRAY_LEN' was not declared in this scope >>> ui_wrap.cpp: In function `VALUE _wrap_FXListBox_fillItems(int, >>> VALUE*, VALUE)': >>> ui_wrap.cpp:5444: error: `RARRAY_LEN' was not declared in this scope >>> ui_wrap.cpp: In function `VALUE _wrap_FXTreeListBox_fillItems(int, >>> VALUE*, VALUE)': >>> ui_wrap.cpp:5903: error: `RARRAY_LEN' was not declared in this scope >>> make: *** [ui_wrap.o] Error 1 >>> install.rb:655:in `command': system("make") failed (RuntimeError) >>> from install.rb:664:in `make' >>> from install.rb:1258:in `setup_dir_ext' >>> from install.rb:1532:in `traverse' >>> from install.rb:1549:in `dive_into' >>> from install.rb:1530:in `traverse' >>> from install.rb:1534:in `traverse' >>> from install.rb:1533:in `traverse' >>> from install.rb:1549:in `dive_into' >>> from install.rb:1530:in `traverse' >>> from install.rb:1524:in `exec_task_traverse' >>> from install.rb:1519:in `exec_task_traverse' >>> from install.rb:1246:in `exec_setup' >>> from install.rb:996:in `exec_setup' >>> from install.rb:826:in `invoke' >>> from install.rb:773:in `invoke' >>> from install.rb:1578 >>> >>> So, I was unable to install FXRuby (version 1.6.13) from its >>> sources. >>> >>> Can you give me any clue to fix this issue? >>> >>> I am running Slackware 11.0 with fox-1.6.35 >>> >>> >>> Regards, >>> >>> >>> >>> GatoLinux >>> _______________________________________________ >>> fxruby-users mailing list >>> fxruby-users at rubyforge.org >>> http://rubyforge.org/mailman/listinfo/fxruby-users >> _______________________________________________ >> fxruby-users mailing list >> fxruby-users at rubyforge.org >> http://rubyforge.org/mailman/listinfo/fxruby-users > > _______________________________________________ > fxruby-users mailing list > fxruby-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/fxruby-users From andreas_s at hotmail.com Mon Feb 16 20:20:03 2009 From: andreas_s at hotmail.com (Andreas S) Date: Tue, 17 Feb 2009 01:20:03 +0000 Subject: [fxruby-users] fox/fxruby message and handler Message-ID: I couldn't figure out why my message-handler does not work. My test code is at the end of this email. Case 1: The 'data' argument to the message handler comes out as an integer instead of my ruby string "joke". Can't I pass any ruby object? I've seen fxruby doc appendix C, where it is recommended to query the sender instead of interpreting the data. Is this the answer, don't pass data when sending message? Case 2: This connect target is never executed. What did I do wrong? I'm certain I must have misunderstood something here. I'd be happy if you can explain or point me to a doc or faq. Many thanks in advance -andre (fxruby 1.6.18, fox 1.6, ruby 1.8.7) class Label < FXLabel include Responder2 include Responder attr_accessor :target def initialize *args super identifier :ID_FUNNY # Enable either case 1 or 2 # Case 1: FXMAPFUNC SEL_COMMAND, ID_FUNNY, 'funny' # End of case 1 # Case 2: connect SEL_COMMAND do puts "In Connect" end # End of case 2 end def funny sender, selector, data puts "Data is #{data}" end end app = FXApp.new "a", "b" win = FXMainWindow.new app, "c", :width => 40, :height => 300 frame = FXVerticalFrame.new win label = Label.new frame, "Label" button = FXButton.new frame, "Button" button.connect SEL_COMMAND do label.handle b1, FXSEL(SEL_COMMAND, Label::ID_FUNNY, "joke") app.create app.run _________________________________________________________________ See how Windows Mobile brings your life together?at home, work, or on the go. http://clk.atdmt.com/MRT/go/msnnkwxp1020093182mrt/direct/01/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From lyle at lylejohnson.name Tue Feb 17 10:19:41 2009 From: lyle at lylejohnson.name (Lyle Johnson) Date: Tue, 17 Feb 2009 09:19:41 -0600 Subject: [fxruby-users] fox/fxruby message and handler In-Reply-To: References: Message-ID: <57cf8f720902170719v5ed2c1cav9f348c42dcbfa82b@mail.gmail.com> On Mon, Feb 16, 2009 at 7:20 PM, Andreas S wrote: > I couldn't figure out why my message-handler does not work. My test code is > at the end of this email. > > Case 1: > The 'data' argument to the message handler comes out as an integer instead > of my ruby string "joke". Can't I pass any ruby object? No, you can't pass any Ruby object; it needs to be the kind of data that the target object is expecting for the message type and selector. It appears that you're wanting to change the label's text whenever the button is pressed, right? In that case, you'd want to do something like: button.connect(SEL_COMMAND) do label.text = "joke" end > I've seen fxruby doc appendix C, where it is recommended to query the sender instead of > interpreting the data. Is this the answer, don't pass data when sending > message? Yes, that's probably the best way for most cases. > Case 2: > This connect target is never executed. What did I do wrong? You're calling connect(SEL_COMMAND) in the Label's initialize() method, which means you're calling connect(SEL_COMMAND) on the label itself. If the label widget actually sent a SEL_COMMAND to its target, the code in this block would get executed, but because the label doesn't send out any messages, this is basically inoperative code. > I'm certain I must have misunderstood something here. I'd be happy if you > can explain or point me to a doc or faq. If you check the FOX web site: http://www.fox-toolkit.org/ you'll find some documentation on how targets and messages work. (The FOX web site seems to be down at the moment, but perhaps it will be back online by the time you read this.) There is also a good discussion of these topics in the FXRuby book from the Pragmatic Programmers: http://www.pragprog.com/titles/fxruby/fxruby Hope this helps, Lyle From gatolinux at gmail.com Tue Feb 17 10:57:06 2009 From: gatolinux at gmail.com (GatoLinux) Date: Tue, 17 Feb 2009 09:57:06 -0600 Subject: [fxruby-users] install.rb:655:in `command': system("make") failed (RuntimeError) (GatoLinux) Message-ID: I am using ruby *1.8.4* (2005-12-24). I added this code: #define RARRAY_LEN(a) \ ((RBASIC(a)->flags & RARRAY_EMBED_FLAG) ? \ (long)((RBASIC(a)->flags >> RARRAY_EMBED_LEN_SHIFT) & \ (RARRAY_EMBED_LEN_MASK >> RARRAY_EMBED_LEN_SHIFT)) : \ RARRAY(a)->as.heap.len) #define RARRAY_PTR(a) \ ((RBASIC(a)->flags & RARRAY_EMBED_FLAG) ? \ RARRAY(a)->as.ary : \ RARRAY(a)->as.heap.ptr) #define RREGEXP_SRC_LEN(r) RSTRING_LEN(RREGEXP(r)->src) to my current "*ruby.h*" I try to compile and it failed again giving me a runtime error of other file. I took this code from the file ruby.h in Ruby's release: ruby-1.9.1-p0 I substitute my ruby.h (version 1.8.4) using ruby.h (version ruby-1.9.1-p0) but it failed to compile, too. As I am newbie in this matter, I am thinking in to update my Ruby version. Maybe it can fix my issue. What do you think/suggest? Regards, -- GatoLinux In file included from librb.c:355: /usr/lib/ruby/1.8/i486-linux/ruby.h:476: error: syntax error before "struct" make: *** [librb.o] Error 1 install.rb:655:in `command': system("make") failed (RuntimeError) from install.rb:664:in `make' from install.rb:1258:in `setup_dir_ext' from install.rb:1532:in `traverse' from install.rb:1549:in `dive_into' from install.rb:1530:in `traverse' from install.rb:1534:in `traverse' from install.rb:1533:in `traverse' from install.rb:1549:in `dive_into' from install.rb:1530:in `traverse' from install.rb:1524:in `exec_task_traverse' from install.rb:1519:in `exec_task_traverse' from install.rb:1246:in `exec_setup' from install.rb:996:in `exec_setup' from install.rb:826:in `invoke' from install.rb:773:in `invoke' from install.rb:1578 > ------------------------------ > > Message: 3 > Date: Fri, 13 Feb 2009 12:53:19 -0600 > From: GatoLinux > Subject: [fxruby-users] install.rb:655:in `command': system("make") > failed (RuntimeError) > To: fxruby-users at rubyforge.org > Message-ID: > > Content-Type: text/plain; charset="iso-8859-1" > > Hello! > > > I used this command: > > > ruby install.rb config -- \ --with-fox-include=/opt/fox-1.6.35/include/ > --with-fox-lib=/opt/fox-1.6.35/lib/ > > to configure FXRuby; then, I ran: > > ruby install.rb setup followed by ruby install.rb install > > but I got this installation error: > > > In file included from include/FXRuby.h:825, > from include/FXRbCommon.h:93, > from ui_wrap.cpp:584: > include/inlinestubs.h: In function `void FXApp_init(FX::FXApp*, VALUE, > bool)': > include/inlinestubs.h:20: error: `RARRAY_LEN' was not declared in this > scope > ui_wrap.cpp: In function `void > FXFileSelector_setPatternList(FX::FXFileSelector*, VALUE)': > ui_wrap.cpp:1016: error: `RARRAY_LEN' was not declared in this scope > ui_wrap.cpp: In function `VALUE _wrap_FXComboBox_fillItems(int, VALUE*, > VALUE)': > ui_wrap.cpp:4979: error: `RARRAY_LEN' was not declared in this scope > ui_wrap.cpp: In function `VALUE _wrap_FXListBox_fillItems(int, VALUE*, > VALUE)': > ui_wrap.cpp:5444: error: `RARRAY_LEN' was not declared in this scope > ui_wrap.cpp: In function `VALUE _wrap_FXTreeListBox_fillItems(int, VALUE*, > VALUE)': > ui_wrap.cpp:5903: error: `RARRAY_LEN' was not declared in this scope > make: *** [ui_wrap.o] Error 1 > install.rb:655:in `command': system("make") failed (RuntimeError) > from install.rb:664:in `make' > from install.rb:1258:in `setup_dir_ext' > from install.rb:1532:in `traverse' > from install.rb:1549:in `dive_into' > from install.rb:1530:in `traverse' > from install.rb:1534:in `traverse' > from install.rb:1533:in `traverse' > from install.rb:1549:in `dive_into' > from install.rb:1530:in `traverse' > from install.rb:1524:in `exec_task_traverse' > from install.rb:1519:in `exec_task_traverse' > from install.rb:1246:in `exec_setup' > from install.rb:996:in `exec_setup' > from install.rb:826:in `invoke' > from install.rb:773:in `invoke' > from install.rb:1578 > > So, I was unable to install FXRuby (version 1.6.13) from its sources. > > Can you give me any clue to fix this issue? > > I am running Slackware 11.0 with fox-1.6.35 > > > Regards, > > > > GatoLinux > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: < > http://rubyforge.org/pipermail/fxruby-users/attachments/20090213/a0f640db/attachment-0001.html > > > > ------------------------------ > > Message: 4 > Date: Fri, 13 Feb 2009 17:48:22 -0600 > From: Lyle Johnson > Subject: Re: [fxruby-users] install.rb:655:in `command': > system("make") failed (RuntimeError) > To: "fxruby-users at rubyforge.org" > Message-ID: <397F82D6-D454-4CC3-A4EA-C3AB2341DBFC at lylejohnson.name> > Content-Type: text/plain; charset=us-ascii; format=flowed; > delsp=yes > > What version of Ruby are you building against? I thought the > RARRAY_LEN macro had been available for awhile now. > > On Feb 13, 2009, at 12:53 PM, GatoLinux wrote: > > > Hello! > > > > > > I used this command: > > > > > > ruby install.rb config -- \ --with-fox-include=/opt/fox-1.6.35/ > > include/ --with-fox-lib=/opt/fox-1.6.35/lib/ > > > > to configure FXRuby; then, I ran: > > > > ruby install.rb setup followed by ruby install.rb install > > > > but I got this installation error: > > > > > > In file included from include/FXRuby.h:825, > > from include/FXRbCommon.h:93, > > from ui_wrap.cpp:584: > > include/inlinestubs.h: In function `void FXApp_init(FX::FXApp*, > > VALUE, bool)': > > include/inlinestubs.h:20: error: `RARRAY_LEN' was not declared in > > this scope > > ui_wrap.cpp: In function `void > > FXFileSelector_setPatternList(FX::FXFileSelector*, VALUE)': > > ui_wrap.cpp:1016: error: `RARRAY_LEN' was not declared in this scope > > ui_wrap.cpp: In function `VALUE _wrap_FXComboBox_fillItems(int, > > VALUE*, VALUE)': > > ui_wrap.cpp:4979: error: `RARRAY_LEN' was not declared in this scope > > ui_wrap.cpp: In function `VALUE _wrap_FXListBox_fillItems(int, > > VALUE*, VALUE)': > > ui_wrap.cpp:5444: error: `RARRAY_LEN' was not declared in this scope > > ui_wrap.cpp: In function `VALUE _wrap_FXTreeListBox_fillItems(int, > > VALUE*, VALUE)': > > ui_wrap.cpp:5903: error: `RARRAY_LEN' was not declared in this scope > > make: *** [ui_wrap.o] Error 1 > > install.rb:655:in `command': system("make") failed (RuntimeError) > > from install.rb:664:in `make' > > from install.rb:1258:in `setup_dir_ext' > > from install.rb:1532:in `traverse' > > from install.rb:1549:in `dive_into' > > from install.rb:1530:in `traverse' > > from install.rb:1534:in `traverse' > > from install.rb:1533:in `traverse' > > from install.rb:1549:in `dive_into' > > from install.rb:1530:in `traverse' > > from install.rb:1524:in `exec_task_traverse' > > from install.rb:1519:in `exec_task_traverse' > > from install.rb:1246:in `exec_setup' > > from install.rb:996:in `exec_setup' > > from install.rb:826:in `invoke' > > from install.rb:773:in `invoke' > > from install.rb:1578 > > > > So, I was unable to install FXRuby (version 1.6.13) from its sources. > > > > Can you give me any clue to fix this issue? > > > > I am running Slackware 11.0 with fox-1.6.35 > > > > > > Regards, > > > > > > > > GatoLinux > > _______________________________________________ > > fxruby-users mailing list > > fxruby-users at rubyforge.org > > http://rubyforge.org/mailman/listinfo/fxruby-users > > > ------------------------------ > > Message: 5 > Date: Fri, 13 Feb 2009 21:43:20 -0800 > From: David MacMahon > Subject: Re: [fxruby-users] install.rb:655:in `command': > system("make") failed (RuntimeError) > To: fxruby-users at rubyforge.org > Message-ID: > Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed > > Hi, Lyle, > > FWIW, I also ran into this problem when building fxruby against Ruby > 1.8.5 (on SuSE 10.1, I think). I think I just hacked definitions of > these macros into 1.8.5's ruby.h file... > > RARRAY_LEN > RARRAY_PTR > RSTRING_LEN > RSTRING_PTR > > I took the definitions from a 1.8.6 ruby.h file. > > IMHO, it wouldn't be a bad thing to put them in an fxruby include > file with #ifndef guards around them. > > Dave > > On Feb 13, 2009, at 15:48 , Lyle Johnson wrote: > > > What version of Ruby are you building against? I thought the > > RARRAY_LEN macro had been available for awhile now. > > > > On Feb 13, 2009, at 12:53 PM, GatoLinux wrote: > > > >> Hello! > >> > >> > >> I used this command: > >> > >> > >> ruby install.rb config -- \ --with-fox-include=/opt/fox-1.6.35/ > >> include/ --with-fox-lib=/opt/fox-1.6.35/lib/ > >> > >> to configure FXRuby; then, I ran: > >> > >> ruby install.rb setup followed by ruby install.rb install > >> > >> but I got this installation error: > >> > >> > >> In file included from include/FXRuby.h:825, > >> from include/FXRbCommon.h:93, > >> from ui_wrap.cpp:584: > >> include/inlinestubs.h: In function `void FXApp_init(FX::FXApp*, > >> VALUE, bool)': > >> include/inlinestubs.h:20: error: `RARRAY_LEN' was not declared in > >> this scope > >> ui_wrap.cpp: In function `void FXFileSelector_setPatternList > >> (FX::FXFileSelector*, VALUE)': > >> ui_wrap.cpp:1016: error: `RARRAY_LEN' was not declared in this scope > >> ui_wrap.cpp: In function `VALUE _wrap_FXComboBox_fillItems(int, > >> VALUE*, VALUE)': > >> ui_wrap.cpp:4979: error: `RARRAY_LEN' was not declared in this scope > >> ui_wrap.cpp: In function `VALUE _wrap_FXListBox_fillItems(int, > >> VALUE*, VALUE)': > >> ui_wrap.cpp:5444: error: `RARRAY_LEN' was not declared in this scope > >> ui_wrap.cpp: In function `VALUE _wrap_FXTreeListBox_fillItems(int, > >> VALUE*, VALUE)': > >> ui_wrap.cpp:5903: error: `RARRAY_LEN' was not declared in this scope > >> make: *** [ui_wrap.o] Error 1 > >> install.rb:655:in `command': system("make") failed (RuntimeError) > >> from install.rb:664:in `make' > >> from install.rb:1258:in `setup_dir_ext' > >> from install.rb:1532:in `traverse' > >> from install.rb:1549:in `dive_into' > >> from install.rb:1530:in `traverse' > >> from install.rb:1534:in `traverse' > >> from install.rb:1533:in `traverse' > >> from install.rb:1549:in `dive_into' > >> from install.rb:1530:in `traverse' > >> from install.rb:1524:in `exec_task_traverse' > >> from install.rb:1519:in `exec_task_traverse' > >> from install.rb:1246:in `exec_setup' > >> from install.rb:996:in `exec_setup' > >> from install.rb:826:in `invoke' > >> from install.rb:773:in `invoke' > >> from install.rb:1578 > >> > >> So, I was unable to install FXRuby (version 1.6.13) from its sources. > >> > >> Can you give me any clue to fix this issue? > >> > >> I am running Slackware 11.0 with fox-1.6.35 > >> > >> > >> Regards, > >> > >> > >> > >> GatoLinux > >> _______________________________________________ > >> fxruby-users mailing list > >> fxruby-users at rubyforge.org > >> http://rubyforge.org/mailman/listinfo/fxruby-users > > _______________________________________________ > > fxruby-users mailing list > > fxruby-users at rubyforge.org > > http://rubyforge.org/mailman/listinfo/fxruby-users > > > > ------------------------------ > > Message: 6 > Date: Sat, 14 Feb 2009 10:33:50 -0600 > From: Lyle Johnson > Subject: Re: [fxruby-users] install.rb:655:in `command': > system("make") failed (RuntimeError) > To: "fxruby-users at rubyforge.org" > Message-ID: <7E577695-D3B6-41C8-BCD5-6DC50228220B at lylejohnson.name> > Content-Type: text/plain; charset=us-ascii; format=flowed; > delsp=yes > > Dave, > > Thanks. I'll look at adding those #defines in the next release. Ruby > 1.8.6 has been available for so long now that I didn't consider I > might be breaking back-compatibility! > > Sent from my iPhone > > On Feb 13, 2009, at 11:43 PM, David MacMahon > wrote: > > > Hi, Lyle, > > > > FWIW, I also ran into this problem when building fxruby against Ruby > > 1.8.5 (on SuSE 10.1, I think). I think I just hacked definitions of > > these macros into 1.8.5's ruby.h file... > > > > RARRAY_LEN > > RARRAY_PTR > > RSTRING_LEN > > RSTRING_PTR > > > > I took the definitions from a 1.8.6 ruby.h file. > > > > IMHO, it wouldn't be a bad thing to put them in an fxruby include > > file with #ifndef guards around them. > > > > Dave > > > > On Feb 13, 2009, at 15:48 , Lyle Johnson wrote: > > > >> What version of Ruby are you building against? I thought the > >> RARRAY_LEN macro had been available for awhile now. > >> > >> On Feb 13, 2009, at 12:53 PM, GatoLinux wrote: > >> > >>> Hello! > >>> > >>> > >>> I used this command: > >>> > >>> > >>> ruby install.rb config -- \ --with-fox-include=/opt/fox-1.6.35/ > >>> include/ --with-fox-lib=/opt/fox-1.6.35/lib/ > >>> > >>> to configure FXRuby; then, I ran: > >>> > >>> ruby install.rb setup followed by ruby install.rb install > >>> > >>> but I got this installation error: > >>> > >>> > >>> In file included from include/FXRuby.h:825, > >>> from include/FXRbCommon.h:93, > >>> from ui_wrap.cpp:584: > >>> include/inlinestubs.h: In function `void FXApp_init(FX::FXApp*, > >>> VALUE, bool)': > >>> include/inlinestubs.h:20: error: `RARRAY_LEN' was not declared in > >>> this scope > >>> ui_wrap.cpp: In function `void > >>> FXFileSelector_setPatternList(FX::FXFileSelector*, VALUE)': > >>> ui_wrap.cpp:1016: error: `RARRAY_LEN' was not declared in this scope > >>> ui_wrap.cpp: In function `VALUE _wrap_FXComboBox_fillItems(int, > >>> VALUE*, VALUE)': > >>> ui_wrap.cpp:4979: error: `RARRAY_LEN' was not declared in this scope > >>> ui_wrap.cpp: In function `VALUE _wrap_FXListBox_fillItems(int, > >>> VALUE*, VALUE)': > >>> ui_wrap.cpp:5444: error: `RARRAY_LEN' was not declared in this scope > >>> ui_wrap.cpp: In function `VALUE _wrap_FXTreeListBox_fillItems(int, > >>> VALUE*, VALUE)': > >>> ui_wrap.cpp:5903: error: `RARRAY_LEN' was not declared in this scope > >>> make: *** [ui_wrap.o] Error 1 > >>> install.rb:655:in `command': system("make") failed (RuntimeError) > >>> from install.rb:664:in `make' > >>> from install.rb:1258:in `setup_dir_ext' > >>> from install.rb:1532:in `traverse' > >>> from install.rb:1549:in `dive_into' > >>> from install.rb:1530:in `traverse' > >>> from install.rb:1534:in `traverse' > >>> from install.rb:1533:in `traverse' > >>> from install.rb:1549:in `dive_into' > >>> from install.rb:1530:in `traverse' > >>> from install.rb:1524:in `exec_task_traverse' > >>> from install.rb:1519:in `exec_task_traverse' > >>> from install.rb:1246:in `exec_setup' > >>> from install.rb:996:in `exec_setup' > >>> from install.rb:826:in `invoke' > >>> from install.rb:773:in `invoke' > >>> from install.rb:1578 > >>> > >>> So, I was unable to install FXRuby (version 1.6.13) from its > >>> sources. > >>> > >>> Can you give me any clue to fix this issue? > >>> > >>> I am running Slackware 11.0 with fox-1.6.35 > >>> > >>> > >>> Regards, > >>> > >>> > >>> > >>> GatoLinux > >>> _______________________________________________ > >>> fxruby-users mailing list > >>> fxruby-users at rubyforge.org > >>> http://rubyforge.org/mailman/listinfo/fxruby-users > >> _______________________________________________ > >> fxruby-users mailing list > >> fxruby-users at rubyforge.org > >> http://rubyforge.org/mailman/listinfo/fxruby-users > > > > _______________________________________________ > > fxruby-users mailing list > > fxruby-users at rubyforge.org > > http://rubyforge.org/mailman/listinfo/fxruby-users > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From lyle at lylejohnson.name Tue Feb 17 12:05:41 2009 From: lyle at lylejohnson.name (Lyle Johnson) Date: Tue, 17 Feb 2009 11:05:41 -0600 Subject: [fxruby-users] install.rb:655:in `command': system("make") failed (RuntimeError) (GatoLinux) In-Reply-To: References: Message-ID: <57cf8f720902170905y75fe83c2u7a5c8bc5d207091f@mail.gmail.com> On Tue, Feb 17, 2009 at 9:57 AM, GatoLinux wrote: > I am using ruby 1.8.4 (2005-12-24). Yikes. That's pretty old. > As I am newbie in this matter, I am thinking in to update my Ruby version. > Maybe it can fix my issue. > > What do you think/suggest? Yes, I'd recommend updating to Ruby 1.8.6 (if possible), which is the current production version of Ruby. I do need to make a fix here for people who are using older versions of Ruby, but I'm not really supporting FXRuby on versions of Ruby prior to Ruby 1.8.6 at this point. (I have to draw the line somewhere!) Hope this helps, Lyle From andreas_s at hotmail.com Tue Feb 17 14:15:46 2009 From: andreas_s at hotmail.com (Andreas S) Date: Tue, 17 Feb 2009 19:15:46 +0000 Subject: [fxruby-users] fox/fxruby message and handler In-Reply-To: <57cf8f720902170719v5ed2c1cav9f348c42dcbfa82b@mail.gmail.com> References: <57cf8f720902170719v5ed2c1cav9f348c42dcbfa82b@mail.gmail.com> Message-ID: > Date: Tue, 17 Feb 2009 09:19:41 -0600 > From: lyle at lylejohnson.name > > > Case 2: > > This connect target is never executed. What did I do wrong? > > You're calling connect(SEL_COMMAND) in the Label's initialize() > method, which means you're calling connect(SEL_COMMAND) on the label > itself. If the label widget actually sent a SEL_COMMAND to its target, > the code in this block would get executed, but because the label > doesn't send out any messages, this is basically inoperative code. > I have a line in my test where I call my label's handle method: label = Label.new frame, "Label" button = FXButton.new frame, "Button" button.connect SEL_COMMAND do label.handle button, FXSEL(SEL_COMMAND, Label::ID_FUNNY, "joke") end Shouldn't this do the trick? I've used this approach in my code before. For example, in my table, I made Ctrl-A to select all cells and I did it by sending message to table's corner button, simulating a click (the snippet is at the end of this email, in case you'd like to know). I believe this is the answer you gave in an old thread I found when googling about simulating button click. I tried to replace that Label with FXButton which will print something when it is clicked. It does print it when I click it, but simulating a click still doesn't do it. Thanks, Lyle. I appreciate you help. -andre class MyTable < FXTable def initialize *args super connect SEL_KEYPRESS do |sender, selector, event| if event.state & CONTROLMASK != 0 case event.code when KEY_a cornerButton.handle self, FXSEL(SEL_LEFTBUTTONPRESS, 0), event cornerButton.handle self, FXSEL(SEL_LEFTBUTTONRELEASE, 0), event end end end end ... end _________________________________________________________________ Get more out of the Web. Learn 10 hidden secrets of Windows Live. http://windowslive.com/connect/post/jamiethomson.spaces.live.com-Blog-cns!550F681DAD532637!5295.entry?ocid=TXT_TAGLM_WL_domore_092008 -------------- next part -------------- An HTML attachment was scrubbed... URL: From davidm at astro.berkeley.edu Tue Feb 17 14:25:19 2009 From: davidm at astro.berkeley.edu (David MacMahon) Date: Tue, 17 Feb 2009 11:25:19 -0800 Subject: [fxruby-users] install.rb:655:in `command': system("make") failed (RuntimeError) (GatoLinux) In-Reply-To: References: Message-ID: <02B4A820-57FF-40DC-8238-288D709DEDD1@astro.berkeley.edu> On Feb 17, 2009, at 7:57 , GatoLinux wrote: > I am using ruby 1.8.4 (2005-12-24). > > I took this code from the file ruby.h in Ruby's release: ruby-1.9.1-p0 It seems likely that the underlying structures/macros are not compatible between 1.8.4 and 1.9.1. Here's what I added to my ruby.h file to get fxruby building with Ruby 1.8.5... #ifndef RARRAY_LEN #define RARRAY_LEN(a) (RARRAY(a)->len) #endif #ifndef RARRAY_PTR #define RARRAY_PTR(a) (RARRAY(a)->ptr) #endif #ifndef RSTRING_LEN #define RSTRING_LEN(s) (RSTRING(s)->len) #endif #ifndef RSTRING_PTR #define RSTRING_PTR(s) (RSTRING(s)->ptr) #endif Hope this helps, Dave From lyle at lylejohnson.name Tue Feb 17 15:04:56 2009 From: lyle at lylejohnson.name (Lyle Johnson) Date: Tue, 17 Feb 2009 14:04:56 -0600 Subject: [fxruby-users] fox/fxruby message and handler In-Reply-To: References: <57cf8f720902170719v5ed2c1cav9f348c42dcbfa82b@mail.gmail.com> Message-ID: <57cf8f720902171204q732130a0ma2a6d8dccf717999@mail.gmail.com> On Tue, Feb 17, 2009 at 1:15 PM, Andreas S wrote: > I have a line in my test where I call my label's handle method: > > label = Label.new frame, "Label" > button = FXButton.new frame, "Button" > button.connect SEL_COMMAND do > label.handle button, FXSEL(SEL_COMMAND, Label::ID_FUNNY, "joke") > end > > Shouldn't this do the trick? No. Generally speaking, the FXLabel widget doesn't respond to SEL_COMMAND. > I've used this approach in my code before. For example, > in my table, I made Ctrl-A to select all cells and I did it by sending > message to table's corner button, simulating a click (the snippet is at the end of this email, > in case you'd like to know). I believe this is the answer you gave in an old thread I > found when googling about simulating button click. Right. The FXButton widget *does* respond to SEL_LEFTBUTTONPRESS and SEL_LEFTBUTTONRELEASE messages. But it's a different widget than the FXLabel widget. Different behavior. > I tried to replace that Label with FXButton which will print something when > it is clicked. It does print it when I click it, but simulating a click still doesn't do > it. Could we back up a step or two? What is it that you're actually trying to accomplish? Are you trying to change the label's text whenever a button is pressed, or what? From andreas_s at hotmail.com Tue Feb 17 19:25:05 2009 From: andreas_s at hotmail.com (Andreas S) Date: Wed, 18 Feb 2009 00:25:05 +0000 Subject: [fxruby-users] fox/fxruby message and handler In-Reply-To: <57cf8f720902171204q732130a0ma2a6d8dccf717999@mail.gmail.com> References: <57cf8f720902170719v5ed2c1cav9f348c42dcbfa82b@mail.gmail.com> <57cf8f720902171204q732130a0ma2a6d8dccf717999@mail.gmail.com> Message-ID: Hi Lyle, I'm grateful for your patience. > Date: Tue, 17 Feb 2009 14:04:56 -0600 > From: lyle at lylejohnson.name > > No. Generally speaking, the FXLabel widget doesn't respond to SEL_COMMAND. > > > I've used this approach in my code before... > > Right. The FXButton widget *does* respond to SEL_LEFTBUTTONPRESS and > SEL_LEFTBUTTONRELEASE messages. But it's a different widget than the > FXLabel widget. Different behavior. > Oh, I overlooked the selector TYPE. I was looking for how to add selector ID and I found it, but I've forgotten about selector TYPE. Please forgive my stupidity. > > I tried to replace that Label with FXButton which will print something when > > it is clicked. It does print it when I click it, but simulating a click still doesn't do > > it. > After some tinkering, I found how to simulate that b1 click to trigger that 'puts "button1"' b1 = FXButton.new(self, "Button1") b1.connect(SEL_COMMAND) { puts "button1" } # This never triggers b1 SEL_COMMAND FXButton.new(self, "Button2").connect(SEL_COMMAND) { b1.handle self, FXSEL(SEL_COMMAND,0), nil } # This does FXButton.new(self, "Button2").connect(SEL_COMMAND) do b1.handle self, FXSEL(SEL_LEFTBUTTONPRESS,0), nil b1.handle self, FXSEL(SEL_LEFTBUTTONRELEASE,0), nil end > Could we back up a step or two? What is it that you're actually trying > to accomplish? Are you trying to change the label's text whenever a > button is pressed, or what? In part, I'm exploring what I can or can't do. This particular issue caught my interest because it looks like I have incorrect understanding and I wish to be corrected. The other part is my users asked me to improve my tool by allowing them to define bind keys. This got me looking at FXAccel. The following sample is from FXAccel#addAccel rdoc: hotKey = fxparseAccel("Ctrl+S") accelTable.addAccel(hotKey, doc, FXSEL(SEL_COMMAND, MyDocument::ID_SAVE)) Seems like I can only associate a hot key with a message, not a block. That's why I'm looking into adding message selectors and handlers and my curiosity, for why my message handler doesn't work, won't leave my mind at peace. (I haven't been successful using FXAccelTable, but that's a different issue) My understanding was, given a list of selector types and ids, supported by a widget, widget#handle for FXSEL(TYPE,ID) will cause the widget to send FXSEL(TYPE,ID) to its target. But from what I gathered, one cannot be certain about that, as my button example shows. I might not be able to rely on FXAccelTable to define bind keys, since #addAccel can only associate one hot key to one message type-id. -andre _________________________________________________________________ Stay up to date on your PC, the Web, and your mobile phone with Windows Live. http://clk.atdmt.com/MRT/go/msnnkwxp1020093185mrt/direct/01/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From lyle at lylejohnson.name Fri Feb 20 15:13:51 2009 From: lyle at lylejohnson.name (Lyle Johnson) Date: Fri, 20 Feb 2009 14:13:51 -0600 Subject: [fxruby-users] fox/fxruby message and handler In-Reply-To: References: <57cf8f720902170719v5ed2c1cav9f348c42dcbfa82b@mail.gmail.com> <57cf8f720902171204q732130a0ma2a6d8dccf717999@mail.gmail.com> Message-ID: <2469796D-D7C5-497B-8281-627C2FB2C0A7@lylejohnson.name> On Feb 17, 2009, at 6:25 PM, Andreas S wrote: > The other part is my users asked me to improve my tool by allowing > them to define bind keys. > This got me looking at FXAccel. The following sample is from > FXAccel#addAccel rdoc: > hotKey = fxparseAccel("Ctrl+S") > accelTable.addAccel(hotKey, doc, FXSEL(SEL_COMMAND, > MyDocument::ID_SAVE)) > Seems like I can only associate a hot key with a message, not a > block. That's why I'm looking > into adding message selectors and handlers and my curiosity, for why > my message handler doesn't > work, won't leave my mind at peace. (I haven't been successful using > FXAccelTable, but that's a > different issue) > > My understanding was, given a list of selector types and ids, > supported by a widget, widget#handle > for FXSEL(TYPE,ID) will cause the widget to send FXSEL(TYPE,ID) to > its target. But from what I > gathered, one cannot be certain about that, as my button example > shows. Your understanding is correct; the problem is that the FXButton widget doesn't respond to FXSEL(SEL_COMMAND, 0). This fact is unfortunately not documented anywhere (other than in the FOX source code itself). FXButton does, in contrast, respond to FXSEL(SEL_LEFTBUTTONPRESS, 0) and FXSEL(SEL_LEFTBUTTONRELEASE, 0). > I might not be able to rely on FXAccelTable to define bind keys, > since #addAccel can only associate > one hot key to one message type-id. I know that I ran into some problem trying to support FXAccel#addAccel with blocks. I think the problem was that FXAccelTable#addAccel expects two arguments at the end (one for the "down" keypress and one for the "up" keypress), but we can only pass one block, and so I wasn't sure how to handle the association. It occurs to me that I *might* be able to offer a different-looking API, something like: addAccelUp(hotKey, target) do |sender, sel, ptr| ... end addAccelDown(hotKey) do |sender, sel, ptr| ... end or something like that... Hope this helps, Lyle -------------- next part -------------- An HTML attachment was scrubbed... URL: From djlewis at triadic.com Sat Feb 21 08:24:00 2009 From: djlewis at triadic.com (djlewis) Date: Sat, 21 Feb 2009 05:24:00 -0800 (PST) Subject: [fxruby-users] FXRuby & erb -- problems together? Message-ID: <22135995.post@talk.nabble.com> I'm having vexing problems with some erb templates I use to generate html. The templates used to work just great in a gui-less program. But when I embedded the template generation code inside a FXRuby interface, it started giving random mysterious, intermittent errors during actual generation, the outf.write statement... template = ERB.new( IO.read( proto_company_index)) out_file = out_folder + @company + " indx.html" outf = File.new( out_file, "w") outf.write( template.result(binding)) I disabled the FXRuby interface entirely and drove it programmatically through exactly the same code, and it goes back to working fine. So, it's only circumstantial evidence, but it looks like erb and FXRuby are not getting along, generating random errors in erb. Anybody else run into this? Here are three (different) errors from three different runs of exactly the same code with FXruby going. So you see how random it is. (And these errors do not arise when FXRuby is out of the picture.) > Uncaught exception: compile error > (erb):19: syntax error, unexpected tSTRING_BEG, expecting $end > Uncaught exception: compile error > (erb):18: syntax error, unexpected tIDENTIFIER, expecting $end > Uncaught exception: compile error > (erb):18: Invalid char `\250' in expression > (erb):19: syntax error, unexpected tCONSTANT, expecting $end I'd show you the erb template, but trust me, there's nothing near those lines that could cause this. -- View this message in context: http://www.nabble.com/FXRuby---erb----problems-together--tp22135995p22135995.html Sent from the FXRuby Users mailing list archive at Nabble.com. From djlewis at triadic.com Sat Feb 21 13:45:16 2009 From: djlewis at triadic.com (djlewis) Date: Sat, 21 Feb 2009 10:45:16 -0800 (PST) Subject: [fxruby-users] FXRuby & erb -- problems together? In-Reply-To: <22135995.post@talk.nabble.com> References: <22135995.post@talk.nabble.com> Message-ID: <22138786.post@talk.nabble.com> I switched to Erubis (in place of erb -- need to change only the class name and it works just fine. So it looks like erb and FXRuby are indeed incompatible. --David. I'm having vexing problems with some erb templates I use to generate html. The templates used to work just great in a gui-less program. But when I embedded the template generation code inside a FXRuby interface, it started giving random mysterious, intermittent errors during actual generation... -- View this message in context: http://www.nabble.com/FXRuby---erb----problems-together--tp22135995p22138786.html Sent from the FXRuby Users mailing list archive at Nabble.com.