From osmith at gmail.com Tue Feb 1 21:56:42 2005 From: osmith at gmail.com (Oliver Smith) Date: Tue Feb 1 21:53:39 2005 Subject: [fxruby-users] possible FXImage issues Message-ID: Hi, I'm trying to update a program from FXRuby 1.0 to FXRuby 1.2 and I'm running into problems with FXImage. Here's what worked before: buffer = FXImage.new(getApp, "\0" * buffer_size, 0, buffer_width,buffer_height) buffer.create And now I get this: 'wrong argument type String (expected Array) (TypeError)' So I tried changing "\0" to [0] and then I get a segfault on buffer.create. The image.rb sample also gives me the TypeError message. This is on Win2k by the way. Any help is appreciated...I can't find much in the documentation or the 1.2 conversion guide. If image.rb is working for others, perhaps something got screwed up when I upgraded? Thanks for any help, Oliver From lyle at knology.net Wed Feb 2 05:48:05 2005 From: lyle at knology.net (Lyle Johnson) Date: Wed Feb 2 05:45:00 2005 Subject: [fxruby-users] Re: Problem with setCellColor ? In-Reply-To: <200502021547.25506.dragoncity@impulse.net.au> References: <200502021547.25506.dragoncity@impulse.net.au> Message-ID: <04c9dbfc41aa6476824e118ec6108905@knology.net> On Feb 2, 2005, at 5:47 PM, dragoncity wrote: > am having problems with FXRuby 1.2 setting a cells color, > In the following code snippet, the variables rcnt & FLDFilename > are progam controlled, the two lines before the "puts" execute OK, > neither of > the setCellColor versions execute , both fail with > > `setCellColor': table row out of bounds , > > which is not true - have tried various fixed value indexes ( non work) Please see the API documentation for FXTable, found here: http://www.fxruby.org/doc/api/classes/Fox/FXTable.html The valid values for the first two arguments to setCellColor() are zero and one. Lyle From lyle at knology.net Wed Feb 2 05:52:25 2005 From: lyle at knology.net (Lyle Johnson) Date: Wed Feb 2 05:49:19 2005 Subject: [fxruby-users] Re: missing TABLE function ? In-Reply-To: <200502021548.13529.dragoncity@impulse.net.au> References: <200502021548.13529.dragoncity@impulse.net.au> Message-ID: <37943e3ae678213e4d8b99aa66bc2240@knology.net> On Feb 2, 2005, at 5:48 PM, dragoncity wrote: > should there not be a appendRow function for TABLE ? > > eg: @table.appendRows (1) > > This would be 'more natural' than programmers having to count rows OR > coding > more complex insertRow calls like : > > eg: @table.insertRows( @table.numRows, 1) > > Also , I think, programmers think of insert as "between" two existing > rows, > not between the last row and "nowhere", I know I only came across > insertRow > ( append) facility more of less by chance :-) Good suggestion! I've added this to the list of FXRuby feature requests, here: http://rubyforge.org/tracker/index.php? func=detail&aid=1426&group_id=300&atid=1226 This should be an easy one to add for the next release. Thanks, Lyle From lyle at knology.net Fri Feb 4 08:24:08 2005 From: lyle at knology.net (Lyle Johnson) Date: Fri Feb 4 08:21:02 2005 Subject: [fxruby-users] possible FXImage issues In-Reply-To: References: Message-ID: <2f71014837ce67ae7e8c4f54958def10@knology.net> On Feb 1, 2005, at 8:56 PM, Oliver Smith wrote: > I'm trying to update a program from FXRuby 1.0 to FXRuby 1.2 and I'm > running into problems with FXImage. Here's what worked before: > > buffer = FXImage.new(getApp, "\0" * buffer_size, 0, > buffer_width,buffer_height) > > buffer.create > > And now I get this: > > 'wrong argument type String (expected Array) (TypeError)' > > So I tried changing "\0" to [0] and then I get a segfault on > buffer.create. The image.rb sample also gives me the TypeError > message. OK, I see the bug. This is being fixed for version 1.2.4. From Tlaloc at columbus.rr.com Sun Feb 6 12:00:12 2005 From: Tlaloc at columbus.rr.com (Jeff Koppe) Date: Sun Feb 6 11:43:35 2005 Subject: [fxruby-users] OpenGL docs (somewhat off topic)... Message-ID: <200502061200.12603.Tlaloc@columbus.rr.com> Hello all, Based on the OpenGL examples distributed with FXRuby, I'm building an application that will read in a 3d model, unfold it, and save the flattened development as an SVG document. However, I'm totally unfamiliar with OpenGL programming and am wondering if there is any documentation on using OpenGL in Ruby besides the example programs? Or, would I be better off reading the OpenGL 'Red Book' and then simply trying to guess at how the commands are implemented in Ruby? Any suggestions would be appreciated. Thanks, --jeff From lyle at knology.net Mon Feb 7 11:42:14 2005 From: lyle at knology.net (lyle@knology.net) Date: Mon Feb 7 11:39:00 2005 Subject: [fxruby-users] [OT] Trolltech to Extend Dual Licensing to Qt for Windows Message-ID: <20050207164214.18007.qmail@webmail2.knology.net> All, Thought this might be of interest to some of you. Here is a link to the press release: http://www.trolltech.com/newsroom/announcements/00000192.html I haven't read the fine print, but if the article is correct in stating that the additional license they've chosen is the GPL, this is still pretty restrictive as compared to FOX's (and others) LGPL licensing. If you're developing (proprietary) commercial software you must still purchase a commercial license from Trolltech. It's also not clear to me that they've actually opened up the source code for Qt for Windows; I'm assuming they haven't. Anyways. You can follow some of the characteristically enlightened discussion of this news in this Slashdot thread: http://it.slashdot.org/article.pl?sid=05/02/07/147223&tid=156&tid=201&tid=8 Enjoy, Lyle From hal9000 at hypermetrics.com Tue Feb 8 01:32:46 2005 From: hal9000 at hypermetrics.com (Hal Fulton) Date: Tue Feb 8 01:29:36 2005 Subject: [fxruby-users] Crash revisited Message-ID: <42085D0E.6040404@hypermetrics.com> I finally read (and tried to apply) all the stuff in the 1.0-to-1.2 document. Wow, Lyle! 50+ pages! Is that good for your health? ;) However, I'm still seeing a crash. Laurent was tracking down something similar -- Laurent, did you have any luck?? If anyone's interested, Tycho 0.0.7 works fine with 1.0; and Tycho 0.0.8 has the 1.2 changes and doesn't work. http://rubyforge.org/projects/tycho Thanks for any insight anyone can give... I suppose I could stick with 1.0, but it feels like investing in the past... Cheers, Hal From sander at knology.net Tue Feb 8 08:51:02 2005 From: sander at knology.net (Sander Jansen) Date: Tue Feb 8 08:48:35 2005 Subject: [fxruby-users] Crash revisited In-Reply-To: <42085D0E.6040404@hypermetrics.com> References: <42085D0E.6040404@hypermetrics.com> Message-ID: <200502080751.02672.sander@knology.net> On Tuesday 08 February 2005 12:32 am, Hal Fulton wrote: > I finally read (and tried to apply) all the stuff in the > 1.0-to-1.2 document. > > Wow, Lyle! 50+ pages! Is that good for your health? ;) I think it should.... what about 1.2 -> 1.4, Lyle? Are you up to it? I'll buy you lunch. Sander From lyle at knology.net Tue Feb 8 09:55:38 2005 From: lyle at knology.net (Lyle Johnson) Date: Tue Feb 8 09:52:17 2005 Subject: [fxruby-users] Crash revisited In-Reply-To: <200502080751.02672.sander@knology.net> References: <42085D0E.6040404@hypermetrics.com> <200502080751.02672.sander@knology.net> Message-ID: <9cdc8bfece323b15b59a3c747ccc2169@knology.net> On Feb 8, 2005, at 7:51 AM, Sander Jansen wrote: > I think it should.... what about 1.2 -> 1.4, Lyle? Are you up to it? > I'll buy > you lunch. Good grief. I love those advance warnings from him. I'm still trying to get FXRuby 1.2 wrapped up and haven't really been paying any attention to the 1.3 branch. Looks like I have a lot of reading to do. ;) From SCHNEIDA at seiu.org Fri Feb 11 09:23:54 2005 From: SCHNEIDA at seiu.org (Anders Schneiderman) Date: Fri Feb 11 09:19:43 2005 Subject: [fxruby-users] Help setting column size of FXText field Message-ID: How do I go about setting the size of an FXText field? I'm trying to create a screen that will look something like: Output Area Log Area ------- Command Line ----------- My code to create the output and log areas is: ================================= # Main output window and Log Window topFrame = FXHorizontalFrame.new(mainFrame, LAYOUT_SIDE_TOP|FRAME_NONE|LAYOUT_FILL_X|LAYOUT_FILL_Y) # Create main window w/ titled border mainBox = FXGroupBox.new(topFrame, "Main Window", GROUPBOX_TITLE_LEFT|FRAME_RIDGE|LAYOUT_FILL_X|LAYOUT_FILL_Y) @main = FXText.new(mainBox, nil, 0, TEXT_WORDWRAP|LAYOUT_FILL_X|LAYOUT_FILL_Y) logBox = FXGroupBox.new(topFrame, "Log/Help", GROUPBOX_TITLE_LEFT|FRAME_RIDGE|LAYOUT_FILL_X|LAYOUT_FILL_Y) @log = FXText.new(logBox, nil, 0, TEXT_WORDWRAP|LAYOUT_FILL_X|LAYOUT_FILL_Y) ================================= How do I set the size of main and log? Right now they evenly split the screen, whereas I want main to be about 75% of the screen. The closest I could find was a method called visCols - e.g., visCols = 60 - but when I tried it I got the following error: c:/ruby/lib/ruby/gems/1.8/gems/fxruby-1.2.2-mswin32/lib/fox12/aliases.rb:4369:in `visCols=': undefined method `setVisCols' for :Fox::FXText (NoMethodError) Thanks, Anders Schneiderman From bloritsch at d-haven.org Fri Feb 11 21:31:27 2005 From: bloritsch at d-haven.org (Berin Loritsch) Date: Fri Feb 11 21:28:06 2005 Subject: [fxruby-users] Attribute Binding Message-ID: <420D6A7F.6050900@d-haven.org> I am generally new to Ruby and more specifically FXRuby. I come from a Java background, but have been recently looking at SmallTalk and Ruby and I wanted to compare and contrast the languages. I have a library in Java that will allow me to bind a class attribute directly to a GUI control. It uses JavaBean technology and the PropertyChangeEvent signals that are sent every time the value changes. SmallTalk provides this support as part of the core language. My question is how do I do that with Ruby? For example, I have a BankAccount class (yes I know its a toy app, but it will help me understand what to do) with a "balance" attribute. The BankAccount class works wonderfully by itself. I have a method to deposit and a method to withdraw funds from this BankAccount class. I want to be able to set up a button like this: FXButton.new(window, "&Deposit").connect(SEL_COMMAND) { @account.deposit 200 } And as a result of that action have the FXTextField automatically update itself with the new balance. I don't see a lot of examples of this type of thing, and I am not even sure if it is possible (it must be). Has anyone had any luck with this? From vjoel at PATH.Berkeley.EDU Sat Feb 12 16:36:18 2005 From: vjoel at PATH.Berkeley.EDU (Joel VanderWerf) Date: Sat Feb 12 16:33:08 2005 Subject: [fxruby-users] Attribute Binding In-Reply-To: <420D6A7F.6050900@d-haven.org> References: <420D6A7F.6050900@d-haven.org> Message-ID: <420E76D2.2040707@path.berkeley.edu> Berin Loritsch wrote: > I am generally new to Ruby and more specifically FXRuby. I come from a > Java background, but have been recently looking at SmallTalk and Ruby > and I wanted to compare and contrast the languages. I have a library in > Java that will allow me to bind a class attribute directly to a GUI > control. It uses JavaBean technology and the PropertyChangeEvent > signals that are sent every time the value changes. SmallTalk provides > this support as part of the core language. My question is how do I do > that with Ruby? > > For example, I have a BankAccount class (yes I know its a toy app, but > it will help me understand what to do) with a "balance" attribute. The > BankAccount class works wonderfully by itself. I have a method to > deposit and a method to withdraw funds from this BankAccount class. I > want to be able to set up a button like this: > > FXButton.new(window, "&Deposit").connect(SEL_COMMAND) { @account.deposit > 200 } > > And as a result of that action have the FXTextField automatically update > itself with the new balance. I don't see a lot of examples of this type > of thing, and I am not even sure if it is possible (it must be). Has > anyone had any luck with this? Berin, There are two ways I know of doing this. Fox itself provides one way, FXDataTargets. There is an example in the FXRuby distribution. Another way is to use two libraries I have developed: FoxTails and Observable, available at http://raa.ruby-lang.org. Briefly, Observable lets you designate an attribute as "observable", in which case various parts of your app can register to be informed when the value changes. FoxTails uses this to wire up widgets like text fields, sliders, scroll bars, etc. (There are some other things in FoxTails, too.) Your example might look something like this: --------------------------------- require 'foxtails' include Fox include FoxTails class Account extend Observable observable :balance def deposit amt self.balance += amt # Don't use @balance, or observers not notified. end end class AccountWindow < FXMainWindow def initialize(*args) super @account = Account.new @account.balance = 0 FXButton.new(self, "&Deposit").connect(SEL_COMMAND) { @account.deposit 200 } int_field = FTIntegerField.new(self, 10, @account, :balance, FRAME_SUNKEN) end def create super show end end class AccountApp < FTApp def initialize super("Account", "TEST") FoxTails.get_standard_icons AccountWindow.new(self, "Account") end end AccountApp.new.run --------------------------------- You can also register for notification from non-gui code, using "when_" clauses: some_account.when_balance CHANGES do |new_bal, old_bal| ... end The CHANGES thingy is just something that matches the new value, using ruby's === matching. CHANGES is actually the class Object, which matches everything. (Because === is =~ for strings, you can use regexes to match strings. Also, you can extend it as you wish by defining === in your classes.) This is documented in the observable project. FoxTails is currently for Fox 1.0, but I have a "shim" file you can include to get most of it to work with 1.2. I apologize in advance for the state of the documentation, but at least there are examples, and the FT*Field classes have almost the same api as the FX*Field classes. Btw, the current version of FoxTails has a nice way of generating text fields, check/radio buttons, option menus, and static text using a syntax much like good ol' printf. The fields are automatically wired up to the observable attrs that you specify. See examples/fields.rb. From bloritsch at d-haven.org Sat Feb 12 16:48:18 2005 From: bloritsch at d-haven.org (Berin Loritsch) Date: Sat Feb 12 16:44:54 2005 Subject: [fxruby-users] Attribute Binding In-Reply-To: <420E76D2.2040707@path.berkeley.edu> References: <420D6A7F.6050900@d-haven.org> <420E76D2.2040707@path.berkeley.edu> Message-ID: <420E79A2.6010704@d-haven.org> Joel VanderWerf wrote: > Berin Loritsch wrote: > >> I am generally new to Ruby and more specifically FXRuby. I come from >> a Java background, but have been recently looking at SmallTalk and >> Ruby and I wanted to compare and contrast the languages. I have a >> library in Java that will allow me to bind a class attribute directly >> to a GUI control. It uses JavaBean technology and the >> PropertyChangeEvent signals that are sent every time the value >> changes. SmallTalk provides this support as part of the core >> language. My question is how do I do that with Ruby? >> >> For example, I have a BankAccount class (yes I know its a toy app, >> but it will help me understand what to do) with a "balance" >> attribute. The BankAccount class works wonderfully by itself. I >> have a method to deposit and a method to withdraw funds from this >> BankAccount class. I want to be able to set up a button like this: >> >> FXButton.new(window, "&Deposit").connect(SEL_COMMAND) { >> @account.deposit 200 } >> >> And as a result of that action have the FXTextField automatically >> update itself with the new balance. I don't see a lot of examples of >> this type of thing, and I am not even sure if it is possible (it must >> be). Has anyone had any luck with this? > > > Berin, > > There are two ways I know of doing this. Fox itself provides one way, > FXDataTargets. There is an example in the FXRuby distribution. > > Another way is to use two libraries I have developed: FoxTails and > Observable, available at http://raa.ruby-lang.org. Briefly, Observable > lets you designate an attribute as "observable", in which case various > parts of your app can register to be informed when the value changes. > FoxTails uses this to wire up widgets like text fields, sliders, > scroll bars, etc. (There are some other things in FoxTails, too.) Thank you. Are FoxTails and Observable gems? Or do I have to download and install them separately? > > Your example might look something like this: > > --------------------------------- > require 'foxtails' > > include Fox > include FoxTails > > class Account > extend Observable > > observable :balance > def deposit amt > self.balance += amt > # Don't use @balance, or observers not notified. > end > end > > class AccountWindow < FXMainWindow > def initialize(*args) > super > > @account = Account.new > @account.balance = 0 > > FXButton.new(self, "&Deposit").connect(SEL_COMMAND) { > @account.deposit 200 > } > > int_field = FTIntegerField.new(self, 10, @account, :balance, > FRAME_SUNKEN) > end > > def create > super > show > end > end > > class AccountApp < FTApp > def initialize > super("Account", "TEST") > FoxTails.get_standard_icons > AccountWindow.new(self, "Account") > end > end > > AccountApp.new.run > --------------------------------- > > You can also register for notification from non-gui code, using > "when_" clauses: > > some_account.when_balance CHANGES do |new_bal, old_bal| > ... > end > > The CHANGES thingy is just something that matches the new value, using > ruby's === matching. CHANGES is actually the class Object, which > matches everything. (Because === is =~ for strings, you can use > regexes to match strings. Also, you can extend it as you wish by > defining === in your classes.) This is documented in the observable > project. > > FoxTails is currently for Fox 1.0, but I have a "shim" file you can > include to get most of it to work with 1.2. I apologize in advance for > the state of the documentation, but at least there are examples, and > the FT*Field classes have almost the same api as the FX*Field classes. > > Btw, the current version of FoxTails has a nice way of generating text > fields, check/radio buttons, option menus, and static text using a > syntax much like good ol' printf. The fields are automatically wired > up to the observable attrs that you specify. See examples/fields.rb. > _______________________________________________ > fxruby-users mailing list > fxruby-users@rubyforge.org > http://rubyforge.org/mailman/listinfo/fxruby-users > From vjoel at PATH.Berkeley.EDU Sat Feb 12 16:53:28 2005 From: vjoel at PATH.Berkeley.EDU (Joel VanderWerf) Date: Sat Feb 12 16:50:10 2005 Subject: [fxruby-users] Attribute Binding In-Reply-To: <420E79A2.6010704@d-haven.org> References: <420D6A7F.6050900@d-haven.org> <420E76D2.2040707@path.berkeley.edu> <420E79A2.6010704@d-haven.org> Message-ID: <420E7AD8.9050809@path.berkeley.edu> Berin Loritsch wrote: > Thank you. Are FoxTails and Observable gems? Or do I have to download > and install them separately? Sorry, no gems. Maybe in the next release... From jeromevoinot at yahoo.fr Fri Feb 18 04:08:03 2005 From: jeromevoinot at yahoo.fr (=?iso-8859-1?q?Voinot=20J=E9rome?=) Date: Fri Feb 18 04:04:34 2005 Subject: [fxruby-users] How centered a FXPopup on the screen ? Message-ID: <20050218090803.42837.qmail@web54708.mail.yahoo.com> Hello everybody, I just start to develop in ruby. I've decided to use fxruby rather than tk or something else (a very good choice, isn't it ? <:o) ). I've seen in the API reference docs that you can place a FXTopWindow (and all subclasses) centered on the screen by using the method show with PLACEMENT_SCREEN as argument. I would have liked to know how to do the same thing whit a FXPopup ... thank you, jerome ps: sorry for the grammatical faults and the others. I'm just a french student .... --------------------------------- D?couvrez le nouveau Yahoo! Mail : 250 Mo d'espace de stockage pour vos mails ! Cr?ez votre Yahoo! Mail -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/fxruby-users/attachments/20050218/22dffab9/attachment.htm From davidp at touringcyclist.com Fri Feb 18 16:38:57 2005 From: davidp at touringcyclist.com (David Peoples) Date: Fri Feb 18 16:35:34 2005 Subject: [fxruby-users] FXTable segfaults after multiple setTableSize calls Message-ID: <42166071.1050701@touringcyclist.com> When I empty and refill an FXTable multiple times with a large data set (10,000 rows x 1 column in the example below, around 1000 rows x 6 columns in a more complicated app), the application eventually fails with a segmentation fault. The number of repetitions required to produce the segfault is rather random, ranging from just a couple reps to 15 or 20 in some trials. The program disappears (window goes away) apparently during or just after the table is filled, leaving the following message at the command prompt: C:/Data/Ruby/pos/stockviewertest/mainv5c.rb:21: [BUG] Segmentation fault ruby 1.8.2 (2004-12-25) [i386-mswin32] The platform is Windows XP Home with service pack 2. The base Ruby installation is the "One Click Ruby Installer" version 1.8.2-14 final (ruby182-14.exe). I've installed FXRuby version 1.2.3 on top of the version included with the one click installer (FXRuby-1.2.3-ruby182.exe). fxversion() reports "1.2.13" from the irb command prompt. The machine has a Pentium 4 and 256mb ram. If someone can run the example code below and it fails like I'm seeing, let me know. If you see an obvious programming error on my part, please tell me -- I'm new to Ruby and that's a serious possibility. If you can run the code on Windows and it *doesn't* fail, let me know that -- maybe it is some other problem on this machine I'll have to track down (display driver?). Thanks for your help. David Peoples ------------------------------------------------------------------------- require "fox12" include Fox class TestWindow < FXMainWindow TABLE_SIZE = 10_000 def initialize(app) super(app, "MyTest", nil, nil, DECOR_ALL, 0, 0, 600, 400, 0, 0) mainFrame = FXVerticalFrame.new(self, LAYOUT_FILL_X|LAYOUT_FILL_Y) @table = FXTable.new(mainFrame, nil, 0, LAYOUT_FILL_X|LAYOUT_FILL_Y) goButton = FXButton.new(mainFrame, " Go method 1") goButton.connect(SEL_COMMAND) { fillTable } goButton2 = FXButton.new(mainFrame, " Go method 2") goButton2.connect(SEL_COMMAND) { fillTable2 } end # fails after 2 to 15-20 iterations def fillTable @table.setTableSize(TABLE_SIZE, 1) (0...TABLE_SIZE).each do |r| @table.setItemText(r, 0, "#{r}") end @table.setFocus end # seems to require more iterations, but still fails def fillTable2 @table.setTableSize(0, 1) (0...TABLE_SIZE).each do |r| @table.insertRows(r) @table.setItemText(r, 0, "#{r}") end @table.setFocus end def create super show(PLACEMENT_SCREEN) end end def runme application = FXApp.new("MyTest", "FoxTest") TestWindow.new(application) application.create application.run end runme ------------------------------------------------------------------------- -- David Peoples davidp@touringcyclist.com The Touring Cyclist http://www.touringcyclist.com 11816 St. Charles Rock Road, Bridgeton, MO 63044 tel: 314-739-4648 fax: 314-739-4972 From bdezonia at wisc.edu Fri Feb 18 16:54:16 2005 From: bdezonia at wisc.edu (DeZonia, Barry) Date: Fri Feb 18 16:50:36 2005 Subject: [fxruby-users] FXTable segfaults after multiple setTableSize calls In-Reply-To: <42166071.1050701@touringcyclist.com> Message-ID: <013801c51604$63e046d0$b0c65c90@forecol.wisc.edu> The app fails for me too selecting either button (after 8-20 times). Windows, Ruby 1.8.2-14 final, fxruby 1.2.2 -----Original Message----- From: fxruby-users-bounces@rubyforge.org [mailto:fxruby-users-bounces@rubyforge.org] On Behalf Of David Peoples Sent: Friday, February 18, 2005 3:39 PM To: fxruby-users Subject: [fxruby-users] FXTable segfaults after multiple setTableSize calls When I empty and refill an FXTable multiple times with a large data set (10,000 rows x 1 column in the example below, around 1000 rows x 6 columns in a more complicated app), the application eventually fails with a segmentation fault. The number of repetitions required to produce the segfault is rather random, ranging from just a couple reps to 15 or 20 in some trials. The program disappears (window goes away) apparently during or just after the table is filled, leaving the following message at the command prompt: C:/Data/Ruby/pos/stockviewertest/mainv5c.rb:21: [BUG] Segmentation fault ruby 1.8.2 (2004-12-25) [i386-mswin32] The platform is Windows XP Home with service pack 2. The base Ruby installation is the "One Click Ruby Installer" version 1.8.2-14 final (ruby182-14.exe). I've installed FXRuby version 1.2.3 on top of the version included with the one click installer (FXRuby-1.2.3-ruby182.exe). fxversion() reports "1.2.13" from the irb command prompt. The machine has a Pentium 4 and 256mb ram. If someone can run the example code below and it fails like I'm seeing, let me know. If you see an obvious programming error on my part, please tell me -- I'm new to Ruby and that's a serious possibility. If you can run the code on Windows and it *doesn't* fail, let me know that -- maybe it is some other problem on this machine I'll have to track down (display driver?). Thanks for your help. David Peoples ------------------------------------------------------------------------- require "fox12" include Fox class TestWindow < FXMainWindow TABLE_SIZE = 10_000 def initialize(app) super(app, "MyTest", nil, nil, DECOR_ALL, 0, 0, 600, 400, 0, 0) mainFrame = FXVerticalFrame.new(self, LAYOUT_FILL_X|LAYOUT_FILL_Y) @table = FXTable.new(mainFrame, nil, 0, LAYOUT_FILL_X|LAYOUT_FILL_Y) goButton = FXButton.new(mainFrame, " Go method 1") goButton.connect(SEL_COMMAND) { fillTable } goButton2 = FXButton.new(mainFrame, " Go method 2") goButton2.connect(SEL_COMMAND) { fillTable2 } end # fails after 2 to 15-20 iterations def fillTable @table.setTableSize(TABLE_SIZE, 1) (0...TABLE_SIZE).each do |r| @table.setItemText(r, 0, "#{r}") end @table.setFocus end # seems to require more iterations, but still fails def fillTable2 @table.setTableSize(0, 1) (0...TABLE_SIZE).each do |r| @table.insertRows(r) @table.setItemText(r, 0, "#{r}") end @table.setFocus end def create super show(PLACEMENT_SCREEN) end end def runme application = FXApp.new("MyTest", "FoxTest") TestWindow.new(application) application.create application.run end runme ------------------------------------------------------------------------- -- David Peoples davidp@touringcyclist.com The Touring Cyclist http://www.touringcyclist.com 11816 St. Charles Rock Road, Bridgeton, MO 63044 tel: 314-739-4648 fax: 314-739-4972 _______________________________________________ fxruby-users mailing list fxruby-users@rubyforge.org http://rubyforge.org/mailman/listinfo/fxruby-users From davidp at touringcyclist.com Fri Feb 18 16:56:24 2005 From: davidp at touringcyclist.com (David Peoples) Date: Fri Feb 18 16:53:00 2005 Subject: [fxruby-users] Fixed column widths in FXTable? Message-ID: <42166488.5050000@touringcyclist.com> Is there a way to make an FXTable's column widths (and row heights) unchangeable by the user? By experimentation it looks to me like leaving out TABLE_COL_SIZABLE and TABLE_ROW_SIZABLE from the options field in FXTable.new() has no effect. I can still drag the intersection between two column heading buttons to change the column width. The code I'm using to test this is below. The test is on a machine running Windows XP Home, service pack 2. The base Ruby installation is the "One Click Ruby Installer" version 1.8.2-14 final (ruby182-14.exe). I've installed FXRuby version 1.2.3 on top of the version included with the one click installer (FXRuby-1.2.3-ruby182.exe). fxversion() reports "1.2.13" from the irb command prompt. The machine has a Pentium 4 and 256mb ram. ------------------------------------------------------------------------- require "fox12" include Fox class TestWindow < FXMainWindow def initialize(app) super(app, "MyTest", nil, nil, DECOR_ALL, 0, 0, 600, 400, 0, 0) table = FXTable.new(self, nil, 0, LAYOUT_FILL_X|LAYOUT_FILL_Y) table.setTableSize(50, 3) (0...50).each do |r| table.setItemText(r, 0, "#{r},0") table.setItemText(r, 1, "#{r},1") table.setItemText(r, 2, "#{r},2") end end def create super show(PLACEMENT_SCREEN) end end def runme application = FXApp.new("MyTest", "FoxTest") TestWindow.new(application) application.create application.run end runme ------------------------------------------------------------------------- -- David Peoples davidp@touringcyclist.com The Touring Cyclist http://www.touringcyclist.com 11816 St. Charles Rock Road, Bridgeton, MO 63044 tel: 314-739-4648 fax: 314-739-4972 From lyle at knology.net Fri Feb 18 17:04:41 2005 From: lyle at knology.net (lyle@knology.net) Date: Fri Feb 18 17:01:03 2005 Subject: [fxruby-users] FXTable segfaults after multiple setTableSize calls In-Reply-To: <> References: <> Message-ID: <20050218220441.12934.qmail@webmail1.knology.net> On Fri, 18 Feb 2005 15:38:57 -0600, David Peoples wrote : > When I empty and refill an FXTable multiple times with a large data set > (10,000 rows x 1 column in the example below, around 1000 rows x 6 > columns in a more complicated app), the application eventually fails > with a segmentation fault. This sounds like another manifestation of the bug described here: http://rubyforge.org/tracker/index.php?func=detail&aid=1445&group_id=300&atid=1223 I will tack your report on to that one as some supporting evidence, if that's OK with you. I've figured out part of the problem, but it's difficult to debug. I hope to have a solution soon, though. Will try to devote some more time to it this weekend. From davidp at touringcyclist.com Fri Feb 18 17:10:18 2005 From: davidp at touringcyclist.com (David Peoples) Date: Fri Feb 18 17:06:55 2005 Subject: [fxruby-users] FXTable segfaults after multiple setTableSize calls In-Reply-To: <013801c51604$63e046d0$b0c65c90@forecol.wisc.edu> References: <013801c51604$63e046d0$b0c65c90@forecol.wisc.edu> Message-ID: <421667CA.9060807@touringcyclist.com> DeZonia, Barry wrote: > The app fails for me too selecting either button (after 8-20 times). > > Windows, Ruby 1.8.2-14 final, fxruby 1.2.2 > Thanks. I guess I'm glad to hear one data point suggesting this isn't just a display driver problem on my machine. (I just looked, it's an NVidia Vanta, driver ver. 4.5.2.3 supplied by Microsoft I think. Hope your's isn't the same! ) David -- David Peoples davidp@touringcyclist.com The Touring Cyclist http://www.touringcyclist.com 11816 St. Charles Rock Road, Bridgeton, MO 63044 tel: 314-739-4648 fax: 314-739-4972 From jeroen at fox-toolkit.org Fri Feb 18 17:14:54 2005 From: jeroen at fox-toolkit.org (Jeroen van der Zijp) Date: Fri Feb 18 17:11:15 2005 Subject: [fxruby-users] FXTable segfaults after multiple setTableSize calls In-Reply-To: <013801c51604$63e046d0$b0c65c90@forecol.wisc.edu> References: <013801c51604$63e046d0$b0c65c90@forecol.wisc.edu> Message-ID: <200502181614.55097.jeroen@fox-toolkit.org> On Friday 18 February 2005 03:54 pm, DeZonia, Barry wrote: > > The app fails for me too selecting either button (after 8-20 times). > > Windows, Ruby 1.8.2-14 final, fxruby 1.2.2 > > -----Original Message----- > From: fxruby-users-bounces@rubyforge.org > [mailto:fxruby-users-bounces@rubyforge.org] On Behalf Of David Peoples > Sent: Friday, February 18, 2005 3:39 PM > To: fxruby-users > Subject: [fxruby-users] FXTable segfaults after multiple setTableSize calls > > When I empty and refill an FXTable multiple times with a large data set > (10,000 rows x 1 column in the example below, around 1000 rows x 6 > columns in a more complicated app), the application eventually fails > with a segmentation fault. The number of repetitions required to produce > the segfault is rather random, ranging from just a couple reps to 15 or > 20 in some trials. The program disappears (window goes away) apparently > during or just after the table is filled, leaving the following message > at the command prompt: > > C:/Data/Ruby/pos/stockviewertest/mainv5c.rb:21: [BUG] Segmentation fault > ruby 1.8.2 (2004-12-25) [i386-mswin32] > > The platform is Windows XP Home with service pack 2. The base Ruby > installation is the "One Click Ruby Installer" version 1.8.2-14 final > (ruby182-14.exe). I've installed FXRuby version 1.2.3 on top of the > version included with the one click installer > (FXRuby-1.2.3-ruby182.exe). fxversion() reports "1.2.13" from the irb > command prompt. The machine has a Pentium 4 and 256mb ram. > > If someone can run the example code below and it fails like I'm seeing, > let me know. If you see an obvious programming error on my part, please > tell me -- I'm new to Ruby and that's a serious possibility. If you can > run the code on Windows and it *doesn't* fail, let me know that -- maybe > it is some other problem on this machine I'll have to track down > (display driver?). > > Thanks for your help. > > David Peoples > > ------------------------------------------------------------------------- > > require "fox12" > include Fox > > class TestWindow < FXMainWindow > > TABLE_SIZE = 10_000 > > def initialize(app) > super(app, "MyTest", nil, nil, DECOR_ALL, 0, 0, 600, 400, 0, 0) > mainFrame = FXVerticalFrame.new(self, LAYOUT_FILL_X|LAYOUT_FILL_Y) > @table = FXTable.new(mainFrame, nil, 0, LAYOUT_FILL_X|LAYOUT_FILL_Y) > goButton = FXButton.new(mainFrame, " Go method 1") > goButton.connect(SEL_COMMAND) { fillTable } > goButton2 = FXButton.new(mainFrame, " Go method 2") > goButton2.connect(SEL_COMMAND) { fillTable2 } > end > > # fails after 2 to 15-20 iterations > def fillTable > @table.setTableSize(TABLE_SIZE, 1) > (0...TABLE_SIZE).each do |r| > @table.setItemText(r, 0, "#{r}") > end > @table.setFocus > end > > # seems to require more iterations, but still fails > def fillTable2 > @table.setTableSize(0, 1) > (0...TABLE_SIZE).each do |r| > @table.insertRows(r) > @table.setItemText(r, 0, "#{r}") > end > @table.setFocus > end > > def create > super > show(PLACEMENT_SCREEN) > end > > end > > def runme > application = FXApp.new("MyTest", "FoxTest") > TestWindow.new(application) > application.create > application.run > end > > runme I looked through FXTable code and nothing I see looks like an obvious error. It may be specific to the ruby binding. - Jeroen From jeroen at fox-toolkit.org Fri Feb 18 17:18:13 2005 From: jeroen at fox-toolkit.org (Jeroen van der Zijp) Date: Fri Feb 18 17:14:33 2005 Subject: [fxruby-users] Fixed column widths in FXTable? In-Reply-To: <42166488.5050000@touringcyclist.com> References: <42166488.5050000@touringcyclist.com> Message-ID: <200502181618.13260.jeroen@fox-toolkit.org> On Friday 18 February 2005 03:56 pm, David Peoples wrote: > Is there a way to make an FXTable's column widths (and row heights) > unchangeable by the user? By experimentation it looks to me like leaving > out TABLE_COL_SIZABLE and TABLE_ROW_SIZABLE from the options field in > FXTable.new() has no effect. I can still drag the intersection between > two column heading buttons to change the column width. The code I'm > using to test this is below. > > The test is on a machine running Windows XP Home, service pack 2. The > base Ruby installation is the "One Click Ruby Installer" version > 1.8.2-14 final (ruby182-14.exe). I've installed FXRuby version 1.2.3 on > top of the version included with the one click installer > (FXRuby-1.2.3-ruby182.exe). fxversion() reports "1.2.13" from the irb > command prompt. The machine has a Pentium 4 and 256mb ram. > > ------------------------------------------------------------------------- > > require "fox12" > include Fox > > class TestWindow < FXMainWindow > > def initialize(app) > super(app, "MyTest", nil, nil, DECOR_ALL, 0, 0, 600, 400, 0, 0) > table = FXTable.new(self, nil, 0, LAYOUT_FILL_X|LAYOUT_FILL_Y) > table.setTableSize(50, 3) > (0...50).each do |r| > table.setItemText(r, 0, "#{r},0") > table.setItemText(r, 1, "#{r},1") > table.setItemText(r, 2, "#{r},2") > end > end > > def create > super > show(PLACEMENT_SCREEN) > end > > end > > def runme > application = FXApp.new("MyTest", "FoxTest") > TestWindow.new(application) > application.create > application.run > end > > runme You are correct. I can't believe this was overlooked but I'm going to make sure its fixed for the next 1.4 update [you'll get it soon when the Ruby <-> FOX 1.4 binding gets out]. Since 1.4 has editable tables, I think you'll want to upgrade as soon as possible. Regards, - Jeroen From davidp at touringcyclist.com Fri Feb 18 17:21:40 2005 From: davidp at touringcyclist.com (David Peoples) Date: Fri Feb 18 17:18:17 2005 Subject: [fxruby-users] FXTable segfaults after multiple setTableSize calls In-Reply-To: <20050218220441.12934.qmail@webmail1.knology.net> References: <> <20050218220441.12934.qmail@webmail1.knology.net> Message-ID: <42166A74.8010200@touringcyclist.com> lyle@knology.net wrote: > On Fri, 18 Feb 2005 15:38:57 -0600, David Peoples > wrote : > > >>When I empty and refill an FXTable multiple times with a large data set >>(10,000 rows x 1 column in the example below, around 1000 rows x 6 >>columns in a more complicated app), the application eventually fails >>with a segmentation fault. > > > > > This sounds like another manifestation of the bug described here: > > http://rubyforge.org/tracker/index.php?func=detail&aid=1445&group_id=300&atid=1223 > > I will tack your report on to that one as some supporting evidence, if > that's OK with you. I've figured out part of the problem, but it's difficult > to debug. I hope to have a solution soon, though. Will try to devote some > more time to it this weekend. That's fine. I actually had seen that bug report, but didn't make the connection to my example somehow. I think I was distracted by some red herrings in the original code where this problem first showed up, and didn't remember it by the time I distilled the problem down to the FXTable. I'm not equipped or knowledgeable enough to debug this at a lower level myself, so I'm afraid I can't be any help there. But I'll be happy to try out potential fixes for you if that does you any good. David -- David Peoples davidp@touringcyclist.com The Touring Cyclist http://www.touringcyclist.com 11816 St. Charles Rock Road, Bridgeton, MO 63044 tel: 314-739-4648 fax: 314-739-4972 From lyle at knology.net Fri Feb 18 18:49:43 2005 From: lyle at knology.net (Lyle Johnson) Date: Fri Feb 18 18:46:05 2005 Subject: [fxruby-users] Fixed column widths in FXTable? In-Reply-To: <200502181618.13260.jeroen@fox-toolkit.org> References: <42166488.5050000@touringcyclist.com> <200502181618.13260.jeroen@fox-toolkit.org> Message-ID: <6d23122ed17ef91ab7d8167287b72be1@knology.net> On Feb 18, 2005, at 4:18 PM, Jeroen van der Zijp wrote: > You are correct. I can't believe this was overlooked but I'm going to > make sure its fixed for the next 1.4 update [you'll get it soon when > the Ruby <-> FOX 1.4 binding gets out]. Since an FXRuby 1.4 may still be some ways off, do you plan to back-port this fix to FOX 1.2? The correct answer is, "Yes, and real soon now." ;) From lyle.johnson at gmail.com Fri Feb 18 22:36:05 2005 From: lyle.johnson at gmail.com (Lyle Johnson) Date: Fri Feb 18 22:32:26 2005 Subject: [fxruby-users] Fwd: [ANN] FXIrb 0.14 - a Win32 GUI wrapper around IRB In-Reply-To: References: Message-ID: As posted by Martin to ruby-talk... ---------- Forwarded message ---------- From: Martin DeMello Date: Sat, 19 Feb 2005 07:34:46 +0900 Subject: [ANN] FXIrb 0.14 - a Win32 GUI wrapper around IRB To: ruby-talk ML - What? FXIrb is a simple FXText wrapper around IRB, giving it useful features like a decent GUI font and cut/paste capability. The current version is being developed under Windows; I'll look at crossplatform operation in a later release - Why? IRB in the standard Windows terminal is quite painful to use. (The linux terminal is a lot more capable, which is why I'm concentrating my development efforts on Windows right now). Thanks to Marco Fraillis for the initial Windows port, and to Gilles Filippini for starting the project. - Where? http://rubyforge.org/frs/?group_id=501 - Now what? This is a rather alpha release; I'd mostly like people to bang on it and see what functionality they feel is missing. My current top priority is multiline editing, but I'm open to feature requests, suggestions and (particularly!) contributions. If the next version looks good, I'm going to work with Curt and Laurent and make a proper FreeRIDE plugin out of it. martin From lyle.johnson at gmail.com Sun Feb 20 08:54:27 2005 From: lyle.johnson at gmail.com (Lyle Johnson) Date: Sun Feb 20 08:50:44 2005 Subject: [fxruby-users] Fwd: [ANN] fxri 0.1.0 In-Reply-To: <1108901506.950735.222170@z14g2000cwz.googlegroups.com> References: <1108901506.950735.222170@z14g2000cwz.googlegroups.com> Message-ID: As posted by Martin to ruby-talk: ---------- Forwarded message ---------- From: martinus Date: Sun, 20 Feb 2005 21:14:42 +0900 Subject: [ANN] fxri 0.1.0 To: ruby-talk ML fxri is an interface to Ruby's RI documentation. It has several nice features: * Search Engine with search-on-typing * Includes Martin DeMello's excellent fxirb. * Syntax-highlited ri output. fxri is available via ruby gem, just type gem install fxri Here is a screenshot: http://martinus.geekisp.com/rublog.cgi/Projects/fxri/fxri.html martinus From davidp at touringcyclist.com Mon Feb 21 00:05:13 2005 From: davidp at touringcyclist.com (David Peoples) Date: Mon Feb 21 00:01:33 2005 Subject: [fxruby-users] Graphics printing with FXRuby? Message-ID: <42196C09.6090505@touringcyclist.com> What is the current recommendation for sending output to printers from FXRuby-based applications? I don't get much out of the documentation for the FX*Print* classes, and gather from my initial review of the foxgui-users archive that the underlying Fox "print" objects don't actually work, anyway. (?) I notice that the Fox Adie demonstration program doesn't print on my (Windows) system. Haven't tested it under Linux yet. I need to print fairly involved reports, multi-page with headers and footers and embedded graphics. I need the solution to work on both Windows and Linux, although the solution doesn't have to be the same on both platforms, just produce essentially the same output on both. Do people who print from their FXRuby programs settle for plain text sent to a port? Do you just not print at all? (I see no mention of printing in the fxruby-users archives.) I see some mention of it in ruby-talk, but the only solution actually implemented seems to be some variation on "write to a file, launch IE/Mozilla/Word and make it print the file", a solution I'm not thrilled with. Any better ideas? Any code samples? David Peoples -- David Peoples davidp@touringcyclist.com http://www.touringcyclist.com The Touring Cyclist, 11816 St. Charles Rock Road, Bridgeton MO 63044 tel: 314-739-4648 fax: 314-739-4972 From davidp at touringcyclist.com Tue Feb 22 16:59:49 2005 From: davidp at touringcyclist.com (David Peoples) Date: Tue Feb 22 16:56:03 2005 Subject: [fxruby-users] Graphics printing with FXRuby? In-Reply-To: <42196C09.6090505@touringcyclist.com> References: <42196C09.6090505@touringcyclist.com> Message-ID: <421BAB55.7020003@touringcyclist.com> David Peoples wrote: > What is the current recommendation for sending output to printers from > FXRuby-based applications? --snip-- I didn't hear back from anyone, so I'm posting the solution I figured out in case anyone else needs to know later. The basic idea is this: 1) Select the printer and configure it using FXPrintDialog. (This is the only part that requires FXRuby. The rest is straight Ruby code. Printer selection here is optional -- Ghostscript can be configured to do it in step 3 if desired.) 2) Generate the output as a PDF file using the ruby_fpdf library. (Ghostscript requires a real seekable file, so this can't be just a stream sent through a pipe.) 3) Use Ghostscript to process the PDF file and send it to a printer. Run Ghostscript using Kernel.system. 4) Delete the generated temporary PDF file. This was tested using Ruby 1.8.2, FXRuby 1.2.3, Ghostscript 8.50 and Ruby_fpdf 1.53a. Tested on Windows only, other OSs will require a different Ghostscript command line at least. This solution produces printed output only. There isn't an embedded PDF viewer for FXRuby that I know of for print previews, although Ghostscript or some other external viewer could be launched to do the print preview. Construction of real PDF reports using ruby_fpdf is an exercise left to the reader. #--- Code start ---# require 'fox12' require 'fpdf' include Fox class PrintTester < FXMainWindow def initialize(app) super(app, "Dialog Test", nil, nil, DECOR_ALL, 0, 0, 200, 100) contents = FXHorizontalFrame.new(self, LAYOUT_SIDE_TOP|FRAME_NONE|LAYOUT_FILL_X|LAYOUT_FILL_Y|PACK_UNIFORM_WIDTH) modalButton = FXButton.new(contents, "&Printer Dialog", nil, nil, 0, FRAME_RAISED|FRAME_THICK|LAYOUT_CENTER_X|LAYOUT_CENTER_Y) modalButton.connect(SEL_COMMAND, method(:onCmdShowDialogModal)) end def onCmdShowDialogModal(sender, sel, ptr) myPrinterDialog = FXPrintDialog.new(self, "Select printer") if myPrinterDialog.execute == 1 pdf=FPDF.new pdf.AddPage pdf.SetFont('Arial','B',16) pdf.Cell(40,10,'Hello World!') pdf.Output('temp.pdf') # Lots of options available on the ghostscript command # line. Review the ghostscript documentation. systemCommand = 'gswin32c -dBATCH -dNOPAUSE -dQUIET ' + '-dNoCancel -sDEVICE=mswinpr2 -sOutputFile="%printer%' + myPrinterDialog.printer.name + '" temp.pdf' system(systemCommand) File.delete('temp.pdf') end return 1 end def create super show(PLACEMENT_SCREEN) end end def run application = FXApp.new("Dialog", "FoxTest") PrintTester.new(application) application.create application.run end run #--- Code end ---# -- David Peoples davidp@touringcyclist.com The Touring Cyclist http://www.touringcyclist.com 11816 St. Charles Rock Road, Bridgeton, MO 63044 tel: 314-739-4648 fax: 314-739-4972 From SK at stephankaemper.de Thu Feb 24 09:31:07 2005 From: SK at stephankaemper.de (=?ISO-8859-1?Q?Stephan_K=E4mper?=) Date: Thu Feb 24 09:27:14 2005 Subject: [fxruby-users] Graphics printing with FXRuby? In-Reply-To: <42196C09.6090505@touringcyclist.com> References: <42196C09.6090505@touringcyclist.com> Message-ID: <421DE52B.6030706@stephankaemper.de> Hi, David Peoples wrote: ... > > Do people who print from their FXRuby programs settle for plain text > sent to a port? Do you just not print at all? (I see no mention of Ia small app I use shell = Win32API.new( "shell32", "ShellExecute", [ 'L','P','P','P','P','L' ], 'L' ) shell.Call( 0, "print", fname, 0, 0, 0 ) to print plain text. This only works on Windows boxes for obvious reasons. BTW, nowadays I'd use DL. Apparently this (as your workaround) involves creating a temporary file. > printing in the fxruby-users archives.) I see some mention of it in > ruby-talk, but the only solution actually implemented seems to be some > variation on "write to a file, launch IE/Mozilla/Word and make it print > the file", a solution I'm not thrilled with. Neither am I (with the 'solution' given above). > Any better ideas? Any code samples? From my early programming experience (using Borlands C++Builder) I seem to recall that printing under Windows is cumbersome. But then there are Win apps out there doing a really good job at printing... My opinion is that printing shouldn't involve additional software like ghostscript and what-not. If (and when) I develop a GUI based program, in many cases it's something less experienced user use. And these just don't understand that printing is (or might) be a problem at all: After all any program can issue a print job - OpenOffice, Word, IrfanView... But I must confess that I couldn't implement this 'feature' either. Happy rubying Stephan From davidp at touringcyclist.com Thu Feb 24 11:27:13 2005 From: davidp at touringcyclist.com (David Peoples) Date: Thu Feb 24 11:23:27 2005 Subject: [fxruby-users] Graphics printing with FXRuby? In-Reply-To: <421DE52B.6030706@stephankaemper.de> References: <42196C09.6090505@touringcyclist.com> <421DE52B.6030706@stephankaemper.de> Message-ID: <421E0061.6010607@touringcyclist.com> Stephan K?mper wrote: ... > Ia small app I use > > shell = Win32API.new( "shell32", "ShellExecute", > [ 'L','P','P','P','P','L' ], 'L' ) > > shell.Call( 0, "print", fname, 0, 0, 0 ) > > to print plain text. This only works on Windows boxes for obvious > reasons. BTW, nowadays I'd use DL. > > Apparently this (as your workaround) involves creating a temporary file. > Thanks for the code example. I did eventually find the similar sample code in the "Programming Ruby" book -- don't know why I missed that when I asked this question. > > My opinion is that printing shouldn't involve additional software like > ghostscript and what-not. If (and when) I develop a GUI based program, > in many cases it's something less experienced user use. And these just > don't understand that printing is (or might) be a problem at all: After > all any program can issue a print job - OpenOffice, Word, IrfanView... > > But I must confess that I couldn't implement this 'feature' either. > I agree that requiring a working installation of Ghostscript to be able to print is several steps worse than ideal. The notion of stringing several specialized tools together to get the job done *is* part of the Unix ethic, but non-technical computer users don't care about the "Unix ethic", they just want the program to work and not break. I can certainly handle installing and configuring Ghostscript on my company's machines if we roll out Ruby versions of our programs internally. But Ghostscript isn't the easiest install (requiring manual editing of the PATH, unless I misunderstood) so I'd hate to have to support that if we ever released these programs to the general public. I guess if we ever *did* release the programs, I'd need to find some sort of uber-installer that can include the Ghostscript installer and automate the PATH update. David > > Happy rubying > > Stephan > > _______________________________________________ > fxruby-users mailing list > fxruby-users@rubyforge.org > http://rubyforge.org/mailman/listinfo/fxruby-users -- David Peoples davidp@touringcyclist.com The Touring Cyclist http://www.touringcyclist.com 11816 St. Charles Rock Road, Bridgeton, MO 63044 tel: 314-739-4648 fax: 314-739-4972 From lyle at knology.net Thu Feb 24 22:52:59 2005 From: lyle at knology.net (Lyle Johnson) Date: Thu Feb 24 22:49:07 2005 Subject: [fxruby-users] [ANN] FXRuby 1.2.4 Now Available Message-ID: <8ed71ec8cbf1654613f3d79474e0a8c1@knology.net> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 All, The latest version of FXRuby 1.2 is now available for download here: http://rubyforge.org/frs/?group_id=300 There have been a large number of changes for this release, including a few significant bug fixes; for a complete list, see: http://www.fxruby.org/doc/changes.html The code is provided in several formats: as a source tarball; a source Gem; a binary Gem (for Windows) based on the latest One-Click Ruby Installer (from http://rubyinstaller.rubyforge.org); and a traditional installer (like the one-click installer), also compatible with the latest One-Click Installer for Ruby. Enjoy, Lyle -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (Darwin) iD8DBQFCHqEbFXV/hD6oMd0RAhrcAKCOfdfGG/vlQv09/jenh39hws6RlgCeJKH7 bCZjmRA9kyxmPvF/+BBmXk0= =sn2C -----END PGP SIGNATURE----- From davidp at touringcyclist.com Fri Feb 25 08:47:21 2005 From: davidp at touringcyclist.com (David Peoples) Date: Fri Feb 25 08:43:25 2005 Subject: [fxruby-users] Big tables still segfault with fxruby-1.2.4 Message-ID: <421F2C69.6090606@touringcyclist.com> I've installed the latest fxruby. (Fox::fxrubyversion() reports 1.2.4.) But my installation of fxruby still crashes with a segmentation fault when refilling FXTables with large data sets. My original report was attached to bug #1445. I'm including the test code below. The platform is Windows XP, and Ruby is from the one-click installer version 182-14 Final. I'd appreciate it if others could run this code to see if the segfault shows up on other machines or just mine. David Peoples ------------------------------------------------------------------------- require "fox12" include Fox class TestWindow < FXMainWindow TABLE_SIZE = 10_000 def initialize(app) super(app, "MyTest", nil, nil, DECOR_ALL, 0, 0, 600, 400, 0, 0) mainFrame = FXVerticalFrame.new(self, LAYOUT_FILL_X|LAYOUT_FILL_Y) @table = FXTable.new(mainFrame, nil, 0, LAYOUT_FILL_X|LAYOUT_FILL_Y) goButton = FXButton.new(mainFrame, " Go method 1") goButton.connect(SEL_COMMAND) { fillTable } goButton2 = FXButton.new(mainFrame, " Go method 2") goButton2.connect(SEL_COMMAND) { fillTable2 } end # fails after 2 to 15-20 iterations def fillTable @table.setTableSize(TABLE_SIZE, 1) (0...TABLE_SIZE).each do |r| @table.setItemText(r, 0, "#{r}") end @table.setFocus end # seems to require more iterations, but still fails def fillTable2 @table.setTableSize(0, 1) (0...TABLE_SIZE).each do |r| @table.insertRows(r) @table.setItemText(r, 0, "#{r}") end @table.setFocus end def create super show(PLACEMENT_SCREEN) end end def runme application = FXApp.new("MyTest", "FoxTest") TestWindow.new(application) application.create application.run end runme ------------------------------------------------------------------------- -- David Peoples davidp@touringcyclist.com http://www.touringcyclist.com The Touring Cyclist, 11816 St. Charles Rock Road, Bridgeton MO 63044 tel: 314-739-4648 fax: 314-739-4972 From davidp at touringcyclist.com Fri Feb 25 11:16:25 2005 From: davidp at touringcyclist.com (David Peoples) Date: Fri Feb 25 11:12:41 2005 Subject: [fxruby-users] [Fwd: Your code blew up on my pc too...] Message-ID: <421F4F59.8050105@touringcyclist.com> -------- Original Message -------- Subject: Your code blew up on my pc too... Date: Fri, 25 Feb 2005 09:24:04 -0500 From: Jamey Cribbs To: David Peoples David, just wanted to let you know that I tried your code and it blew up on my laptop (WindowsXP Home Edition) after either a few button clicks or sometimes 10-15. I'm replying directly to you 'cause I have trouble posting to fxruby ml some times. HTH, Jamey Cribbs Confidentiality Notice: This email message, including any attachments, is for the sole use of the intended recipient(s) and may contain confidential and/or privileged information. If you are not the intended recipient(s), you are hereby notified that any dissemination, unauthorized review, use, disclosure or distribution of this email and any materials contained in any attachments is prohibited. If you receive this message in error, or are not the intended recipient(s), please immediately notify the sender by email and destroy all copies of the original message, including attachments. -- David Peoples davidp@touringcyclist.com The Touring Cyclist http://www.touringcyclist.com 11816 St. Charles Rock Road, Bridgeton, MO 63044 tel: 314-739-4648 fax: 314-739-4972 From lyle at knology.net Fri Feb 25 11:37:49 2005 From: lyle at knology.net (lyle@knology.net) Date: Fri Feb 25 11:33:57 2005 Subject: [fxruby-users] Big tables still segfault with fxruby-1.2.4 In-Reply-To: <> References: <> Message-ID: <20050225163749.17839.qmail@webmail2.knology.net> On Fri, 25 Feb 2005 07:47:21 -0600, David Peoples wrote : > I've installed the latest fxruby. (Fox::fxrubyversion() reports 1.2.4.) > But my installation of fxruby still crashes with a segmentation fault > when refilling FXTables with large data sets. OK. For what it's worth, I *did* run your test program on my Mac OS X box and was able to click the "Go method 1" button about 40 times without crashing the program. I will take another look at it this weekend (on a Windows box) and see if I can reproduce the problem there. From davidp at touringcyclist.com Fri Feb 25 12:02:56 2005 From: davidp at touringcyclist.com (David Peoples) Date: Fri Feb 25 11:59:16 2005 Subject: [fxruby-users] Big tables still segfault with fxruby-1.2.4 In-Reply-To: <20050225163749.17839.qmail@webmail2.knology.net> References: <> <20050225163749.17839.qmail@webmail2.knology.net> Message-ID: <421F5A40.3000109@touringcyclist.com> lyle@knology.net wrote: > On Fri, 25 Feb 2005 07:47:21 -0600, David Peoples > wrote : > > >>I've installed the latest fxruby. (Fox::fxrubyversion() reports 1.2.4.) >>But my installation of fxruby still crashes with a segmentation fault >>when refilling FXTables with large data sets. > > > OK. For what it's worth, I *did* run your test program on my Mac OS X box > and was able to click the "Go method 1" button about 40 times without > crashing the program. I will take another look at it this weekend (on a > Windows box) and see if I can reproduce the problem there. I assumed you had run my test or something like it and the code had passed, and there was just something different about the platform you're testing on from mine. So it looks like it might come down to some obscure Windows bug? Fancy that. I hope you can find it. I keep worrying that this will turn out to be some display driver problem, like the bad old Win95 days, where it shows up on just a minority of the systems out there. I really need to bring Linux up to date on this machine and start developing there. Maybe that will be *my* project for this weekend. David -- David Peoples davidp@touringcyclist.com The Touring Cyclist http://www.touringcyclist.com 11816 St. Charles Rock Road, Bridgeton, MO 63044 tel: 314-739-4648 fax: 314-739-4972 From lyle at knology.net Fri Feb 25 12:14:24 2005 From: lyle at knology.net (lyle@knology.net) Date: Fri Feb 25 12:10:30 2005 Subject: [fxruby-users] Big tables still segfault with fxruby-1.2.4 In-Reply-To: <> References: <> Message-ID: <20050225171424.3909.qmail@webmail1.knology.net> On Fri, 25 Feb 2005 11:02:56 -0600, David Peoples wrote : > I assumed you had run my test or something like it and the code had > passed, and there was just something different about the platform you're > testing on from mine. So it looks like it might come down to some > obscure Windows bug? Fancy that. I hope you can find it. Well, just because we're (so far) only seeing the crash on Windows doesn't mean that it's a bug in Windows. It is quite possibly a bug in the FXRuby code that just keeps its mouth shut when running under Mac OS X. ;) But either way, I consider this extremely high priority and want to get it fixed ASAP. > I keep worrying that this will turn out to be some display driver > problem, like the bad old Win95 days, where it shows up on just a > minority of the systems out there. I really need to bring Linux up to > date on this machine and start developing there. Maybe that will be *my* > project for this weekend. I really, really don't think it's a display driver problem (although I used to do a lot of nightmarish customer support back in those bad old days). Now that Jamey (for one) has independently confirmed it on his Windows box that makes it less likely that it's something like that. Of course, I'm not going to discourage you from switching (or is it switching back?) to Linux either. ;) From vjoel at PATH.Berkeley.EDU Fri Feb 25 13:01:04 2005 From: vjoel at PATH.Berkeley.EDU (Joel VanderWerf) Date: Fri Feb 25 12:57:22 2005 Subject: [fxruby-users] Big tables still segfault with fxruby-1.2.4 In-Reply-To: <421F2C69.6090606@touringcyclist.com> References: <421F2C69.6090606@touringcyclist.com> Message-ID: <421F67E0.2020805@path.berkeley.edu> David Peoples wrote: > I've installed the latest fxruby. (Fox::fxrubyversion() reports 1.2.4.) > But my installation of fxruby still crashes with a segmentation fault > when refilling FXTables with large data sets. > > My original report was attached to bug #1445. I'm including the test > code below. The platform is Windows XP, and Ruby is from the one-click > installer version 182-14 Final. > > I'd appreciate it if others could run this code to see if the segfault > shows up on other machines or just mine. Crashes repeatably within 10 clicks on linux: $ ruby -v ruby 1.8.2 (2004-12-25) [i686-linux] $ uname -a Linux tercel.path.berkeley.edu 2.6.10 #1 Fri Jan 7 01:41:12 PST 2005 i686 Pentium III (Coppermine) unknown GNU/Linux ...and FXRuby is the new 1.2.24. Adding "GC.disable" at the top lets me click about 40 times, and no crash. (Had to stop there because it was gobbling VM.) Btw, I've been seeing, in my own code, a table-filling related, GC-dependent bug as well. I hope it's the same as this bug! I'll try to post a small test case. From vjoel at PATH.Berkeley.EDU Fri Feb 25 13:39:21 2005 From: vjoel at PATH.Berkeley.EDU (Joel VanderWerf) Date: Fri Feb 25 13:35:36 2005 Subject: [fxruby-users] Big tables still segfault with fxruby-1.2.4 In-Reply-To: <421F67E0.2020805@path.berkeley.edu> References: <421F2C69.6090606@touringcyclist.com> <421F67E0.2020805@path.berkeley.edu> Message-ID: <421F70D9.7070600@path.berkeley.edu> By putting some GC.start lines in David's original code, the problem comes up much faster. With just 10 rows, it happens in 2 clicks on button 1. Changes marked with " # <--- added". $ ruby fxbug2.rb fxbug2.rb:25: [BUG] rb_gc_mark(): unknown data type 0x30(0x82255f0) non object ruby 1.8.2 (2004-12-25) [i686-linux] zsh: abort ruby fxbug2.rb Another observation: moving the setTableSize call into initialize seems to avoid the problem. So it appears that as long as you never discard any items, it's ok. I may be able to use that in my own case... ------------------------ require "fox12" include Fox #GC.disable class TestWindow < FXMainWindow TABLE_SIZE = 10 # <--- added def initialize(app) super(app, "MyTest", nil, nil, DECOR_ALL, 0, 0, 600, 400, 0, 0) mainFrame = FXVerticalFrame.new(self, LAYOUT_FILL_X|LAYOUT_FILL_Y) @table = FXTable.new(mainFrame, nil, 0, LAYOUT_FILL_X|LAYOUT_FILL_Y) goButton = FXButton.new(mainFrame, " Go method 1") goButton.connect(SEL_COMMAND) { fillTable } goButton2 = FXButton.new(mainFrame, " Go method 2") goButton2.connect(SEL_COMMAND) { fillTable2 } end # fails after 2 to 15-20 iterations def fillTable @table.setTableSize(TABLE_SIZE, 1) (0...TABLE_SIZE).each do |r| @table.setItemText(r, 0, "#{r}") GC.start # <--- added end @table.setFocus GC.start # <--- added end # seems to require more iterations, but still fails def fillTable2 @table.setTableSize(0, 1) (0...TABLE_SIZE).each do |r| @table.insertRows(r) @table.setItemText(r, 0, "#{r}") end @table.setFocus end def create super show(PLACEMENT_SCREEN) end end def runme application = FXApp.new("MyTest", "FoxTest") TestWindow.new(application) application.create application.run end runme From cribbsj at oakwood.org Fri Feb 25 13:39:37 2005 From: cribbsj at oakwood.org (Jamey Cribbs) Date: Fri Feb 25 13:35:42 2005 Subject: [fxruby-users] Big tables still segfault with fxruby-1.2.4 In-Reply-To: <421F67E0.2020805@path.berkeley.edu> References: <421F2C69.6090606@touringcyclist.com> <421F67E0.2020805@path.berkeley.edu> Message-ID: <421F70E9.9070706@oakwood.org> Joel VanderWerf wrote: > > Btw, I've been seeing, in my own code, a table-filling related, > GC-dependent bug as well. I hope it's the same as this bug! > You know, now that I think about it, I saw this problem a few months ago with an app that I wrote for work. I installed the app on about 15 pcs at work. One guy was really zealous about using it. He kept adding new records to the database which meant he was constantly displaying an FXTable, going to an edit screen to add a new record, and then being taken back to a new rendition of the FXTable. I remember he called me over to tell me that after adding about 20-25 records the app crashed. I tested it a little and found that, if I constantly opened and closed a window that had an FXTable on it, the memory used gradually increased and eventually the program would crash. Because I had some icons on the same screen as the FXTable, I always assumed that it was because I was not correctly destroying the icon resources when I closed the window, but now that I see David's test code, I realize that that was probably not the case. Hope this helps! Jamey Cribbs Confidentiality Notice: This email message, including any attachments, is for the sole use of the intended recipient(s) and may contain confidential and/or privileged information. If you are not the intended recipient(s), you are hereby notified that any dissemination, unauthorized review, use, disclosure or distribution of this email and any materials contained in any attachments is prohibited. If you receive this message in error, or are not the intended recipient(s), please immediately notify the sender by email and destroy all copies of the original message, including attachments. From davidp at touringcyclist.com Fri Feb 25 14:34:46 2005 From: davidp at touringcyclist.com (David Peoples) Date: Fri Feb 25 14:31:03 2005 Subject: [fxruby-users] Big tables still segfault with fxruby-1.2.4 In-Reply-To: <421F67E0.2020805@path.berkeley.edu> References: <421F2C69.6090606@touringcyclist.com> <421F67E0.2020805@path.berkeley.edu> Message-ID: <421F7DD6.9000402@touringcyclist.com> Joel VanderWerf wrote: ... > Crashes repeatably within 10 clicks on linux: > > $ ruby -v > ruby 1.8.2 (2004-12-25) [i686-linux] > $ uname -a > Linux tercel.path.berkeley.edu 2.6.10 #1 Fri Jan 7 01:41:12 PST 2005 > i686 Pentium III (Coppermine) unknown GNU/Linux > > ...and FXRuby is the new 1.2.24. ... So now the score is OS X 1, Linux 0, Windows 0. Those Mac fanatics are going to have a field day with this one! David -- David Peoples davidp@touringcyclist.com The Touring Cyclist http://www.touringcyclist.com 11816 St. Charles Rock Road, Bridgeton, MO 63044 tel: 314-739-4648 fax: 314-739-4972 From lyle at knology.net Fri Feb 25 15:33:29 2005 From: lyle at knology.net (lyle@knology.net) Date: Fri Feb 25 15:29:34 2005 Subject: [fxruby-users] Big tables still segfault with fxruby-1.2.4 In-Reply-To: <> References: <> Message-ID: <20050225203329.24152.qmail@webmail1.knology.net> On Fri, 25 Feb 2005 10:39:21 -0800, Joel VanderWerf wrote : > By putting some GC.start lines in David's original code, the problem > comes up much faster. With just 10 rows, it happens in 2 clicks on > button 1. Changes marked with " # <--- added". OK. > Another observation: moving the setTableSize call into initialize seems > to avoid the problem. So it appears that as long as you never discard > any items, it's ok. I was already thinking about that possibility (since I'm still at work and can't actually hack on this yet). The problem that I *did* fix has to do with making sure that when an FXTable is destroyed, we "neutralize" all of the Ruby objects representing its table items so that they don't wreak any havoc before they eventually get GC'd. But there are some other "destructive" FXTable methods -- like setTableSize(), for instance -- that can also kill off C++ FXTableItem objects and leave behind Ruby peers that need to be similarly neutralized. Once I get things set up to test under Windows, and first confirm that I can reproduce David's crash, this seems like a good place to start. With some luck, maybe I can get a bug fix out release over the weekend. P.S. Of course, Saturday is my 11th wedding anniversary. My wife may have different plans for my weekend than working on FXRuby. ;) From vjoel at PATH.Berkeley.EDU Fri Feb 25 19:53:29 2005 From: vjoel at PATH.Berkeley.EDU (Joel VanderWerf) Date: Fri Feb 25 19:49:44 2005 Subject: [fxruby-users] Big tables still segfault with fxruby-1.2.4 In-Reply-To: <421F67E0.2020805@path.berkeley.edu> References: <421F2C69.6090606@touringcyclist.com> <421F67E0.2020805@path.berkeley.edu> Message-ID: <421FC889.5070809@path.berkeley.edu> Joel VanderWerf wrote: > Btw, I've been seeing, in my own code, a table-filling related, > GC-dependent bug as well. I hope it's the same as this bug! I'm pretty sure it _is_ the same bug. For now, I am being careful never to let go of any table items (calling #setTableSize once), and no crashes yet. From lyle at knology.net Sat Feb 26 22:29:07 2005 From: lyle at knology.net (Lyle Johnson) Date: Sat Feb 26 22:25:12 2005 Subject: [fxruby-users] Does anyone have access to an x86-64 box? Message-ID: <6d46356bdcf4ff81a83929488452c128@knology.net> All, Someone has submitted a bug report that seems to be specific to the x86-64 platform (running Ubuntu Linux 4.10). (He reports that the code works fine under x86 Linux, as expected.) I don't have access to an x86-64 platform for debugging or testing this problem. Can anyone volunteer to help out? The problem seems to occur up-front, when trying to do: require 'fox12' so the first step would be to try to figure out where in the code it's hanging. Not sure how complicated things would get past that point. Thanks in advance, Lyle From lyle at knology.net Sat Feb 26 22:48:55 2005 From: lyle at knology.net (Lyle Johnson) Date: Sat Feb 26 22:44:59 2005 Subject: [fxruby-users] Does anyone have access to an x86-64 box? In-Reply-To: <6d46356bdcf4ff81a83929488452c128@knology.net> References: <6d46356bdcf4ff81a83929488452c128@knology.net> Message-ID: <37632e249f7b44f692daa498fbccbc09@knology.net> On Feb 26, 2005, at 9:29 PM, Lyle Johnson wrote: > Someone has submitted a bug report that seems to be specific to the > x86-64 platform (running Ubuntu Linux 4.10). Forgot to mention: the bug report is here: http://rubyforge.org/tracker/? func=detail&aid=1540&group_id=300&atid=1223 Lyle From gilles.filippini at free.fr Sun Feb 27 17:16:38 2005 From: gilles.filippini at free.fr (Gilles Filippini) Date: Sun Feb 27 17:12:47 2005 Subject: [fxruby-users] Crash revisited In-Reply-To: <42085D0E.6040404@hypermetrics.com> References: <42085D0E.6040404@hypermetrics.com> Message-ID: <422246C6.2090907@free.fr> Hal Fulton a ?crit : > I finally read (and tried to apply) all the stuff in the > 1.0-to-1.2 document. > > Wow, Lyle! 50+ pages! Is that good for your health? ;) > > However, I'm still seeing a crash. > > Laurent was tracking down something similar -- Laurent, > did you have any luck?? > > If anyone's interested, Tycho 0.0.7 works fine with 1.0; > and Tycho 0.0.8 has the 1.2 changes and doesn't work. > > http://rubyforge.org/projects/tycho > > Thanks for any insight anyone can give... I suppose I > could stick with 1.0, but it feels like investing in > the past... > > > Cheers, > Hal Hi Hal, I've spent some time on tycho-0.0.8 to make it run with FXRuby 1.2. FWIW, you may want to have a look at the diffs below. _gilles. diff tycho/datastore.rb tycho.ok/datastore.rb 32c32 < if File.exist?("tycho.db") --- > if File.exist?("tycho.dir") diff tycho/fox_extra.rb tycho.ok/fox_extra.rb 1c1 < require "fox" --- > require "fox12" Seulement dans tycho.ok/: tycho.dir Seulement dans tycho.ok/: tycho.pag diff tycho/tycho.rb tycho.ok/tycho.rb 84c84 < super(contain, 0, nil, 0, tree_opts) --- > super(contain, nil, 0, tree_opts) 507c507 < @menubar = FXMenubar.new(self, LAYOUT_SIDE_TOP|LAYOUT_FILL_X) --- > @menubar = FXMenuBar.new(self, LAYOUT_SIDE_TOP|LAYOUT_FILL_X) 607c607 < @mlist = FXList.new(@middle,100,nil,0, --- > @mlist = FXList.new(@middle,nil,0, 794c794 < $pid = fork { exec("/usr/local/bin/display -geometry #{SplashGeom} crater.png") } --- > $pid = fork { exec("/usr/bin/display -geometry #{SplashGeom} crater.png") } From vjoel at PATH.Berkeley.EDU Mon Feb 28 15:43:56 2005 From: vjoel at PATH.Berkeley.EDU (Joel VanderWerf) Date: Mon Feb 28 15:39:58 2005 Subject: [fxruby-users] FXTable IndexError on down arrow key Message-ID: <4223828C.5050507@path.berkeley.edu> $ ruby fxbug-bounds-err.rb fxbug-bounds-err.rb:26:in `setCurrentItem': table column out of bounds (IndexError) from fxbug-bounds-err.rb:26:in `run' from fxbug-bounds-err.rb:26:in `runme' from fxbug-bounds-err.rb:29 All it takes to make this happen is to press the down arrow key. Is this a bug, or should I be preventing it in some way? --- fxbug-bounds-err.rb --- require "fox12" include Fox class TestWindow < FXMainWindow def initialize(app) super(app, "MyTest", nil, nil, DECOR_ALL, 0, 0, 600, 400, 0, 0) mainFrame = FXVerticalFrame.new(self, LAYOUT_FILL_X|LAYOUT_FILL_Y) @table = FXTable.new(mainFrame, nil, 0, LAYOUT_FILL_X|LAYOUT_FILL_Y) @table.setTableSize(10, 1) @table.setFocus end def create super show(PLACEMENT_SCREEN) end end def runme application = FXApp.new("MyTest", "FoxTest") TestWindow.new(application) application.create application.run end runme From vjoel at PATH.Berkeley.EDU Mon Feb 28 15:58:07 2005 From: vjoel at PATH.Berkeley.EDU (Joel VanderWerf) Date: Mon Feb 28 15:54:11 2005 Subject: [fxruby-users] FXTable IndexError on down arrow key In-Reply-To: <4223828C.5050507@path.berkeley.edu> References: <4223828C.5050507@path.berkeley.edu> Message-ID: <422385DF.7070506@path.berkeley.edu> Joel VanderWerf wrote: > $ ruby fxbug-bounds-err.rb > fxbug-bounds-err.rb:26:in `setCurrentItem': table column out of bounds > (IndexError) Sorry... this is with ruby-1.8.2 and FXRuby-1.2.5 (the tentative release), on linux and win2K. From vjoel at PATH.Berkeley.EDU Mon Feb 28 16:13:56 2005 From: vjoel at PATH.Berkeley.EDU (Joel VanderWerf) Date: Mon Feb 28 16:09:58 2005 Subject: [fxruby-users] FXTable IndexError on down arrow key In-Reply-To: <422385DF.7070506@path.berkeley.edu> References: <4223828C.5050507@path.berkeley.edu> <422385DF.7070506@path.berkeley.edu> Message-ID: <42238994.5020800@path.berkeley.edu> There's an obvious workaround: @table.setCurrentItem(0,0) in initialize. But it seems to me that a minimal table defininition should not be able to generate exceptions. This is also a rather hard exception to catch usefully, since it happens in internal keyboard handling.