From tsmith at tektone.net Tue Mar 4 15:17:58 2008 From: tsmith at tektone.net (Tim Smith) Date: Tue, 4 Mar 2008 15:17:58 -0500 Subject: [fxruby-users] FXTable and Escape key Message-ID: <6B90560780C80940BB5EE1D6650C2D75DEDE08@mail.tektone.net> When editing an FXTable item, if you press Escape, your changes are cancelled. However, when an item is selected but not being edited, the table still traps the Escape keypress. As a result, in the following code, if you open the dialog and then press Escape, it closes. But if you open the dialog, select an item in the table, and then press Escape, nothing happens. Is this behavior - trapping Escape when no item is being edited - desirable? I would expect the dialog to close in both cases. Tim Smith require 'fox16'; include Fox app = FXApp.new main = FXMainWindow.new app, 'Test', :height => 100, :width => 100 button = FXButton.new main, 'open dialog', :opts => BUTTON_NORMAL | LAYOUT_CENTER_X | LAYOUT_CENTER_Y button.connect(SEL_COMMAND) { dialog = FXDialogBox.new main, 'Dialog' table = FXTable.new dialog table.setTableSize 2, 2 table.visibleRows = 2 table.visibleColumns = 2 table.setItemText 0, 0, 'one' table.setItemText 0, 1, 'two' table.setItemText 1, 0, 'three' table.setItemText 1, 1, 'four' dialog.execute } app.create main.show PLACEMENT_SCREEN app.run -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/fxruby-users/attachments/20080304/5cce9740/attachment.html From lyle at lylejohnson.name Tue Mar 4 16:33:34 2008 From: lyle at lylejohnson.name (Lyle Johnson) Date: Tue, 4 Mar 2008 15:33:34 -0600 Subject: [fxruby-users] FXTable and Escape key In-Reply-To: <6B90560780C80940BB5EE1D6650C2D75DEDE08@mail.tektone.net> References: <6B90560780C80940BB5EE1D6650C2D75DEDE08@mail.tektone.net> Message-ID: <84743F90-7388-461E-85D2-97F354689065@lylejohnson.name> On Mar 4, 2008, at 2:17 PM, Tim Smith wrote: > When editing an FXTable item, if you press Escape, your changes are > cancelled. However, when an item is selected but not being edited, > the table still traps the Escape keypress. As a result, in the > following code, if you open the dialog and then press Escape, it > closes. But if you open the dialog, select an item in the table, > and then press Escape, nothing happens. Is this behavior ? trapping > Escape when no item is being edited ? desirable? I would expect the > dialog to close in both cases. Jeroen will need to make the decision about whether this is the appropriate default behavior for FXTable (i.e. it's a FOX thing, not an FXRuby thing). If you had some way to know for sure that the user is not currently editing a cell, you could just intercept the SEL_KEYPRESS message and handle it yourself, e.g. table.connect(SEL_KEYPRESS) do |sender, sel, event| if event.code == KEY_Escape && (we're not editing a cell) true else false end end The problem I'm running into is that the information that you need to make that determination (namely, whether or not an editor window has been constructed) isn't currently exposed to FXRuby. I will make a note to fix that in the next release. Hope this helps, Lyle --- "FXRuby: Create Lean and Mean GUIs with Ruby" Now available as a Beta book from the Pragmatic Bookshelf http://www.pragprog.com/titles/fxruby -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/fxruby-users/attachments/20080304/04e42c07/attachment-0001.html From tsmith at tektone.net Tue Mar 4 17:08:43 2008 From: tsmith at tektone.net (Tim Smith) Date: Tue, 4 Mar 2008 17:08:43 -0500 Subject: [fxruby-users] FXTable and Escape key In-Reply-To: <84743F90-7388-461E-85D2-97F354689065@lylejohnson.name> Message-ID: <6B90560780C80940BB5EE1D6650C2D75DEDE4F@mail.tektone.net> Thanks Lyle! Tim ________________________________ From: fxruby-users-bounces at rubyforge.org [mailto:fxruby-users-bounces at rubyforge.org] On Behalf Of Lyle Johnson Sent: Tuesday, March 04, 2008 4:34 PM To: fxruby-users at rubyforge.org Subject: Re: [fxruby-users] FXTable and Escape key On Mar 4, 2008, at 2:17 PM, Tim Smith wrote: When editing an FXTable item, if you press Escape, your changes are cancelled. However, when an item is selected but not being edited, the table still traps the Escape keypress. As a result, in the following code, if you open the dialog and then press Escape, it closes. But if you open the dialog, select an item in the table, and then press Escape, nothing happens. Is this behavior - trapping Escape when no item is being edited - desirable? I would expect the dialog to close in both cases. Jeroen will need to make the decision about whether this is the appropriate default behavior for FXTable (i.e. it's a FOX thing, not an FXRuby thing). If you had some way to know for sure that the user is not currently editing a cell, you could just intercept the SEL_KEYPRESS message and handle it yourself, e.g. table.connect(SEL_KEYPRESS) do |sender, sel, event| if event.code == KEY_Escape && (we're not editing a cell) true else false end end The problem I'm running into is that the information that you need to make that determination (namely, whether or not an editor window has been constructed) isn't currently exposed to FXRuby. I will make a note to fix that in the next release. Hope this helps, Lyle --- "FXRuby: Create Lean and Mean GUIs with Ruby" Now available as a Beta book from the Pragmatic Bookshelf http://www.pragprog.com/titles/fxruby -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/fxruby-users/attachments/20080304/bc5f75af/attachment.html From jeroen at fox-toolkit.org Tue Mar 4 18:50:03 2008 From: jeroen at fox-toolkit.org (Jeroen van der Zijp) Date: Tue, 4 Mar 2008 17:50:03 -0600 Subject: [fxruby-users] FXTable and Escape key In-Reply-To: <84743F90-7388-461E-85D2-97F354689065@lylejohnson.name> References: <6B90560780C80940BB5EE1D6650C2D75DEDE08@mail.tektone.net> <84743F90-7388-461E-85D2-97F354689065@lylejohnson.name> Message-ID: <200803041750.03251.jeroen@fox-toolkit.org> On Tuesday 04 March 2008, Lyle Johnson wrote: > > On Mar 4, 2008, at 2:17 PM, Tim Smith wrote: > > > When editing an FXTable item, if you press Escape, your changes are > > cancelled. However, when an item is selected but not being edited, > > the table still traps the Escape keypress. As a result, in the > > following code, if you open the dialog and then press Escape, it > > closes. But if you open the dialog, select an item in the table, > > and then press Escape, nothing happens. Is this behavior ? trapping > > Escape when no item is being edited ? desirable? I would expect the > > dialog to close in both cases. > > Jeroen will need to make the decision about whether this is the > appropriate default behavior for FXTable (i.e. it's a FOX thing, not > an FXRuby thing). Indeed, if FXTable does this, I think its wrong; we should probably ignore ESC when a cell is not being edited... I will take a look. - Jeroen From philippe.lang at attiksystem.ch Fri Mar 7 04:09:24 2008 From: philippe.lang at attiksystem.ch (Philippe Lang) Date: Fri, 7 Mar 2008 10:09:24 +0100 Subject: [fxruby-users] Printing under FXRuby Message-ID: <6C0CF58A187DA5479245E0830AF84F4218D047@poweredge.attiksystem.ch> Hi, I've been trying to print with FXRuby, and I have to say I was not able to do it, or find a tutorial explaning it. When trying to draw anything inside the dc, my application bombs: ------------------------------- using HP Color LaserJet 4550 PS c:/erp/ruby/lib/ruby/gems/1.8/gems/fxruby-1.6.12-mswin32/lib/fox16/itera tors.rb: 344: [BUG] Segmentation fault ruby 1.8.6 (2007-03-13) [i386-mswin32] ------------------------------- I've bee trying different mixes of beginPrint / beginPage, and the last thing I've been trying is: ------------------------------- print_dialog = FXPrintDialog.new(self, "Print Something") if print_dialog.execute != 0 print_instance = FXDCPrint.new($app) print_instance.beginPrint(print_dialog.printer) do |dc| print_instance.beginPage(1) do |dc| dc.drawImage(@image, 0, 0) end end end ------------------------------- I came accross an old post of year 2002 saying FXDCPrint was not working yet. Is it still the case maybe? Most likely, I'm doing something wrong... Can anyone help? Thanks, Philippe From philippe.lang at attiksystem.ch Fri Mar 7 04:56:30 2008 From: philippe.lang at attiksystem.ch (Philippe Lang) Date: Fri, 7 Mar 2008 10:56:30 +0100 Subject: [fxruby-users] Printing under FXRuby References: <6C0CF58A187DA5479245E0830AF84F4218D047@poweredge.attiksystem.ch> Message-ID: <6C0CF58A187DA5479245E0830AF84F4218D048@poweredge.attiksystem.ch> fxruby-users-bounces at rubyforge.org wrote: > Hi, > > I've been trying to print with FXRuby, and I have to say I was not > able to do it, or find a tutorial explaning it. > > When trying to draw anything inside the dc, my application bombs: > > ------------------------------- > using HP Color LaserJet 4550 PS > c:/erp/ruby/lib/ruby/gems/1.8/gems/fxruby-1.6.12-mswin32/lib/fox16/itera > tors.rb: > 344: [BUG] Segmentation fault > ruby 1.8.6 (2007-03-13) [i386-mswin32] > ------------------------------- > > I've bee trying different mixes of beginPrint / beginPage, and the > last thing I've been trying is: > > ------------------------------- > print_dialog = FXPrintDialog.new(self, "Print Something") if > print_dialog.execute != 0 print_instance = FXDCPrint.new($app) > print_instance.beginPrint(print_dialog.printer) do |dc| > print_instance.beginPage(1) do |dc| > dc.drawImage(@image, 0, 0) > end > end > end > ------------------------------- > > I came accross an old post of year 2002 saying FXDCPrint was not > working yet. Is it still the case maybe? Most likely, I'm doing > something wrong... Can anyone help? Hi again. A few more precisions: This code works when printing into a Postscript file, but does a GPF when trying to print on a real printer, even a Postcript one: ------------------------------- print_dialog = FXPrintDialog.new(self, "Print Something") if print_dialog.execute != 0 print_instance = FXDCPrint.new($app) print_instance.setContentRange(0, 0, 1280, 1024) print_instance.beginPrint(print_dialog.printer) do |dc| print_instance.beginPage(1) do |dc| dc.foreground = FXRGB(255, 150, 185) dc.drawLine(0, 0, 400, 0) dc.drawLine(0, 0, 0, 400) end end end ------------------------------- Second thing: there seems to be a problem with drawImage, associated with an FXDCPrint. (There is not problem when associated with an FXDCWindow). The following code does not reveal any image data in the Postcript file, and does a GPF when trying to print on a real printer. ------------------------------- print_dialog = FXPrintDialog.new(self, "Print Something") if print_dialog.execute != 0 print_instance = FXDCPrint.new($app) print_instance.setContentRange(0, 0, 1280, 1024) print_instance.beginPrint(print_dialog.printer) do |dc| print_instance.beginPage(1) do |dc| dc.drawImage(@image, 0, 400) end end end ------------------------------- Philippe Lang From datatec at gmail.com Fri Mar 7 09:55:34 2008 From: datatec at gmail.com (datatec) Date: Fri, 7 Mar 2008 06:55:34 -0800 (PST) Subject: [fxruby-users] How do I grey out or hide menu items. Message-ID: <15891267.post@talk.nabble.com> Sorry for posting two messages in a row, been looking for a few days now and am stumped :( I see from a lot of places that: Menu commands may reflect the state of the application by graying out or becoming hidden. But how exactly would I do that? So for example Here I have a command that I do not want enabled until changes have been made to a document savefile=FXMenuCommand.new(filemenu, "&Save\tCtl-S\tSave the file.").connect(SEL_COMMAND) { filesave } how could I set this to greyed out and/or hidden? General question. I can seem to find a lot of API and CLASS stuff but documentation of simple things like the above seem to be missing. Am I just looking in the wrong place? -- View this message in context: http://www.nabble.com/How-do-I-grey-out-or-hide-menu-items.-tp15891267p15891267.html Sent from the FXRuby Users mailing list archive at Nabble.com. From datatec at gmail.com Fri Mar 7 09:56:12 2008 From: datatec at gmail.com (datatec) Date: Fri, 7 Mar 2008 06:56:12 -0800 (PST) Subject: [fxruby-users] FXText undo functions? keysend of Ctrl + z? Message-ID: <15891260.post@talk.nabble.com> Sorry really new to Fox and FXruby in particular. So these may be extreemly dumb questions. Does FXText have a native undo/redo function? I have written one from scrach for what I am doing but one exists, would really love to know how to use it. Secondly I am using something like this for the undo functon @text.connect(SEL_KEYRELEASE) { |sender, sel, event| if event.code == KEY_Control_R puts "UNDO Pressed (Ctrl R)" undofunct() I really would like to change this to a generic any Ctrl key + the z key but cannot seem to find how to do something that happens only when two keys are pressed in combination. -- View this message in context: http://www.nabble.com/FXText---undo-functions----keysend-of-Ctrl-%2B-z--tp15891260p15891260.html Sent from the FXRuby Users mailing list archive at Nabble.com. From lyle at lylejohnson.name Fri Mar 7 12:11:14 2008 From: lyle at lylejohnson.name (Lyle Johnson) Date: Fri, 7 Mar 2008 11:11:14 -0600 Subject: [fxruby-users] How do I grey out or hide menu items. In-Reply-To: <15891267.post@talk.nabble.com> References: <15891267.post@talk.nabble.com> Message-ID: On Mar 7, 2008, at 8:55 AM, datatec wrote: > I see from a lot of places that: > Menu commands may reflect the state of the application by graying > out or > becoming hidden. > > But how exactly would I do that? The standard way to do this is to catch the SEL_UPDATE message that the menu command button sends to its target. > So for example > Here I have a command that I do not want enabled until changes have > been > made to a document > > savefile=FXMenuCommand.new(filemenu, "&Save\tCtl-S\tSave the > file.").connect(SEL_COMMAND) { > filesave > } > > how could I set this to greyed out and/or hidden? Here's what I'd do: savefile.connect(SEL_UPDATE) do |sender, sel, data| if document.changed? sender.enable else sender.disable end end > General question. I can seem to find a lot of API and CLASS stuff but > documentation of simple things like the above seem to be missing. > Am I just > looking in the wrong place? There's a good bit of free documentation at the FOX web site (http://www.fox-toolkit.org/ ), and although it's geared toward users of the C++ FOX library, you may be able to get a lot out of it. The best source for in-depth, tutorial-style documentation of FXRuby is the new FXRuby book (see my sig for details). Hope this helps, Lyle --- "FXRuby: Create Lean and Mean GUIs with Ruby" Now available as a Beta book from the Pragmatic Bookshelf http://www.pragprog.com/titles/fxruby From lyle at lylejohnson.name Fri Mar 7 12:26:52 2008 From: lyle at lylejohnson.name (Lyle Johnson) Date: Fri, 7 Mar 2008 11:26:52 -0600 Subject: [fxruby-users] FXText undo functions? keysend of Ctrl + z? In-Reply-To: <15891260.post@talk.nabble.com> References: <15891260.post@talk.nabble.com> Message-ID: On Mar 7, 2008, at 8:56 AM, datatec wrote: > Does FXText have a native undo/redo function? No, there's no built-in undo/redo capability for FXText (or any of the other widgets). There is however an FXUndoList class in the library that provides a sample implementation of an undo/redo capability for FXRuby applications. You can read about the FXUndoList class here: http://www.fxruby.org/doc/api/classes/Fox/FXUndoList.html and its use is demonstrated in the textedit.rb example program included with the FXRuby source distribution. > Secondly I am using something like this for the undo functon > > @text.connect(SEL_KEYRELEASE) { |sender, sel, event| > if event.code == KEY_Control_R > puts "UNDO Pressed (Ctrl R)" > undofunct() > > I really would like to change this to a generic any Ctrl key + the z > key > but cannot seem to find how to do something that happens only when > two keys > are pressed in combination. You need to test both the event.code and the event.state, e.g. if event.code == KEY_r && ((event.state & CONTROLMASK) != 0) puts "UNDO pressed... ... end A different approach would be to add an application-wide keyboard accelerator that maps to this keypress. I believe this technique is demonstrated in the textedit.rb example (mentioned earlier). Hope this helps, Lyle --- "FXRuby: Create Lean and Mean GUIs with Ruby" Now available as a Beta book from the Pragmatic Bookshelf http://www.pragprog.com/titles/fxruby From lyle at lylejohnson.name Fri Mar 7 12:29:15 2008 From: lyle at lylejohnson.name (Lyle Johnson) Date: Fri, 7 Mar 2008 11:29:15 -0600 Subject: [fxruby-users] Printing under FXRuby In-Reply-To: <6C0CF58A187DA5479245E0830AF84F4218D047@poweredge.attiksystem.ch> References: <6C0CF58A187DA5479245E0830AF84F4218D047@poweredge.attiksystem.ch> Message-ID: <43F93F67-3785-4319-80F7-71CE2F490058@lylejohnson.name> On Mar 7, 2008, at 3:09 AM, Philippe Lang wrote: > I came accross an old post of year 2002 saying FXDCPrint was not > working > yet. Is it still the case maybe? Most likely, I'm doing something > wrong... Can anyone help? Philippe, I'll look into this this weekend, but I seriously doubt Jeroen has done anything else with the FXDCPrint functionality since that time. It was always a half-baked feature that really only worked for generating postscript documents, IIRC. Since FXRuby is just a layer on top of FOX, if it's broken in FOX, it's broken in FXRuby. Lyle --- "FXRuby: Create Lean and Mean GUIs with Ruby" Now available as a Beta book from the Pragmatic Bookshelf http://www.pragprog.com/titles/fxruby From jeroen at fox-toolkit.org Fri Mar 7 14:44:13 2008 From: jeroen at fox-toolkit.org (Jeroen van der Zijp) Date: Fri, 7 Mar 2008 13:44:13 -0600 Subject: [fxruby-users] FXText undo functions? keysend of Ctrl + z? In-Reply-To: <15891260.post@talk.nabble.com> References: <15891260.post@talk.nabble.com> Message-ID: <200803071344.13196.jeroen@fox-toolkit.org> On Friday 07 March 2008, datatec wrote: > > Sorry really new to Fox and FXruby in particular. So these may be extreemly > dumb questions. > > > Does FXText have a native undo/redo function? It is intended that it could be hooked up to one; see Adie editor. > I have written one from scrach for what I am doing but one exists, would > really love to know how to use it. OK, FXText [and some other widgets too, BTW], have been written to emit some messages when changes are made to the contents by the user. For example, FXText emits SEL_INSERTED, SEL_REPLACED, SEL_DELETED messages, which reference a FXTextChange struct, which contains some information about the change that just took place. The typical thing to do is to stuff this information into a (subclass of) FXCommand, which is then hung under FXUndoList. Neat is, FXUndoList can be directly hooked up to FXMenuCommand or FXButton so that there is no further glue needed between the GUI and this functionality. In the case of Adie, these subclasses are called FXTextInsert, FXTextDelete, and FXTextReplace. Each of these corresponds to one of the possible callback messages from above. Of course, you can write your own methods to handle these as well. However, I recommend intercepting the same messages since they're intended for this very same purpose and its probably less work than intercepting all possible keystrokes [plus, some text changes happen e.g. by means of drag and drop, and you wouldn't know about these except via SEL_INSERTED, SEL_REPLACED, SEL_DELETED]. Hope this helps, Jeroen From jeroen at fox-toolkit.org Fri Mar 7 14:49:58 2008 From: jeroen at fox-toolkit.org (Jeroen van der Zijp) Date: Fri, 7 Mar 2008 13:49:58 -0600 Subject: [fxruby-users] FXText undo functions? keysend of Ctrl + z? In-Reply-To: References: <15891260.post@talk.nabble.com> Message-ID: <200803071349.59011.jeroen@fox-toolkit.org> On Friday 07 March 2008, Lyle Johnson wrote: > > On Mar 7, 2008, at 8:56 AM, datatec wrote: > > > Does FXText have a native undo/redo function? > > No, there's no built-in undo/redo capability for FXText (or any of the > other widgets). There is however an FXUndoList class in the library > that provides a sample implementation of an undo/redo capability for > FXRuby applications. You can read about the FXUndoList class here: > > http://www.fxruby.org/doc/api/classes/Fox/FXUndoList.html > > and its use is demonstrated in the textedit.rb example program > included with the FXRuby source distribution. > > > Secondly I am using something like this for the undo functon > > > > @text.connect(SEL_KEYRELEASE) { |sender, sel, event| > > if event.code == KEY_Control_R > > puts "UNDO Pressed (Ctrl R)" > > undofunct() > > > > I really would like to change this to a generic any Ctrl key + the z > > key > > but cannot seem to find how to do something that happens only when > > two keys > > are pressed in combination. > > You need to test both the event.code and the event.state, e.g. > > if event.code == KEY_r && ((event.state & CONTROLMASK) != 0) > puts "UNDO pressed... > ... > end > > A different approach would be to add an application-wide keyboard > accelerator that maps to this keypress. I believe this technique is > demonstrated in the textedit.rb example (mentioned earlier). Regardless of whether FXUndoList is used, the best way to track changes to widgets is SEL_INSERTED, SEL_REPLACED, and SEL_DELETED. These are reliably generated when the FXText widget is changed, by any means [including programmatically, if notify==true]. For instance, drag and drop, clipboard, and so on, also generate these messages. Tracking keys is a bad idea since you would not be notified when the text changes by other means. Hope this helps, - Jeroen From philippe.lang at attiksystem.ch Mon Mar 10 03:01:33 2008 From: philippe.lang at attiksystem.ch (Philippe Lang) Date: Mon, 10 Mar 2008 08:01:33 +0100 Subject: [fxruby-users] Printing under FXRuby References: <6C0CF58A187DA5479245E0830AF84F4218D047@poweredge.attiksystem.ch> <43F93F67-3785-4319-80F7-71CE2F490058@lylejohnson.name> Message-ID: <6C0CF58A187DA5479245E0830AF84F423381A7@poweredge.attiksystem.ch> fxruby-users-bounces at rubyforge.org wrote: > On Mar 7, 2008, at 3:09 AM, Philippe Lang wrote: > >> I came accross an old post of year 2002 saying FXDCPrint was not >> working yet. Is it still the case maybe? Most likely, I'm doing >> something wrong... Can anyone help? > > Philippe, > > I'll look into this this weekend, but I seriously doubt Jeroen has > done anything else with the FXDCPrint functionality since that time. > It was always a half-baked feature that really only worked for > generating postscript documents, IIRC. Since FXRuby is just a layer > on top of FOX, if it's broken in FOX, it's broken in FXRuby. Hi, Is there a Windows-only utility/workaround that allows building an FXRuby Windows application that is able to print directly on a printer? FXDCPrint seems to be useless... Regards, Philippe From lcl at tarazed.demon.co.uk Thu Mar 13 20:49:31 2008 From: lcl at tarazed.demon.co.uk (Len Lawrence) Date: Fri, 14 Mar 2008 00:49:31 +0000 Subject: [fxruby-users] Canvas to postscript file Message-ID: <47D9CB9B.3050907@tarazed.demon.co.uk> Ruby 1.8 FOX 1.6 fxruby-1.6.13 Mandriva 2008 - Linux 2.6.22.9-server-2mdv Having invested several months in learning and using fxruby as an alternative to C/Tcl/Tk or rubytk I have started redeveloping some of my homegrown programs for this new environment. The most important is paddb, an address label printer, which uses Tcl to generate postscript files from a canvas. FOX has the FXDCPrint class which looks like it generates postscript output. If this is supported by fxruby can it be used somehow in conjunction with a canvas and further would it be possible to copy that to a postscript file? In Tcl/Tk the canvas.postscript function handles all that transparently. Is there such a method in fxruby? The documentation available suggests not. Are there then any plans to incorporate such a facility in fxruby? If not I shall have to regress to rubytk, which I could never get to work satisfactorily. There are additional problems with that in Mandriva 2008 to do with the adoption of TclTk8.5. Mandriva's rubytk is compiled against version 8.4 AFAIK. Comments? From philippe.lang at attiksystem.ch Fri Mar 14 02:48:48 2008 From: philippe.lang at attiksystem.ch (Philippe Lang) Date: Fri, 14 Mar 2008 07:48:48 +0100 Subject: [fxruby-users] Canvas to postscript file References: <47D9CB9B.3050907@tarazed.demon.co.uk> Message-ID: <6C0CF58A187DA5479245E0830AF84F423381D1@poweredge.attiksystem.ch> fxruby-users-bounces at rubyforge.org wrote: > Ruby 1.8 > FOX 1.6 > fxruby-1.6.13 > > Mandriva 2008 - Linux 2.6.22.9-server-2mdv > > Having invested several months in learning and using fxruby as an > alternative to C/Tcl/Tk or rubytk I have started redeveloping some of > my homegrown programs for this new environment. The most important > is paddb, an address label printer, which uses Tcl to generate > postscript files from a canvas. FOX has the FXDCPrint class which > looks like it generates postscript output. If this is supported by > fxruby can it be used somehow in conjunction with a canvas and > further would it be possible to copy that to a postscript file? In > Tcl/Tk the canvas.postscript function handles all that transparently. > Is there such a method in fxruby? The documentation available > suggests not. Are there then any plans to incorporate such a facility > in fxruby? If not I shall have to regress to rubytk, which I could > never get to work satisfactorily. There are additional problems with > that in Mandriva 2008 to do with the adoption of TclTk8.5. > Mandriva's rubytk is compiled against version 8.4 AFAIK. > > Comments? Hi, I was able to draw forms into a PS file, like with this code: ------------------------------- print_dialog = FXPrintDialog.new(self, "Print Something") if print_dialog.execute != 0 print_instance = FXDCPrint.new($app) print_instance.setContentRange(0, 0, 1280, 1024) print_instance.beginPrint(print_dialog.printer) do |dc| print_instance.beginPage(1) do |dc| dc.foreground = FXRGB(255, 150, 185) dc.drawLine(0, 0, 400, 0) dc.drawLine(0, 0, 0, 400) end end end ------------------------------- But I haven't been able to draw an image (taken from a Canvas) into a PS file: ------------------------------- print_dialog = FXPrintDialog.new(self, "Print Something") if print_dialog.execute != 0 print_instance = FXDCPrint.new($app) print_instance.setContentRange(0, 0, 1280, 1024) print_instance.beginPrint(print_dialog.printer) do |dc| print_instance.beginPage(1) do |dc| dc.drawImage(@image, 0, 400) end end end ------------------------------- Is it possible, in Tcl/Tk, to print directly on a printer? This is something I'm searching for for some time now, and FXDCPrint does not allow that at the moment. Maybe there is code we can reuse? Regards, Philippe From lcl at tarazed.demon.co.uk Fri Mar 14 03:34:28 2008 From: lcl at tarazed.demon.co.uk (Len Lawrence) Date: Fri, 14 Mar 2008 07:34:28 +0000 Subject: [fxruby-users] Canvas to postscript file In-Reply-To: <6C0CF58A187DA5479245E0830AF84F423381D1@poweredge.attiksystem.ch> References: <47D9CB9B.3050907@tarazed.demon.co.uk> <6C0CF58A187DA5479245E0830AF84F423381D1@poweredge.attiksystem.ch> Message-ID: <47DA2A84.9060605@tarazed.demon.co.uk> Philippe Lang wrote: > fxruby-users-bounces at rubyforge.org wrote: > > >> Ruby 1.8 >> FOX 1.6 >> fxruby-1.6.13 >> >> Mandriva 2008 - Linux 2.6.22.9-server-2mdv >> >> Having invested several months in learning and using fxruby as an >> alternative to C/Tcl/Tk or rubytk I have started redeveloping some of >> my homegrown programs for this new environment. The most important >> is paddb, an address label printer, which uses Tcl to generate >> postscript files from a canvas. FOX has the FXDCPrint class which >> looks like it generates postscript output. If this is supported by >> fxruby can it be used somehow in conjunction with a canvas and >> further would it be possible to copy that to a postscript file? In >> Tcl/Tk the canvas.postscript function handles all that transparently. >> Is there such a method in fxruby? The documentation available >> suggests not. Are there then any plans to incorporate such a facility >> in fxruby? If not I shall have to regress to rubytk, which I could >> never get to work satisfactorily. There are additional problems with >> that in Mandriva 2008 to do with the adoption of TclTk8.5. >> Mandriva's rubytk is compiled against version 8.4 AFAIK. >> >> Comments? >> > > Hi, > > I was able to draw forms into a PS file, like with this code: > > ------------------------------- > print_dialog = FXPrintDialog.new(self, "Print Something") if > print_dialog.execute != 0 > print_instance = FXDCPrint.new($app) > print_instance.setContentRange(0, 0, 1280, 1024) > print_instance.beginPrint(print_dialog.printer) do |dc| > print_instance.beginPage(1) do |dc| > > dc.foreground = FXRGB(255, 150, 185) > dc.drawLine(0, 0, 400, 0) > dc.drawLine(0, 0, 0, 400) > > end > end > end > ------------------------------- > > But I haven't been able to draw an image (taken from a Canvas) into a PS > file: > > ------------------------------- > print_dialog = FXPrintDialog.new(self, "Print Something") if > print_dialog.execute != 0 > print_instance = FXDCPrint.new($app) > print_instance.setContentRange(0, 0, 1280, 1024) > print_instance.beginPrint(print_dialog.printer) do |dc| > print_instance.beginPage(1) do |dc| > > dc.drawImage(@image, 0, 400) > > end > end > end > ------------------------------- > > > Is it possible, in Tcl/Tk, to print directly on a printer? This is > something I'm searching for for some time now, and FXDCPrint does not > allow that at the moment. Maybe there is code we can reuse? > > Regards, > > Philippe > > Thanks for the response Philippe. I need the canvas for interaction, adding, deleting labels, changing font size and colour, changing the typeface etc. In Tcl/Tk I create the .ps file from the canvas and then use the system command to print it; e.g. system( "lpr -Pdj940 $somefilewhatever" ) and I had hoped to do something like that in fxruby. In your case, having created the Postscript file could you not use Ruby's system command? If you are using Windows or a Mac there must be a similar print command. HTH - Len From jeroen at fox-toolkit.org Fri Mar 14 09:23:46 2008 From: jeroen at fox-toolkit.org (Jeroen van der Zijp) Date: Fri, 14 Mar 2008 08:23:46 -0500 Subject: [fxruby-users] Canvas to postscript file In-Reply-To: <47DA2A84.9060605@tarazed.demon.co.uk> References: <47D9CB9B.3050907@tarazed.demon.co.uk> <6C0CF58A187DA5479245E0830AF84F423381D1@poweredge.attiksystem.ch> <47DA2A84.9060605@tarazed.demon.co.uk> Message-ID: <200803140823.46667.jeroen@fox-toolkit.org> On Friday 14 March 2008, Len Lawrence wrote: > Philippe Lang wrote: > > fxruby-users-bounces at rubyforge.org wrote: > > > > > >> Ruby 1.8 > >> FOX 1.6 > >> fxruby-1.6.13 > >> > >> Mandriva 2008 - Linux 2.6.22.9-server-2mdv > >> > >> Having invested several months in learning and using fxruby as an > >> alternative to C/Tcl/Tk or rubytk I have started redeveloping some of > >> my homegrown programs for this new environment. The most important > >> is paddb, an address label printer, which uses Tcl to generate > >> postscript files from a canvas. FOX has the FXDCPrint class which > >> looks like it generates postscript output. If this is supported by > >> fxruby can it be used somehow in conjunction with a canvas and > >> further would it be possible to copy that to a postscript file? In > >> Tcl/Tk the canvas.postscript function handles all that transparently. > >> Is there such a method in fxruby? The documentation available > >> suggests not. Are there then any plans to incorporate such a facility > >> in fxruby? If not I shall have to regress to rubytk, which I could > >> never get to work satisfactorily. There are additional problems with > >> that in Mandriva 2008 to do with the adoption of TclTk8.5. > >> Mandriva's rubytk is compiled against version 8.4 AFAIK. > >> > >> Comments? > >> > > > > Hi, > > > > I was able to draw forms into a PS file, like with this code: > > > > ------------------------------- > > print_dialog = FXPrintDialog.new(self, "Print Something") if > > print_dialog.execute != 0 > > print_instance = FXDCPrint.new($app) > > print_instance.setContentRange(0, 0, 1280, 1024) > > print_instance.beginPrint(print_dialog.printer) do |dc| > > print_instance.beginPage(1) do |dc| > > > > dc.foreground = FXRGB(255, 150, 185) > > dc.drawLine(0, 0, 400, 0) > > dc.drawLine(0, 0, 0, 400) > > > > end > > end > > end > > ------------------------------- > > > > But I haven't been able to draw an image (taken from a Canvas) into a PS > > file: > > > > ------------------------------- > > print_dialog = FXPrintDialog.new(self, "Print Something") if > > print_dialog.execute != 0 > > print_instance = FXDCPrint.new($app) > > print_instance.setContentRange(0, 0, 1280, 1024) > > print_instance.beginPrint(print_dialog.printer) do |dc| > > print_instance.beginPage(1) do |dc| > > > > dc.drawImage(@image, 0, 400) > > > > end > > end > > end > > ------------------------------- > > > > > > Is it possible, in Tcl/Tk, to print directly on a printer? This is > > something I'm searching for for some time now, and FXDCPrint does not > > allow that at the moment. Maybe there is code we can reuse? > > > > Regards, > > > > Philippe > > > > > Thanks for the response Philippe. I need the canvas for interaction, > adding, deleting labels, changing font size and colour, changing the > typeface etc. In Tcl/Tk I create the .ps file from the canvas and then > use the system command to print it; > e.g. system( "lpr -Pdj940 $somefilewhatever" ) > and I had hoped to do something like that in fxruby. In your case, > having created the Postscript file could you not use Ruby's system > command? If you are using Windows or a Mac there must be a similar > print command. To save an FXImage, try fxsavePS(). - Jeroen From parsons.nicholas1 at gmail.com Tue Mar 18 16:09:54 2008 From: parsons.nicholas1 at gmail.com (Nicholas Parsons) Date: Tue, 18 Mar 2008 16:09:54 -0400 Subject: [fxruby-users] Newbie Question - Installing FXRuby from Gem Error Message-ID: <3aea40a70803181309u3c02066aj8684a3347799415f@mail.gmail.com> Hi All! I'm a fxruby newbie and was just trying to install it using ruby gems on my i386 linux platform. I received the following error message and was wondering if anyone else had experienced such an ugly thing when they were installing this using gems. Seems to be something wrong the the FOX headers. Your help is greatly appreciated in advance. Thanks! --Nick % sudo gem install fxruby --remote root's password: Bulk updating Gem source index for: http://gems.rubyforge.org ERROR: While executing gem ... (Gem::GemNotFoundException) Could not find fxruby (> 0) in any repository nparsons at bilbo:~/Downloads> sudo gem install fxruby --remote Bulk updating Gem source index for: http://gems.rubyforge.org Select which gem to install for your platform (i586-linux) 1. fxruby 1.6.13 (mswin32) 2. fxruby 1.6.13 (ruby) 3. fxruby 1.6.12 (mswin32) 4. fxruby 1.6.12 (ruby) 5. Skip this gem 6. Cancel installation > 2 Building native extensions. This could take a while... ERROR: While executing gem ... (Gem::Installer::ExtensionBuildError) ERROR: Failed to build gem native extension. ruby extconf.rb install fxruby --remote *** extconf.rb failed *** Could not create Makefile due to some reason, probably lack of necessary libraries and/or headers. Check the mkmf.log file for more details. You may need configuration options. Provided configuration options: --with-opt-dir --without-opt-dir --with-opt-include --without-opt-include=${opt-dir}/include --with-opt-lib --without-opt-lib=${opt-dir}/lib --with-make-prog --without-make-prog --srcdir=. --curdir --ruby=/usr/bin/ruby --with-fox-dir --without-fox-dir --with-fox-include --without-fox-include=${fox-dir}/include --with-fox-lib --without-fox-lib=${fox-dir}/lib --with-fxscintilla-dir --without-fxscintilla-dir --with-fxscintilla-include --without-fxscintilla-include=${fxscintilla-dir}/include --with-fxscintilla-lib --without-fxscintilla-lib=${fxscintilla-dir}/lib extconf.rb:31:in `find_installed_fox_version': couldn't find FOX header files (RuntimeError) from extconf.rb:157 Gem files will remain installed in /usr/lib/ruby/gems/1.8/gems/fxruby-1.6.13for inspection. Results logged to /usr/lib/ruby/gems/1.8/gems/fxruby-1.6.13 /ext/fox16/gem_make.out -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/fxruby-users/attachments/20080318/9a2dd7af/attachment.html From joshualef at gmail.com Tue Mar 18 17:06:34 2008 From: joshualef at gmail.com (Joshua Lefkowitz) Date: Tue, 18 Mar 2008 14:06:34 -0700 Subject: [fxruby-users] Newbie Question - Installing FXRuby from Gem Error In-Reply-To: <3aea40a70803181309u3c02066aj8684a3347799415f@mail.gmail.com> References: <3aea40a70803181309u3c02066aj8684a3347799415f@mail.gmail.com> Message-ID: <47E02EDA.1010103@gmail.com> Nicholas Parsons wrote: > Hi All! > > I'm a fxruby newbie and was just trying to install it using ruby gems on > my i386 linux platform. > > I received the following error message and was wondering if anyone else > had experienced such an ugly thing when they were installing this using > gems. Seems to be something wrong the the FOX headers. > > Your help is greatly appreciated in advance. > > Thanks! > --Nick > > % sudo gem install fxruby --remote > root's password: > Bulk updating Gem source index for: http://gems.rubyforge.org > ERROR: While executing gem ... (Gem::GemNotFoundException) > Could not find fxruby (> 0) in any repository > nparsons at bilbo:~/Downloads> sudo gem install fxruby --remote > Bulk updating Gem source index for: http://gems.rubyforge.org > Select which gem to install for your platform (i586-linux) > 1. fxruby 1.6.13 (mswin32) > 2. fxruby 1.6.13 (ruby) > 3. fxruby 1.6.12 (mswin32) > 4. fxruby 1.6.12 (ruby) > 5. Skip this gem > 6. Cancel installation > > 2 > Building native extensions. This could take a while... > ERROR: While executing gem ... (Gem::Installer::ExtensionBuildError) > ERROR: Failed to build gem native extension. > > ruby extconf.rb install fxruby --remote > *** extconf.rb failed *** > Could not create Makefile due to some reason, probably lack of > necessary libraries and/or headers. Check the mkmf.log file for more > details. You may need configuration options. > > Provided configuration options: > --with-opt-dir > --without-opt-dir > --with-opt-include > --without-opt-include=${opt-dir}/include > --with-opt-lib > --without-opt-lib=${opt-dir}/lib > --with-make-prog > --without-make-prog > --srcdir=. > --curdir > --ruby=/usr/bin/ruby > --with-fox-dir > --without-fox-dir > --with-fox-include > --without-fox-include=${fox-dir}/include > --with-fox-lib > --without-fox-lib=${fox-dir}/lib > --with-fxscintilla-dir > --without-fxscintilla-dir > --with-fxscintilla-include > --without-fxscintilla-include=${fxscintilla-dir}/include > --with-fxscintilla-lib > --without-fxscintilla-lib=${fxscintilla-dir}/lib > extconf.rb:31:in `find_installed_fox_version': couldn't find FOX header > files (RuntimeError) > from extconf.rb:157 > > > Gem files will remain installed in > /usr/lib/ruby/gems/1.8/gems/fxruby-1.6.13 for inspection. > Results logged to > /usr/lib/ruby/gems/1.8/gems/fxruby-1.6.13/ext/fox16/gem_make.out > > > > > > ------------------------------------------------------------------------ > > _______________________________________________ > fxruby-users mailing list > fxruby-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/fxruby-users I installed fxrbuy on windows, and I don't recall having any difficulty. Do you need to use one of the following instead of fxruby: gem install fx gem install fx16 gem install fxruby16 my apologies if this is not helpful. From lyle at lylejohnson.name Tue Mar 18 17:28:09 2008 From: lyle at lylejohnson.name (Lyle Johnson) Date: Tue, 18 Mar 2008 16:28:09 -0500 Subject: [fxruby-users] Newbie Question - Installing FXRuby from Gem Error In-Reply-To: <3aea40a70803181309u3c02066aj8684a3347799415f@mail.gmail.com> References: <3aea40a70803181309u3c02066aj8684a3347799415f@mail.gmail.com> Message-ID: <2AAD5D2B-BC93-475A-AA64-4F227AFDE2D4@lylejohnson.name> On Mar 18, 2008, at 3:09 PM, Nicholas Parsons wrote: > I'm a fxruby newbie and was just trying to install it using ruby > gems on my i386 linux platform. > > I received the following error message and was wondering if anyone > else had experienced such an ugly thing when they were installing > this using gems. Seems to be something wrong the the FOX headers. Right. The setup script couldn't figure out where you've installed FOX. It checks in a few obvious places (such as /usr/local, or /usr) by default. So the first question is: Where did you install FOX? ;) --- "FXRuby: Create Lean and Mean GUIs with Ruby" Now available as a Beta book from the Pragmatic Bookshelf http://www.pragprog.com/titles/fxruby From lyle at lylejohnson.name Tue Mar 18 17:32:02 2008 From: lyle at lylejohnson.name (Lyle Johnson) Date: Tue, 18 Mar 2008 16:32:02 -0500 Subject: [fxruby-users] Newbie Question - Installing FXRuby from Gem Error In-Reply-To: <47E02EDA.1010103@gmail.com> References: <3aea40a70803181309u3c02066aj8684a3347799415f@mail.gmail.com> <47E02EDA.1010103@gmail.com> Message-ID: On Mar 18, 2008, at 4:06 PM, Joshua Lefkowitz wrote: > I installed fxruby on windows, and I don't recall having any > difficulty. > Do you need to use one of the following instead of fxruby: > > gem install fx > gem install fx16 > gem install fxruby16 No, the name of the gem is just "fxruby". There is a precompiled gem for Windows, which is why the installation went smoothly for you. For users on other platforms, it needs to be built from the source code, and of course you need to have all of the dependencies (such as FOX) installed before you can even build FXRuby. --- "FXRuby: Create Lean and Mean GUIs with Ruby" Now available as a Beta book from the Pragmatic Bookshelf http://www.pragprog.com/titles/fxruby From lcl at tarazed.demon.co.uk Wed Mar 19 04:21:30 2008 From: lcl at tarazed.demon.co.uk (Len Lawrence) Date: Wed, 19 Mar 2008 08:21:30 +0000 Subject: [fxruby-users] Newbie Question - Installing FXRuby from Gem Error In-Reply-To: <2AAD5D2B-BC93-475A-AA64-4F227AFDE2D4@lylejohnson.name> References: <3aea40a70803181309u3c02066aj8684a3347799415f@mail.gmail.com> <2AAD5D2B-BC93-475A-AA64-4F227AFDE2D4@lylejohnson.name> Message-ID: <47E0CD0A.8060407@tarazed.demon.co.uk> Lyle Johnson wrote: > On Mar 18, 2008, at 3:09 PM, Nicholas Parsons wrote: > > >> I'm a fxruby newbie and was just trying to install it using ruby >> gems on my i386 linux platform. >> >> I received the following error message and was wondering if anyone >> else had experienced such an ugly thing when they were installing >> this using gems. Seems to be something wrong the the FOX headers. >> > > Right. The setup script couldn't figure out where you've installed > FOX. It checks in a few obvious places (such as /usr/local, or /usr) > by default. > > So the first question is: Where did you install FOX? ;) > > And also, which version of FOX. I had a similar problem some time ago on Mandriva 2007, trying to install fxruby 1.6 on top of FOX1.4. On Mandriva 2008 the versions matched and fxruby1.6 installed no bother. Just a thought. Len From jmthomas at ball.com Tue Mar 25 12:09:31 2008 From: jmthomas at ball.com (Thomas, Jason M (Software)) Date: Tue, 25 Mar 2008 10:09:31 -0600 Subject: [fxruby-users] Drag and drop from the filesystem References: Message-ID: <03B62622BF273442912A2E486B799DD205829C02@AEROMSG3.AERO.BALL.COM> I was reading about drag and drop within and between FOX applications but I was wondering if it was possible to drag and drop a file from the filesystem into a FOX application? Obviously I could use the file open dialog box but drag and drop is a nice feature. Thanks, Jason This message and any enclosures are intended only for the addressee. Please notify the sender by email if you are not the intended recipient. If you are not the intended recipient, you may not use, copy, disclose, or distribute this message or its contents or enclosures to any other person and any such actions may be unlawful. Ball reserves the right to monitor and review all messages and enclosures sent to or from this email address. From lyle at lylejohnson.name Tue Mar 25 15:40:13 2008 From: lyle at lylejohnson.name (Lyle Johnson) Date: Tue, 25 Mar 2008 14:40:13 -0500 Subject: [fxruby-users] Drag and drop from the filesystem In-Reply-To: <03B62622BF273442912A2E486B799DD205829C02@AEROMSG3.AERO.BALL.COM> References: <03B62622BF273442912A2E486B799DD205829C02@AEROMSG3.AERO.BALL.COM> Message-ID: <57cf8f720803251240j7915b3bbv891920465e09cbe2@mail.gmail.com> On Tue, Mar 25, 2008 at 11:09 AM, Thomas, Jason M (Software) wrote: > I was reading about drag and drop within and between FOX applications > but I was wondering if it was possible to drag and drop a file from the > filesystem into a FOX application? Obviously I could use the file open > dialog box but drag and drop is a nice feature. The short answer is that it's not possible at this time. For this to work would require a change to the core FOX event loop. When the application receives a WM_DROPFILES messages from the Win32 layer, it should (somehow) synthesize a drop event in your FOX/FXRuby application. I know the subject has come up before, and I can even see some commented-out code in FOX that suggests to me that someone (presumably Jeroen) has investigated it in the past. If FOX ever acquires this functionality, you'd obviously get it for free in FXRuby. Unfortunately, it's such a low-level thing that we can't even hack it in with FXRuby. From mathijs.claassen at gmail.com Tue Mar 25 15:46:24 2008 From: mathijs.claassen at gmail.com (Mathijs C) Date: Tue, 25 Mar 2008 12:46:24 -0700 (PDT) Subject: [fxruby-users] FXImageFrame/SEL_LEFTBUTTONRELEASE Message-ID: <16286969.post@talk.nabble.com> Hi, I have a FXImageFrame widget and I would like it to show another image when I click on it. I'm having no luck with receiving a onclick via SEL_LEFTBUTTONRELEASE. ... imageframe=FXImageFrame.new(mainwindow,the_image,LAYOUT_EXPLICIT,0,0,20,20) imageframe.connect(SEL_LEFTBUTTONRELEASE) {p 'onclick received'} ... What is it that I'm missing? Thanks in advance, Mathijs. -- View this message in context: http://www.nabble.com/FXImageFrame-SEL_LEFTBUTTONRELEASE-tp16286969p16286969.html Sent from the FXRuby Users mailing list archive at Nabble.com. From lyle at lylejohnson.name Thu Mar 27 22:43:22 2008 From: lyle at lylejohnson.name (Lyle Johnson) Date: Thu, 27 Mar 2008 21:43:22 -0500 Subject: [fxruby-users] [ANN] Pre-release version of FXRuby binary gem for OS X Message-ID: <5A90D810-A8E9-404F-9D20-102E0990AF6C@lylejohnson.name> All, I've worked out some (but not yet all) of the kinks for building a binary (i.e. precompiled) gem for FXRuby on Mac OS X, that works with the built-in Ruby for OS X (Leopard). The idea is that you can use this without MacPorts, or even without Xcode installed -- just install the gem and go, just as you've been able to do on Windows. If you would like to help me test this, please contact me off-list and I'll let you know where to download a copy (it's not on the RubyForge site at this time). Thanks, Lyle --- "FXRuby: Create Lean and Mean GUIs with Ruby" Now available as a Beta book from the Pragmatic Bookshelf http://www.pragprog.com/titles/fxruby From lyle at lylejohnson.name Fri Mar 28 21:30:00 2008 From: lyle at lylejohnson.name (Lyle Johnson) Date: Fri, 28 Mar 2008 20:30:00 -0500 Subject: [fxruby-users] [ANN] FXRuby 1.6.14 Now Available Message-ID: All, FXRuby version 1.6.14 is now available for download from this page: http://rubyforge.org/frs/?group_id=300&release_id=20645 For a summary of the changes in this release of FXRuby, please see this page: http://www.fxruby.org/doc/changes.html As usual, the code is provided as a Win32 installer or a binary Gem (both compatible with the latest One-Click Installer for Ruby), as a source gem, and as a source tarball. New with this release is a binary gem for Mac OS X (Leopard) which is compatible with the built-in Ruby for that OS. For instructions on compiling FXRuby from source, please see: http://www.fxruby.org/doc/build.html And as always, the FXRuby home page is here: http://www.fxruby.org Enjoy, Lyle --- "FXRuby: Create Lean and Mean GUIs with Ruby" Now available as a Beta book from the Pragmatic Bookshelf http://www.pragprog.com/titles/fxruby From smparkes at smparkes.net Mon Mar 31 21:14:34 2008 From: smparkes at smparkes.net (Steven Parkes) Date: Mon, 31 Mar 2008 18:14:34 -0700 Subject: [fxruby-users] warning: method redefined Message-ID: <47BE2F886DFC43FAA09D3CB0E489C09E@windows.esseff.org> I usually develop with "ruby -d -w" ... Doing this with the 1.6.14 gem (against the 1.8 branch) gives: /usr/local/ruby_1_8-r15749/lib/ruby/gems/1.8/gems/fxruby-1.6.14/lib/fox16/co re.rb:219: warning: method redefined; discarding old readBoolEntry /usr/local/ruby_1_8-r15749/lib/ruby/gems/1.8/gems/fxruby-1.6.14/lib/fox16/co re.rb:227: warning: method redefined; discarding old writeBoolEntry /usr/local/ruby_1_8-r15749/lib/ruby/gems/1.8/gems/fxruby-1.6.14/lib/fox16/al iases.rb:3577: warning: method redefined; discarding old position /usr/local/ruby_1_8-r15749/lib/ruby/gems/1.8/gems/fxruby-1.6.14/lib/fox16/kw args.rb:82: warning: redefine listFonts I'm not sure if this is benign or not? From lyle at lylejohnson.name Mon Mar 31 23:07:25 2008 From: lyle at lylejohnson.name (Lyle Johnson) Date: Mon, 31 Mar 2008 22:07:25 -0500 Subject: [fxruby-users] warning: method redefined In-Reply-To: <47BE2F886DFC43FAA09D3CB0E489C09E@windows.esseff.org> References: <47BE2F886DFC43FAA09D3CB0E489C09E@windows.esseff.org> Message-ID: <84B44631-AE36-4D13-B028-2DC235D5F890@lylejohnson.name> On Mar 31, 2008, at 8:14 PM, Steven Parkes wrote: > I usually develop with "ruby -d -w" ... > > Doing this with the 1.6.14 gem (against the 1.8 branch) gives: > > /usr/local/ruby_1_8-r15749/lib/ruby/gems/1.8/gems/fxruby-1.6.14/lib/ > fox16/co > re.rb:219: warning: method redefined; discarding old readBoolEntry > /usr/local/ruby_1_8-r15749/lib/ruby/gems/1.8/gems/fxruby-1.6.14/lib/ > fox16/co > re.rb:227: warning: method redefined; discarding old writeBoolEntry > /usr/local/ruby_1_8-r15749/lib/ruby/gems/1.8/gems/fxruby-1.6.14/lib/ > fox16/al > iases.rb:3577: warning: method redefined; discarding old position > /usr/local/ruby_1_8-r15749/lib/ruby/gems/1.8/gems/fxruby-1.6.14/lib/ > fox16/kw > args.rb:82: warning: redefine listFonts > > I'm not sure if this is benign or not? It's benign, but I'll see about fixing those in the next release. --- "FXRuby: Create Lean and Mean GUIs with Ruby" Now available as a Beta book from the Pragmatic Bookshelf http://www.pragprog.com/titles/fxruby