From guerrantonio at libero.it Fri Jan 2 06:04:39 2009 From: guerrantonio at libero.it (guerrantonio at libero.it) Date: Fri, 2 Jan 2009 12:04:39 +0100 (CET) Subject: [fxruby-users] (no subject) Message-ID: <32079348.814351230894279041.JavaMail.defaultUser@defaultHost> I wrote this little program: ******************************************** #! /usr/bin/env ruby require 'fox16' require 'fox16/colors' include Fox class Finestra0 < FXMainWindow def initialize(app) # Initialize base class super (app, "PROGRAMMA", :opts => DECOR_ALL, :x => 20, :y => 20, :width => 600, : height => 400) # Create another integer data target to track the "progress" #@progressTarget = FXDataTarget.new(0) #@area = FXCanvas.new(self) # Menubar menubar = FXMenuBar.new(self, LAYOUT_SIDE_TOP|LAYOUT_FILL_X) # File menu filemenu = FXMenuPane.new(self) archivitabellemenu = FXMenuPane.new (self) FXMenuCommand.new(archivitabellemenu, "Line 11").connect (SEL_COMMAND) { #area = FXCanvas.new(self) #area.connect (SEL_LEFTBUTTONPRESS) do |canvas, sel, ev| #finestra = FXWindow.new (canvas, ev) finestra = FXWindow.new(self) #finestra.create finestra.show #end } FXMenuCommand.new(archivitabellemenu, "Line 12") FXMenuCommand.new(archivitabellemenu, "Line 13") FXMenuCommand.new(archivitabellemenu, "Line 14") FXMenuCommand.new (archivitabellemenu, "Line 15") FXMenuCommand.new(archivitabellemenu, "Line 16") FXMenuCommand.new(archivitabellemenu, "Line 17") FXMenuCommand.new (archivitabellemenu, "Line 18") FXMenuCascade.new(filemenu, "Line 1", : popupMenu => archivitabellemenu) FXMenuCommand.new(filemenu, "Line 2") FXMenuCommand.new(filemenu, "Line 3") FXMenuCommand.new(filemenu, "Line 4") FXMenuCommand.new(filemenu, "Line 5") FXMenuCommand.new(filemenu, "Line 6") FXMenuCommand.new(filemenu, "Line 7") amministrazionemenu = FXMenuPane.new (self) FXMenuCommand.new(amministrazionemenu, "Line 81") FXMenuCommand.new (amministrazionemenu, "Line 82") FXMenuCommand.new(amministrazionemenu, "Line 83") FXMenuCascade.new(filemenu, "Line 8", :popupMenu => amministrazionemenu) FXMenuSeparator.new(filemenu) FXMenuCommand.new(filemenu, "Line 9") FXMenuCommand.new(filemenu, "Informations").connect(SEL_COMMAND) { FXMessageBox.information(self, MBOX_OK, "GREETING", "Happy New Year by Italian") } FXMenuSeparator.new(filemenu) FXMenuCommand.new(filemenu, "Fine lavoro\tCtl-Z", nil, getApp(), FXApp::ID_QUIT) FXMenuTitle.new(menubar, "Menu Principale", nil, :popupMenu => filemenu) FXHorizontalSeparator.new (self, LAYOUT_SIDE_TOP|SEPARATOR_GROOVE|LAYOUT_FILL_X) end # Quit def onCmdQuit(sender, sel, ptr) getApp.exit(0) end # Start def create # Create window super # Show the main window #self.create show (PLACEMENT_SCREEN) end end if __FILE__ == $0 # Make an application application = FXApp.new("DataTarget", "FoxTest") # Create main window window = Finestra0.new(application) # Handle interrupts to quit application gracefully application.addSignal("SIGINT", window.method(:onCmdQuit)) # Create the application application.create # Run application.run end ********************************************* and clicking on line 11 I want to open another window with another menu. I tried a lot but to do it but window does not open: someone can help me in this matter? Italian From lcl at tarazed.demon.co.uk Sat Jan 3 12:52:02 2009 From: lcl at tarazed.demon.co.uk (Len Lawrence) Date: Sat, 03 Jan 2009 17:52:02 +0000 Subject: [fxruby-users] (no subject) In-Reply-To: <32079348.814351230894279041.JavaMail.defaultUser@defaultHost> References: <32079348.814351230894279041.JavaMail.defaultUser@defaultHost> Message-ID: <495FA5C2.7000407@tarazed.demon.co.uk> guerrantonio at libero.it wrote: > I wrote this little program: I am not sure I understand what you are trying to do. If you want another cascaded menu then it is straightforward. See my modified test program. Or are you trying to create a separate popup window with something or other in it? I must say I had no luck doing that. Back to the Fine Manual. #!/usr/bin/env ruby require 'rubygems' require 'fox16' require 'fox16/colors' include Fox class Finestra0 < FXMainWindow def initialize(app) # Initialize base class super(app, "PROGRAMMA", :opts => DECOR_ALL, :x => 20, :y => 20, :width => 600, :height => 400) # Create another integer data target to track the "progress" # @progressTarget = FXDataTarget.new(0) # @area = FXCanvas.new(self) # Menubar menubar = FXMenuBar.new(self, LAYOUT_SIDE_TOP|LAYOUT_FILL_X) # File menu filemenu = FXMenuPane.new(self) archivitabellemenu = FXMenuPane.new(self) tertiarymenu = FXMenuPane.new(self) # Vedi qui FXMenuCommand.new(tertiarymenu, "uno") FXMenuCommand.new(tertiarymenu, "due") FXMenuCommand.new(tertiarymenu, "tre") FXMenuCommand.new(tertiarymenu, "quattro") FXMenuCommand.new(tertiarymenu, "cinque") FXMenuCascade.new(archivitabellemenu, "Line 11", :popupMenu => tertiarymenu) FXMenuCommand.new(archivitabellemenu, "Line 12") FXMenuCommand.new(archivitabellemenu, "Line 13") FXMenuCommand.new(archivitabellemenu, "Line 14") FXMenuCommand.new(archivitabellemenu, "Line 15") FXMenuCommand.new(archivitabellemenu, "Line 16") FXMenuCommand.new(archivitabellemenu, "Line 17") FXMenuCommand.new(archivitabellemenu, "Line 18") FXMenuCascade.new(filemenu, "Line 1", :popupMenu => archivitabellemenu) FXMenuCommand.new(filemenu, "Line 2") FXMenuCommand.new(filemenu, "Line 3") FXMenuCommand.new(filemenu, "Line 4") FXMenuCommand.new(filemenu, "Line 5") FXMenuCommand.new(filemenu, "Line 6") FXMenuCommand.new(filemenu, "Line 7") amministrazionemenu = FXMenuPane.new(self) FXMenuCommand.new(amministrazionemenu, "Line 81") FXMenuCommand.new(amministrazionemenu, "Line 82") FXMenuCommand.new(amministrazionemenu, "Line 83") FXMenuCascade.new(filemenu, "Line 8", :popupMenu => amministrazionemenu) FXMenuSeparator.new(filemenu) FXMenuCommand.new(filemenu, "Line 9") FXMenuCommand.new(filemenu, "Informations").connect(SEL_COMMAND) { FXMessageBox.information(self, MBOX_OK,"GREETING","Happy New Year by Italian") } # Ed altre tanto FXMenuSeparator.new(filemenu) FXMenuCommand.new(filemenu, "Fine lavoro\tCtl-Z", nil, getApp(), FXApp::ID_QUIT) FXMenuTitle.new(menubar, "Menu Principale", nil, :popupMenu => filemenu) FXHorizontalSeparator.new(self, LAYOUT_SIDE_TOP|SEPARATOR_GROOVE|LAYOUT_FILL_X) end # Quit def onCmdQuit(sender, sel, ptr) getApp.exit(0) end # Start def create # Create window super # Show the main window #self.create show(PLACEMENT_SCREEN) end end if __FILE__ == $0 # Make an application FXApp.new("DataTarget", "FoxTest") do |application| # Create main window window = Finestra0.new(application) # Handle interrupts to quit application gracefully application.addSignal("SIGINT", window.method(:onCmdQuit)) # Create the application application.create # Run application.run end end ----------------------------------------------------------------------------------------------------------------- E felice nuovo anno Len From guerrantonio at libero.it Sat Jan 3 13:54:23 2009 From: guerrantonio at libero.it (guerrantonio at libero.it) Date: Sat, 3 Jan 2009 19:54:23 +0100 (CET) Subject: [fxruby-users] (no subject) Message-ID: <29008990.888481231008863564.JavaMail.defaultUser@defaultHost> Hi Len, thanks for your replay, but my proble is another. I want to open a new window with a new menu included and other widgets on it too. Then while I am using my little program, clicking on line 1 and then on line 11 I want to have a new window with a menu called line 11 and a submenu called uno, due, tre and so on. i am not able to do this. Bye Italian From lcl at tarazed.demon.co.uk Sat Jan 3 15:49:13 2009 From: lcl at tarazed.demon.co.uk (Len Lawrence) Date: Sat, 03 Jan 2009 20:49:13 +0000 Subject: [fxruby-users] (no subject) In-Reply-To: <29008990.888481231008863564.JavaMail.defaultUser@defaultHost> References: <29008990.888481231008863564.JavaMail.defaultUser@defaultHost> Message-ID: <495FCF49.8050900@tarazed.demon.co.uk> guerrantonio at libero.it wrote: > Hi Len, > thanks for your replay, but my proble is another. > > I want to open a > new window with a new menu included and other widgets on it too. > Then while I > am using my little program, clicking on line 1 and then on line 11 I want to > have a new window with a menu called line 11 and a submenu called uno, due, tre > and so on. > i am not able to do this. > > Bye > > Italian > _______________________________________________ > fxruby-users mailing list > fxruby-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/fxruby-users > Yes, I wondered if that is what you meant. Better leave it to the experts to follow up I suppose, but I shall think about it. Ciao Len From philippe.lang at attiksystem.ch Mon Jan 5 03:49:11 2009 From: philippe.lang at attiksystem.ch (Philippe Lang) Date: Mon, 5 Jan 2009 09:49:11 +0100 Subject: [fxruby-users] FXTable, SEL_REPLACED and modal dialogs Message-ID: Hi, I'm using the SEL_REPLACE event in FXTable to check at run-time that the values entered by the user are correct. In case of an error, I tried to show the error with an From philippe.lang at attiksystem.ch Mon Jan 5 04:00:12 2009 From: philippe.lang at attiksystem.ch (Philippe Lang) Date: Mon, 5 Jan 2009 10:00:12 +0100 Subject: [fxruby-users] FXTable, SEL_REPLACED and modal dialogs, 2nd Message-ID: Hi again, and sorry for the previous incomplete message. I'm using the SEL_REPLACE event in FXTable to check at run-time that the values entered by the user are correct. In case of an error, I tried to show the error with an FXMessageBox modal dialog, like in the following test code: ---------------------------------------------- #!/usr/bin/ruby require 'fox16' include Fox class MyWindow < FXMainWindow def initialize(app) super(app, "Window", nil, nil, DECOR_ALL, 0, 0, 600, 350) # Menu bar stretched along the top of the main window menubar = FXMenuBar.new(self, LAYOUT_SIDE_TOP|LAYOUT_FILL_X) # File menu filemenu = FXMenuPane.new(self) FXMenuTitle.new(menubar, "&File", nil, filemenu) FXMenuCommand.new(filemenu, "&Quit\tCtl-Q\tQuit the application", nil, app, FXApp::ID_QUIT) # Table f = FXHorizontalFrame.new(self, LAYOUT_FILL_X|LAYOUT_FILL_Y) t = FXTable.new(f, nil, 0, TABLE_COL_SIZABLE|LAYOUT_FILL_X|LAYOUT_FILL_Y) t.connect(SEL_REPLACED, method(:onReplaced)) t.visibleRows = 3 t.visibleColumns = 3 t.setTableSize(3, 3) end def create super show(PLACEMENT_SCREEN) end def onReplaced(sender, sel, data) FXMessageBox.information(self, MBOX_OK, "Error", "This is an error message.") end end if __FILE__ == $0 application = FXApp.new("Attik System", "FXRuby Test") MyWindow.new(application) application.create application.run end ---------------------------------------------- FXRuby or maybe fox itself gets confused after the modal dialog has been closed: although the mouse button has been released, FXTable cells selection follow the mouse. To reproduce the problem, do the following: 1) Click in a cell. 2) Type something in this cell. 3) Press TAB or click on another cell. An error message appears. Close it. 4) Move your cursor around on the table cells. Here is the problem. Is that a bug? And if yes, is there a workaround maybe? The only solution I found for this problem, is to use a non-modal dialog. No problem in this case. Best regards, Philippe Lang From lyle at lylejohnson.name Mon Jan 5 10:14:20 2009 From: lyle at lylejohnson.name (Lyle Johnson) Date: Mon, 5 Jan 2009 09:14:20 -0600 Subject: [fxruby-users] Proposing In-Reply-To: <997775070@web.de> References: <997775070@web.de> Message-ID: <6E407988-3A4A-4C57-BB86-E4878A7B68EC@lylejohnson.name> On Jan 4, 2009, at 5:08 AM, Helmut Hagemann wrote: > Have a suggestion for the umlauts German ???? ? > > with the function > reqiure 'iconv' > > def unicodetext (text) > if / mswin / = ~ PLATFORM > self.text = Iconv.inconv ( "UTF8", "CP1252", text) > else > #eg for linux > self.text = Iconv.inconv ( "UTF8", "ISO-8859-1", text) > end > end > > is that possible directly incorporated to display in windows chose > the Font with Unicode in the Name e.g. Arial Unicode for the ? sign Helmut, I don't understand exactly what you're asking (if you are indeed asking a question). FOX/FXRuby stores its string data as UTF-8 encoded Unicode. There's a brief article here about one approach to displaying Unicode strings in FXRuby: http://www.fxruby.org/doc/unicode.html As you've discovered, another approach is to use the "iconv" library to convert a string from some other encoding (e.g. CP1252 or ISO-8859-1) into the UTF-8 encoding needed by FOX. You also need to be sure that the widget that's displaying the text is using a Unicode font of some kind (like Microsoft's "Arial Unicode" font). Hope this helps, Lyle From lyle at lylejohnson.name Mon Jan 5 11:03:35 2009 From: lyle at lylejohnson.name (Lyle Johnson) Date: Mon, 5 Jan 2009 10:03:35 -0600 Subject: [fxruby-users] FXTable, SEL_REPLACED and modal dialogs, 2nd In-Reply-To: References: Message-ID: On Jan 5, 2009, at 3:00 AM, Philippe Lang wrote: > I'm using the SEL_REPLACE event in FXTable to check at run-time that > the > values entered by the user are correct. In case of an error, I tried > to > show the error with an FXMessageBox modal dialog, like in the > following > test code: > FXRuby or maybe fox itself gets confused after the modal dialog has > been > closed: although the mouse button has been released, FXTable cells > selection follow the mouse. > > To reproduce the problem, do the following: > > 1) Click in a cell. > 2) Type something in this cell. > 3) Press TAB or click on another cell. An error message appears. Close > it. > 4) Move your cursor around on the table cells. Here is the problem. Philippe, I am (so far) having trouble reproducing this bug. I've tried it both on OS X and Windows XP, using the latest release of FXRuby. What OS and version(s) of things are you working with? Thanks, Lyle From lyle at lylejohnson.name Mon Jan 5 15:28:20 2009 From: lyle at lylejohnson.name (Lyle Johnson) Date: Mon, 5 Jan 2009 14:28:20 -0600 Subject: [fxruby-users] again In-Reply-To: <999426642@web.de> References: <999426642@web.de> Message-ID: <8C229B14-82A3-4A3F-836E-82BE8C6AC664@lylejohnson.name> On Jan 5, 2009, at 12:58 PM, Helmut Hagemann wrote: > require 'fox16' > require 'iconv' > > > app = Fox::FXApp.new > > main = Fox::FXMainWindow.new(app, "EAN TOOL" ,nil,nil,Fox::DECOR_ALL, > 0,0,400,400,20,20,20,20) > str="???????@?" > button2=Fox::FXButton.new(main,str) > button2.font =Fox::FXFont.new(app, "Arial", 15,Fox::FONTWEIGHT_BOLD) > str=Iconv.iconv("UTF-8", "CP1252", str).to_s > button3=Fox::FXButton.new(main,str) > button3.font =Fox::FXFont.new(app, "Arial", 15,Fox::FONTWEIGHT_BOLD) > #str=Iconv.iconv("UTF-8", "CP1252", str).to_s > button1=Fox::FXButton.new(main,str) > button1.font =Fox::FXFont.new(app, "Arial Unicode", > 15,Fox::FONTWEIGHT_BOLD) > app.create > main.show(Fox::PLACEMENT_SCREEN) > app.run > > i think the way with Iconv is very short and so will integrate in > Fox16.so. You seem to be assuming that if the program's running on Windows, that the incoming strings (here, _str_) will always be in CP1252 encoding, and otherwise it will be in ISO-8859-1 encoding. That's not necessarily true. There is no general way (that I know of?) to deduce how a particular string of bytes is encoded. From philippe.lang at attiksystem.ch Mon Jan 5 16:20:36 2009 From: philippe.lang at attiksystem.ch (Philippe Lang) Date: Mon, 5 Jan 2009 22:20:36 +0100 Subject: [fxruby-users] =?utf-8?q?RE=C2=A0=3A__FXTable=2C_SEL=5FREPLACED_a?= =?utf-8?q?nd_modal_dialogs=2C_2nd?= References: Message-ID: > Philippe, > > I am (so far) having trouble reproducing this bug. I've tried it both > on OS X and Windows XP, using the latest release of FXRuby. What OS > and version(s) of things are you working with? Hi Lyle, I'm using the latest FXRuby, and a quite decent ruby enviroment too: --------------------------------- C:\Documents and Settings\Administrateur>ruby -v ruby 1.8.6 (2007-09-24 patchlevel 111) [i386-mswin32] C:\Documents and Settings\Administrateur>gem list *** LOCAL GEMS *** activerecord (2.0.5) Implements the ActiveRecord pattern for ORM. activesupport (2.0.5) Support and utility classes used by the Rails framework. fxri (0.3.6) Graphical interface to the RI documentation, with search engine. fxruby (1.6.18) FXRuby is the Ruby binding to the FOX GUI toolkit. gettext (1.9.0) Ruby-GetText-Package is a libary and tools to localize messages. hpricot (0.6) a swift, liberal HTML parser with a fantastic library log4r (1.0.5) Log4r is a comprehensive and flexible logging library for Ruby. postgres-pr (0.4.0) A pure Ruby interface to the PostgreSQL (>= 7.4) database rake (0.7.3) Ruby based make-like utility. rubyscript2exe (0.5.3) A Ruby Compiler sources (0.0.1) This package provides download sources for remote gem installation win32-api (1.0.4) A superior replacement for Win32API win32-clipboard (0.4.3) A package for interacting with the Windows clipboard win32-dir (0.3.2) Extra constants and methods for the Dir class on Windows. win32-eventlog (0.4.6) Interface for the MS Windows Event Log. win32-file (0.5.4) Extra or redefined methods for the File class on Windows. win32-file-stat (1.2.7) A File::Stat class tailored to MS Windows win32-process (0.5.3) Adds fork, wait, wait2, waitpid, waitpid2 and a special kill method win32-sapi (0.1.4) An interface to the MS SAPI (Sound API) library. win32-sound (0.4.1) A library for playing with sound on MS Windows. windows-api (0.2.0) An easier way to create methods using Win32API windows-pr (0.7.2) Windows functions and constants bundled via Win32::API --------------------------------- For the OS, I use Windows XP SP3, but I'm pretty sure the problem happens with SP2 too. I have just made some more tests, and I agree the problem doe not always happen if you follow my previous email. Here is how to reproduce the bug on my laptop: 1) Click on the top left cell 2) Type something in it 3) Click on any other cell 4) Close the dialog with the mouse 5) Move your cursor around on the FXTable without clicking I hope you can reproduce this strange thing... Best regards, Philippe Lang -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/ms-tnef Size: 8338 bytes Desc: not available URL: From lyle at lylejohnson.name Mon Jan 5 17:56:29 2009 From: lyle at lylejohnson.name (Lyle Johnson) Date: Mon, 5 Jan 2009 16:56:29 -0600 Subject: [fxruby-users] =?iso-8859-1?q?RE=A0=3A__FXTable=2C_SEL=5FREPLACED?= =?iso-8859-1?q?_and_modal_dialogs=2C_2nd?= In-Reply-To: References: Message-ID: <525E9E47-1498-4311-AA20-E0BF5AE0956B@lylejohnson.name> On Jan 5, 2009, at 3:20 PM, Philippe Lang wrote: > I have just made some more tests, and I agree the problem doe not > always happen if you follow my previous email. Here is how to > reproduce the bug on my laptop: > > 1) Click on the top left cell > > 2) Type something in it > > 3) Click on any other cell > > 4) Close the dialog with the mouse > > 5) Move your cursor around on the FXTable without clicking OK, yes, this I can reproduce. I'll look into it. Presumably a FOX bug, but maybe something we can work around. From chen_li3 at yahoo.com Mon Jan 5 19:44:41 2009 From: chen_li3 at yahoo.com (chen li) Date: Mon, 5 Jan 2009 16:44:41 -0800 (PST) Subject: [fxruby-users] How to iterate an array within an event Message-ID: <981324.43681.qm@web36808.mail.mud.yahoo.com> Hi all, I have an array and here is what I try to accomplish: click the @button_next,assign the first element to the radioButton of @radio click the @button_next again, assign the second element to the same radioButton (overwrite the text or update the text) and so on, untill all the elements are iterated. I write the codes as follows. But when I run it I only see the last element 5 on the @radio. I wonder someone can explain to me what is going on and help me fix it. Thanks, Li ################### def press_next @array=["1","2","3","4","5"] @array.each do |e| @button_next.connect(SEL_COMMAND) do @radio.text="#{e}" end end end From philippe.lang at attiksystem.ch Tue Jan 6 03:29:21 2009 From: philippe.lang at attiksystem.ch (Philippe Lang) Date: Tue, 6 Jan 2009 09:29:21 +0100 Subject: [fxruby-users] =?iso-8859-1?q?RE=A0=3A__FXTable=2C_SEL=5FREPLACED?= =?iso-8859-1?q?_and_modal_dialogs=2C_2nd?= References: <525E9E47-1498-4311-AA20-E0BF5AE0956B@lylejohnson.name> Message-ID: fxruby-users-bounces at rubyforge.org wrote: > OK, yes, this I can reproduce. I'll look into it. Presumably a FOX > bug, but maybe something we can work around. Hi Lyle, Here is a more complete example, closer to what I'm doing in my program, that shows one more thing: ---------------------------------- #!/usr/bin/ruby require 'fox16' include Fox class MyWindow < FXMainWindow def initialize(app) super(app, "Window", nil, nil, DECOR_ALL, 0, 0, 600, 350) # Menu bar stretched along the top of the main window menubar = FXMenuBar.new(self, LAYOUT_SIDE_TOP|LAYOUT_FILL_X) # File menu filemenu = FXMenuPane.new(self) FXMenuTitle.new(menubar, "&File", nil, filemenu) FXMenuCommand.new(filemenu, "&Quit\tCtl-Q\tQuit the application", nil, app, FXApp::ID_QUIT) # Table f = FXHorizontalFrame.new(self, LAYOUT_FILL_X|LAYOUT_FILL_Y) @table = FXTable.new(f, nil, 0, TABLE_COL_SIZABLE|LAYOUT_FILL_X|LAYOUT_FILL_Y) @table.connect(SEL_REPLACED, method(:onReplaced)) @table.visibleRows = 3 @table.visibleColumns = 3 @table.setTableSize(3, 3) end def create super show(PLACEMENT_SCREEN) end def onReplaced(sender, sel, data) # We simulate here an input error, where the user gets "stuck" in the table cell # as long as the value is not correct. In this test example, he is not very lucky, # everything he enters is wrong... # We cancel the current input @table.cancelInput # We display the modal dialog FXMessageBox.information(self, MBOX_OK, "Error", "This is an error message.") # We move to the current cell, and start a new input on it row = data.fm.row col = data.fm.col @table.selectItem(row, col) @table.setCurrentItem(row, col) @table.startInput(row, col) end end if __FILE__ == $0 application = FXApp.new("Attik System", "FXRuby Test") MyWindow.new(application) application.create application.run end ---------------------------------- First test: ----------- 1) Click on the top left cell 2) Type something in it 3) Validate the cell input with the return key 4) Close the dialog with the return key 5) That's fine Second test: ------------ 1) Click on the top left cell 2) Type something in it 3) Go to the next cell with the tab key 4) Close the dialog with the return key 5) That works, except the small dotted rectangle around the next cell, which should not be there in my opinion Third test: ----------- 1) Click on the top left cell 2) Type something in it 3) Click on any other cell 4) Close the dialog with the mouse 5) Move your mouse around the table cells, and enjoy! :) Regards, Philippe From lcl at tarazed.demon.co.uk Tue Jan 6 05:27:06 2009 From: lcl at tarazed.demon.co.uk (Len Lawrence) Date: Tue, 06 Jan 2009 10:27:06 +0000 Subject: [fxruby-users] FXTable, SEL_REPLACED and modal dialogs, 2nd In-Reply-To: References: Message-ID: <496331FA.2090908@tarazed.demon.co.uk> Lyle Johnson wrote: > > On Jan 5, 2009, at 3:00 AM, Philippe Lang wrote: > >> I'm using the SEL_REPLACE event in FXTable to check at run-time that the >> values entered by the user are correct. In case of an error, I tried to >> show the error with an FXMessageBox modal dialog, like in the following >> test code: > > > >> FXRuby or maybe fox itself gets confused after the modal dialog has been >> closed: although the mouse button has been released, FXTable cells >> selection follow the mouse. >> >> To reproduce the problem, do the following: >> >> 1) Click in a cell. >> 2) Type something in this cell. >> 3) Press TAB or click on another cell. An error message appears. Close >> it. >> 4) Move your cursor around on the table cells. Here is the problem. > > Philippe, > > I am (so far) having trouble reproducing this bug. I've tried it both > on OS X and Windows XP, using the latest release of FXRuby. What OS > and version(s) of things are you working with? > > Thanks, > > Lyle > _______________________________________________ > fxruby-users mailing list > fxruby-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/fxruby-users > It reproduces on linux here for button presses but not for tabs. Len From lyle at lylejohnson.name Tue Jan 6 12:38:04 2009 From: lyle at lylejohnson.name (Lyle Johnson) Date: Tue, 6 Jan 2009 11:38:04 -0600 Subject: [fxruby-users] How to iterate an array within an event In-Reply-To: <981324.43681.qm@web36808.mail.mud.yahoo.com> References: <981324.43681.qm@web36808.mail.mud.yahoo.com> Message-ID: <57cf8f720901060938l312b6fe3l6e8a0896c2d045aa@mail.gmail.com> On Mon, Jan 5, 2009 at 6:44 PM, chen li wrote: > I have an array and here is what I try to accomplish: > > click the @button_next,assign the first element to the radioButton of @radio > > click the @button_next again, assign the second element to the same radioButton (overwrite the text or update the text) > > and so on, untill all the elements are iterated. > > > I write the codes as follows. But when I run it I only see the last element 5 on the @radio. I wonder someone can > explain to me what is going on and help me fix it. Your loop over the array elements is currently written this way: @array.each do |e| @button_next.connect(SEL_COMMAND) do @radio.text="#{e}" end end This is equivalent to (for example): @button_next.connect(SEL_COMMAND) { @radio.text = "#{@array[0]}" } @button_next.connect(SEL_COMMAND) { @radio.text = "#{@array[1]}" } @button_next.connect(SEL_COMMAND) { @radio.text = "#{@array[2]}" } @button_next.connect(SEL_COMMAND) { @radio.text = "#{@array[3]}" } @button_next.connect(SEL_COMMAND) { @radio.text = "#{@array[4]}" } Do you see now why clicking @button_next just changes the radio button's text to "5"? Every time you call @button_next.connect(), you've overwriting the previous block that you had associated with that event. You need to do something to keep track of what the current value of the radio button is, and increment that value each time @button_next is clicked. For this particular example, the following code ought to work: @array=["1","2","3","4","5"] @current_index = 0 @radio.text = "#{@array[@current_index}" @button_next.connect(SEL_COMMAND) do @current_index = @current_index + 1 @current_index = 0 if @current_index >= @array.length @radio.text = "#{@array[@current_index}" end I'm guessing your real code has a more complicated data structure, but this is the idea. Hope this helps, Lyle From chen_li3 at yahoo.com Tue Jan 6 16:17:33 2009 From: chen_li3 at yahoo.com (chen li) Date: Tue, 6 Jan 2009 13:17:33 -0800 (PST) Subject: [fxruby-users] How to iterate an array within an event In-Reply-To: <57cf8f720901060938l312b6fe3l6e8a0896c2d045aa@mail.gmail.com> Message-ID: <875214.56860.qm@web36803.mail.mud.yahoo.com> Hi Lyle, Thank you very much. I think I grasp the idea/format on how to do the iteration in FXRuby by reading your code. One more question: I want to iterate a slice(here is 5) from an array. Here is my code. Is it the best way to iterate a slice? Li ###################### def press_next @all=("1".."1000") index1=0 index2=1 index3=2 index4=3 index5=4 @button_next.connect(SEL_COMMAND) do index1,index2,index3,index4,index5=[index1,index2,index3,index4,index5].sort_by{rand} @radio1.text=@all[index1] @radio2.text=@all[index2] @radio3.text=@all[index3] @radio4.text=@all[index4] @radio5.text=@all[index5] index1 +=5 index2 +=5 index3 +=5 index4 +=5 index5 +=5 end end From lyle at lylejohnson.name Tue Jan 6 17:51:29 2009 From: lyle at lylejohnson.name (Lyle Johnson) Date: Tue, 6 Jan 2009 16:51:29 -0600 Subject: [fxruby-users] How to iterate an array within an event In-Reply-To: <875214.56860.qm@web36803.mail.mud.yahoo.com> References: <875214.56860.qm@web36803.mail.mud.yahoo.com> Message-ID: On Jan 6, 2009, at 3:17 PM, chen li wrote: > One more question: I want to iterate a slice(here is 5) from an > array. Here is my code. Is it the best way to iterate a slice? I think you probably want to make the index counters (index1, index2, ...) instance variables instead of local variables. But I guess it's OK otherwise. From chen_li3 at yahoo.com Wed Jan 7 09:56:24 2009 From: chen_li3 at yahoo.com (chen li) Date: Wed, 7 Jan 2009 06:56:24 -0800 (PST) Subject: [fxruby-users] How to iterate an array automatically Message-ID: <898515.752.qm@web36807.mail.mud.yahoo.com> >I think you probably want to make the index counters (index1, >index2, ...) instance variables instead of local variables. But I >guess it's OK otherwise. Hi Lyle, Thank you very much. Now I want to iterate the array automatically on "the radio" once I press the button(instead press it 5 times). How do I modify the codes below to implement it? Thanks, Li def press_next @array=["1","2","3","4","5"] @current_index = 0 @radio.text = "#{@array[@current_index}" @button_next.connect(SEL_COMMAND) do @current_index = @current_index + 1 @current_index = 0 if @current_index >= @array.length @radio.text = "#{@array[@current_index}" end end From guerrantonio at libero.it Wed Jan 7 16:30:35 2009 From: guerrantonio at libero.it (guerrantonio at libero.it) Date: Wed, 7 Jan 2009 22:30:35 +0100 (CET) Subject: [fxruby-users] (no subject) Message-ID: <29013078.1064361231363835318.JavaMail.defaultUser@defaultHost> Hi to all, it seems me you lost the right way discussing about other (interesting) problems. I found the right solution on Lyle Johnson's book (last chapter): the solution is to open a DialogBox and to fill it by widgets I need. It works as I want: it opens a new window with another menu. But I don know how to close it by menu now. Next days I will send my code: I hope someone con improve it. Thanks to all for your answers and help. Italian From wbparsons at cshore.com Wed Jan 7 17:22:53 2009 From: wbparsons at cshore.com (William B. Parsons) Date: Wed, 7 Jan 2009 17:22:53 -0500 Subject: [fxruby-users] selective disabling of text entry in a FXTable Message-ID: <20090107172253.66200b0c.wbparsons@cshore.com> Hello, I'm working on my first application using FXRuby, and am trying to disable text entry in certain columns of a FXTable, but calling disableItem() on a cell doesn't seem to prevent editing a cell. Do I misunderstand the use of disableItem()? The following test program illustrates what I'm trying to do: ---------------------------- #!/usr/bin/env ruby require 'fox16' include Fox class TestTable < FXTable def initialize(p, title) super(p, :opts => LAYOUT_FILL|HSCROLLING_OFF) setTableSize(0, 3) column_label = [ "A", "B", "C" ] column_label.each_index { |i| setColumnText(i, column_label[i]) } connect(SEL_KEYRELEASE) do |sender, selector, event| puts "cell #{currentRow}, #{currentColumn} "+ "#{itemEnabled?(currentRow, currentColumn)?'en':'dis'}abled" end end def add_row(label) n = getNumRows insertRows(n) setRowText(n, label) disableItem(n, 2) end end class TopLevelWindow < FXMainWindow def initialize(app) super(app, 'Test', :width => 400, :height => 90) w = TestTable.new(self, "Test") w.add_row("X") w.add_row("Y") w.add_row("Z") end def create super show(PLACEMENT_SCREEN) end end FXApp.new('Test', 'Wikareia') do |app| TopLevelWindow.new(app) app.create app.run end -- William B. Parsons From chen_li3 at yahoo.com Wed Jan 7 18:48:34 2009 From: chen_li3 at yahoo.com (chen li) Date: Wed, 7 Jan 2009 15:48:34 -0800 (PST) Subject: [fxruby-users] update question Message-ID: <792985.6550.qm@web36806.mail.mud.yahoo.com> Hi all, I want to update the text of a radio button with each element from an array. I try two methods a) and b). Method a) is working but b) isn't. What do I do wrong about method b)? What is the rubyist way to update the text of a button? Thanks, Li ############method a ########## def press_next @all=("1".."100").to_a @button_next.connect(SEL_COMMAND) do @all.each do |e| ###app.addTimeout(1*1000){@radio1.text=e} @radio1.text=e 100.times{app.runOneEvent;sleep 0.01} end end end ##########method b################## def press_next @all=("1".."100").to_a @button_next.connect(SEL_COMMAND) do @all.each do |e| app.addTimeout(1*1000){@radio1.text=e} ###@radio1.text=e ###100.times{app.runOneEvent;sleep 0.01} end end end From lyle at lylejohnson.name Fri Jan 9 15:07:00 2009 From: lyle at lylejohnson.name (Lyle Johnson) Date: Fri, 9 Jan 2009 14:07:00 -0600 Subject: [fxruby-users] selective disabling of text entry in a FXTable In-Reply-To: <20090107172253.66200b0c.wbparsons@cshore.com> References: <20090107172253.66200b0c.wbparsons@cshore.com> Message-ID: On Jan 7, 2009, at 4:22 PM, William B. Parsons wrote: > I'm working on my first application using FXRuby, and am trying to > disable > text entry in certain columns of a FXTable, but calling > disableItem() on > a cell doesn't seem to prevent editing a cell. Do I misunderstand > the use > of disableItem()? This appears to be a bug in FOX (so I'm Cc'ing the FOX list). Looking at the source code for FXTable, I see a few checks on the enabled/ disabled state of table items, to determine whether or not they can be added to a selection, but that seems to be it. From philippe.lang at attiksystem.ch Tue Jan 13 03:39:19 2009 From: philippe.lang at attiksystem.ch (Philippe Lang) Date: Tue, 13 Jan 2009 09:39:19 +0100 Subject: [fxruby-users] No more GUI update after FXRuby app put in the background? Message-ID: Hi, Here is a small program that represents the GUI I use for deploying FXRuby applications: a small window, with a progress bar in it. It works fine, as long as the application is not put in the background. Then the GUI stops being updated, even if the application is put back to the foreground again. Is there anything I can do for this? Thanks, Philippe Lang Note: Windows XP, ruby 1.8.6, FXRuby 1.6.18 ------------------------------- #!/usr/bin/ruby require 'fox16' include Fox class MyWindow < FXMainWindow def initialize(app, title, icon=nil, miniIcon=nil, opts=DECOR_ALL, x=0, y=0, width=0, height=0, padLeft=0, padRight=0, padTop=0, padBottom=0, hSpacing=4, vSpacing=4) super @bar = FXProgressBar.new(self, nil, 0, PROGRESSBAR_PERCENTAGE|LAYOUT_FILL_X) @label = FXLabel.new(self, "") end def deploy setTotal(100) setProgress(0, "Step 0") sleep 1 setProgress(10, "Step 1") sleep 1 setProgress(20, "Step 2") sleep 1 setProgress(30, "Step 3") sleep 1 setProgress(40, "Step 4") sleep 1 setProgress(50, "Step 5") sleep 1 setProgress(60, "Step 6") sleep 1 setProgress(70, "Step 7") sleep 1 setProgress(80, "Step 8") sleep 1 setProgress(90, "Step 9") sleep 1 setProgress(100, "Step 10") end def setTotal(progress_total) @bar.total = progress_total end def setProgress(progress_value, progress_text) @bar.progress = progress_value @label.text = progress_text # Let's try all the armada of refresh-redraw-repaint-everything NOW. update recalc layout repaint $app.forceRefresh end end class MyApp < FXApp def initialize(appName="Application", vendorName="FoxDefault") super @window = MyWindow.new(self, "Deployment", nil, nil, DECOR_ALL, 0, 0, 300, 40) end def create begin super @window.show(PLACEMENT_SCREEN) @window.deploy @window.close rescue Exception => e end end end # Main program GC.disable # Does not help $app = MyApp.new() $app.disableThreads # Does not help $app.create ------------------------------- From philippe.lang at attiksystem.ch Tue Jan 13 04:42:04 2009 From: philippe.lang at attiksystem.ch (Philippe Lang) Date: Tue, 13 Jan 2009 10:42:04 +0100 Subject: [fxruby-users] No more GUI update after FXRuby app put in thebackground? References: Message-ID: fxruby-users-bounces at rubyforge.org wrote: > Hi, > > Here is a small program that represents the GUI I use for deploying > FXRuby applications: a small window, with a progress bar in it. > > It works fine, as long as the application is not put in the > background. > Then the GUI stops being updated, even if the application is put back > to the foreground again. > > Is there anything I can do for this? Hi again, I found the solution, I hope it can help someone: the trick is to call "$app.runWhileEvents" now and then, to give a chance to fox to process OS events... I should have remembered that before... ! ------------------- #!/usr/bin/ruby require 'fox16' include Fox class MyWindow < FXMainWindow def initialize(app, title, icon=nil, miniIcon=nil, opts=DECOR_ALL, x=0, y=0, width=0, height=0, padLeft=0, padRight=0, padTop=0, padBottom=0, hSpacing=4, vSpacing=4) super @bar = FXProgressBar.new(self, nil, 0, PROGRESSBAR_PERCENTAGE|LAYOUT_FILL_X) @label = FXLabel.new(self, "") end def deploy setTotal(100) setProgress(0, "Step 0") sleep 1 setProgress(10, "Step 1") sleep 1 setProgress(20, "Step 2") sleep 1 setProgress(30, "Step 3") sleep 1 setProgress(40, "Step 4") sleep 1 setProgress(50, "Step 5") sleep 1 setProgress(60, "Step 6") sleep 1 setProgress(70, "Step 7") sleep 1 setProgress(80, "Step 8") sleep 1 setProgress(90, "Step 9") sleep 1 setProgress(100, "Step 10") end def setTotal(progress_total) @bar.total = progress_total end def setProgress(progress_value, progress_text) @bar.progress = progress_value @label.text = progress_text layout $app.runWhileEvents end end class MyApp < FXApp def initialize(appName="Application", vendorName="FoxDefault") super @window = MyWindow.new(self, "Deployment", nil, nil, DECOR_ALL, 0, 0, 300, 40) end def create begin super @window.show(PLACEMENT_SCREEN) @window.deploy @window.close rescue Exception => e end end end # Main program GC.disable $app = MyApp.new() $app.disableThreads $app.create From mr_nice66 at yahoo.com Thu Jan 15 16:43:51 2009 From: mr_nice66 at yahoo.com (James Hibbard) Date: Thu, 15 Jan 2009 13:43:51 -0800 (PST) Subject: [fxruby-users] Vista issues Message-ID: <510229.99982.qm@web55606.mail.re4.yahoo.com> Hi, I wrote a GUI using FXRuby under WinXP. I then upgraded to Vista, installed Ruby (and thus by default FXRuby) and ran my GUI. It was then that I noticed that the colours have gone weird. The main user interface is now white (the default colour that Vista uses), but all of the data targets and tables have remained beige (RGB 236, 233, 216). Of course one can individualy declare a white background colour for each of these widgets, but then it looks garish if run on XP or Linux. Is there any setting I can apply to make the colour for the application uniform and overide the system default. I already tried such things as app.backColour = FXRGB(236, 233, 216). I also noticed that the FXShutter doesn't work properly under Vista. When you click on the various shutter items, it just flicks from one item to the next without the smooth animation in between. It just flicks from one shutter button to the next in one frame. Is there any way of fixing this, or should I just can Vista and go back to XP. Thanks in advance for any advice. -------------- next part -------------- An HTML attachment was scrubbed... URL: From jeroen at fox-toolkit.org Thu Jan 15 18:01:32 2009 From: jeroen at fox-toolkit.org (Jeroen van der Zijp) Date: Thu, 15 Jan 2009 17:01:32 -0600 Subject: [fxruby-users] Vista issues In-Reply-To: <510229.99982.qm@web55606.mail.re4.yahoo.com> References: <510229.99982.qm@web55606.mail.re4.yahoo.com> Message-ID: <200901151701.32934.jeroen@fox-toolkit.org> On Thursday 15 January 2009, James Hibbard wrote: > Hi, > > I wrote a GUI using FXRuby under WinXP. > I then upgraded to Vista, installed Ruby (and thus by default FXRuby) and ran my GUI. > It was then that I noticed that the colours have gone weird. > The main user interface is now white (the default colour that Vista uses), but all of the data targets and tables have remained beige (RGB 236, 233, 216). > Of course one can individualy declare a white background colour for each of these widgets, but then it looks garish if run on XP or Linux. > Is there any setting I can apply to make the colour for the application uniform and overide the system default. > I already tried such things as app.backColour = FXRGB(236, 233, 216). > You should be able to run the FOX ControlPanel application and change color schemes; normally, FOX fishes its colors from the Windows GUI control registry; this works pretty good on 2K and XP. I don't have Vista myself so I never noticed the problem. > I also noticed that the FXShutter doesn't work properly under Vista. When you click on the various shutter items, it just flicks from one item to the next without the smooth animation in between. > It just flicks from one shutter button to the next in one frame. > Is there any way of fixing this, or should I just can Vista and go back to XP. I don't know what's up with the shutter under Vista. I can't say I have any idea why you're seeing this, since its supposed to do all the timing completely inside FOX. I'm not sure if you're able to research this issue or not; I'd like to fix it if other people experience this also. - Jeroen From wbparsons at cshore.com Thu Jan 15 20:34:23 2009 From: wbparsons at cshore.com (William B. Parsons) Date: Thu, 15 Jan 2009 20:34:23 -0500 Subject: [fxruby-users] selective disabling of text entry in a FXTable (again) Message-ID: <20090115203423.c2681878.wbparsons@cshore.com> Hello, I originally sent the following query to the FXRuby mailing list, but as it seems to be a FOX issue, Lyle Johnson forwarded it to the main FOX list. There has been no reply, so is this a FOX bug or a misunderstanding on my part? Lyle Johnson wrote: > > On Jan 7, 2009, at 4:22 PM, William B. Parsons wrote: > >> I'm working on my first application using FXRuby, and am trying to >> disable >> text entry in certain columns of a FXTable, but calling >> disableItem() on >> a cell doesn't seem to prevent editing a cell. Do I misunderstand >> the use >> of disableItem()? > > This appears to be a bug in FOX (so I'm Cc'ing the FOX list). Looking > at the source code for FXTable, I see a few checks on the enabled/ > disabled state of table items, to determine whether or not they can be > added to a selection, but that seems to be it. -- Will From jeroen at fox-toolkit.org Fri Jan 16 00:55:54 2009 From: jeroen at fox-toolkit.org (Jeroen van der Zijp) Date: Thu, 15 Jan 2009 23:55:54 -0600 Subject: [fxruby-users] selective disabling of text entry in a FXTable (again) In-Reply-To: <20090115203423.c2681878.wbparsons@cshore.com> References: <20090115203423.c2681878.wbparsons@cshore.com> Message-ID: <200901152355.54962.jeroen@fox-toolkit.org> On Thursday 15 January 2009, William B. Parsons wrote: > Hello, > > I originally sent the following query to the FXRuby mailing list, but as > it seems to be a FOX issue, Lyle Johnson forwarded it to the main FOX list. > There has been no reply, so is this a FOX bug or a misunderstanding on my > part? The original intent of "disabled item" was that it wasn't selectable; however, I do believe "not-editable" may be a better interpretation of this flag, at least for FXTable.... I will fix this for 1.7... Regards, - Jeroen -- +----------------------------------------------------------------------------+ | Copyright (C) 22:10 01/15/2009 Jeroen van der Zijp. All Rights Reserved. | +----------------------------------------------------------------------------+ From mr_nice66 at yahoo.com Fri Jan 16 03:34:07 2009 From: mr_nice66 at yahoo.com (James Hibbard) Date: Fri, 16 Jan 2009 00:34:07 -0800 (PST) Subject: [fxruby-users] Vista issues References: <510229.99982.qm@web55606.mail.re4.yahoo.com> <200901151701.32934.jeroen@fox-toolkit.org> Message-ID: <339539.91471.qm@web55602.mail.re4.yahoo.com> Thanks for the reply Jeroen, >You should be able to run the FOX ControlPanel application and change color schemes; normally, >FOX fishes its colors from the Windows GUI control registry; this works pretty good on 2K and XP. It's probably a silly question, but how can I access the FOX ControlPanel application? I tried Googling and consulting the PP FXRuby book, but couldn't find anything. >I don't know what's up with the shutter under Vista. I can't say I have any idea why you're >seeing this, since its supposed to do all the timing completely inside FOX. I would have thought so too. >I'm not sure if you're able to research this issue or not; >I'd like to fix it if other people experience this also. Certainly willing if not able. If you can give me any pointers as to what I could do to research it, I will do so. We have a couple of machines running Vista at work, so I could try and recreate the situation there. Cheers Jim ________________________________ From: Jeroen van der Zijp To: fxruby-users at rubyforge.org Sent: Friday, 16 January, 2009 0:01:32 Subject: Re: [fxruby-users] Vista issues On Thursday 15 January 2009, James Hibbard wrote: > Hi, > > I wrote a GUI using FXRuby under WinXP. > I then upgraded to Vista, installed Ruby (and thus by default FXRuby) and ran my GUI. > It was then that I noticed that the colours have gone weird. > The main user interface is now white (the default colour that Vista uses), but all of the data targets and tables have remained beige (RGB 236, 233, 216). > Of course one can individualy declare a white background colour for each of these widgets, but then it looks garish if run on XP or Linux. > Is there any setting I can apply to make the colour for the application uniform and overide the system default. > I already tried such things as app.backColour = FXRGB(236, 233, 216). > You should be able to run the FOX ControlPanel application and change color schemes; normally, FOX fishes its colors from the Windows GUI control registry; this works pretty good on 2K and XP. I don't have Vista myself so I never noticed the problem. > I also noticed that the FXShutter doesn't work properly under Vista. When you click on the various shutter items, it just flicks from one item to the next without the smooth animation in between. > It just flicks from one shutter button to the next in one frame. > Is there any way of fixing this, or should I just can Vista and go back to XP. I don't know what's up with the shutter under Vista. I can't say I have any idea why you're seeing this, since its supposed to do all the timing completely inside FOX. I'm not sure if you're able to research this issue or not; I'd like to fix it if other people experience this also. - Jeroen _______________________________________________ fxruby-users mailing list fxruby-users at rubyforge.org http://rubyforge.org/mailman/listinfo/fxruby-users -------------- next part -------------- An HTML attachment was scrubbed... URL: From philippe.lang at attiksystem.ch Fri Jan 16 05:24:39 2009 From: philippe.lang at attiksystem.ch (Philippe Lang) Date: Fri, 16 Jan 2009 11:24:39 +0100 Subject: [fxruby-users] Vista issues References: <510229.99982.qm@web55606.mail.re4.yahoo.com> Message-ID: > Hi, > > I also noticed that the FXShutter doesn't work properly under Vista. > When you click on the various shutter items, it just flicks from one > item to the next without the smooth animation in between. > It just flicks from one shutter button to the next in one frame. > Is there any way of fixing this, or should I just can Vista and go back to XP. Hi, I'm not using the FXShutter widget myself, so I'm not sure how it's supposed to work, but I have just run the FXShutter example here: http://www.fxruby.org/examples/shutter.rb ... And I don't see the smooth animation effect you are talking about, although I use XP as well. (I have disactivated the icons load, it's not supposed to change anything, right?) Maybe your XP machine is so old that your funny smooth effect is in fact a huge slowdow in screen redraw? :) Just kidding... Philippe Lang From mr_nice66 at yahoo.com Fri Jan 16 07:00:50 2009 From: mr_nice66 at yahoo.com (James Hibbard) Date: Fri, 16 Jan 2009 04:00:50 -0800 (PST) Subject: [fxruby-users] Vista issues References: <510229.99982.qm@web55606.mail.re4.yahoo.com> Message-ID: <43643.47959.qm@web55603.mail.re4.yahoo.com> Hi, So, referring to shutter.rb Supposing you have the 'Lookout shortcuts' shutter item selected (you can see 'Lookout today', 'Inbox', 'Calendar', 'Contacts' etc) When you click on the shutter item below it, does it smoothly scroll up to nest underneath the 'Lookout shortcuts' item, or does it just spring up there in one frame? When running this under XP I got the first effect (smooth scrolling), when running it under Vista I got the second effect (jumpy frames). Do I understand it correctly that you get the jumpy frames effect in both XP and Vista, or just in XP? Cheers for looking into this. Jim P.S. under windows the shutter programme can be found here - no need to deactivate ithe icons :) C:\ruby\lib\ruby\gems\1.8\gems\fxruby-1.6.12-mswin32\examples ________________________________ From: Philippe Lang To: fxruby-users at rubyforge.org Sent: Friday, 16 January, 2009 11:24:39 Subject: Re: [fxruby-users] Vista issues > Hi, > > I also noticed that the FXShutter doesn't work properly under Vista. > When you click on the various shutter items, it just flicks from one > item to the next without the smooth animation in between. > It just flicks from one shutter button to the next in one frame. > Is there any way of fixing this, or should I just can Vista and go back to XP. Hi, I'm not using the FXShutter widget myself, so I'm not sure how it's supposed to work, but I have just run the FXShutter example here: http://www.fxruby.org/examples/shutter.rb ... And I don't see the smooth animation effect you are talking about, although I use XP as well. (I have disactivated the icons load, it's not supposed to change anything, right?) Maybe your XP machine is so old that your funny smooth effect is in fact a huge slowdow in screen redraw? :) Just kidding... Philippe Lang _______________________________________________ fxruby-users mailing list fxruby-users at rubyforge.org http://rubyforge.org/mailman/listinfo/fxruby-users -------------- next part -------------- An HTML attachment was scrubbed... URL: From philippe.lang at attiksystem.ch Fri Jan 16 08:06:59 2009 From: philippe.lang at attiksystem.ch (Philippe Lang) Date: Fri, 16 Jan 2009 14:06:59 +0100 Subject: [fxruby-users] Vista issues References: <510229.99982.qm@web55606.mail.re4.yahoo.com> <43643.47959.qm@web55603.mail.re4.yahoo.com> Message-ID: Hi again, I have just run shutter.rb (from the example folder, thanks! :)) under XP, and no scrolling effet at all on my computer. When I click on the shutter, change are immediate, no effect or whatever. Have you made tests on other XP computers? _____ De : fxruby-users-bounces at rubyforge.org [mailto:fxruby-users-bounces at rubyforge.org] De la part de James Hibbard Envoy? : vendredi, 16. janvier 2009 13:01 ? : fxruby-users at rubyforge.org Objet : Re: [fxruby-users] Vista issues Hi, So, referring to shutter.rb Supposing you have the 'Lookout shortcuts' shutter item selected (you can see 'Lookout today', 'Inbox', 'Calendar', 'Contacts' etc) When you click on the shutter item below it, does it smoothly scroll up to nest underneath the 'Lookout shortcuts' item, or does it just spring up there in one frame? When running this under XP I got the first effect (smooth scrolling), when running it under Vista I got the second effect (jumpy frames). Do I understand it correctly that you get the jumpy frames effect in both XP and Vista, or just in XP? Cheers for looking into this. Jim P.S. under windows the shutter programme can be found here - no need to deactivate ithe icons :) C:\ruby\lib\ruby\gems\1.8\gems\fxruby-1.6.12-mswin32\examples _____ From: Philippe Lang To: fxruby-users at rubyforge.org Sent: Friday, 16 January, 2009 11:24:39 Subject: Re: [fxruby-users] Vista issues > Hi, > > I also noticed that the FXShutter doesn't work properly under Vista. > When you click on the various shutter items, it just flicks from one > item to the next without the smooth animation in between. > It just flicks from one shutter button to the next in one frame. > Is there any way of fixing this, or should I just can Vista and go back to XP. Hi, I'm not using the FXShutter widget myself, so I'm not sure how it's supposed to work, but I have just run the FXShutter example here: http://www.fxruby.org/examples/shutter.rb ... And I don't see the smooth animation effect you are talking about, although I use XP as well. (I have disactivated the icons load, it's not supposed to change anything, right?) Maybe your XP machine is so old that your funny smooth effect is in fact a huge slowdow in screen redraw? :) Just kidding... Philippe Lang _______________________________________________ fxruby-users mailing list fxruby-users at rubyforge.org http://rubyforge.org/mailman/listinfo/fxruby-users -------------- next part -------------- An HTML attachment was scrubbed... URL: From mr_nice66 at yahoo.com Fri Jan 16 09:39:26 2009 From: mr_nice66 at yahoo.com (James Hibbard) Date: Fri, 16 Jan 2009 06:39:26 -0800 (PST) Subject: [fxruby-users] Vista issues References: <510229.99982.qm@web55606.mail.re4.yahoo.com> <43643.47959.qm@web55603.mail.re4.yahoo.com> Message-ID: <537941.3734.qm@web55608.mail.re4.yahoo.com> Hello, Only on my wife's laptop and under Ubuntu Linux. There the scolling effect worked like a charm. At the end of the day it is not the most major issue as the program still functions exactly like it should, but the effect was actually really neat! Maybe a couple of other people could have a look if the effect works on their computers? ________________________________ From: Philippe Lang To: fxruby-users at rubyforge.org Sent: Friday, 16 January, 2009 14:06:59 Subject: Re: [fxruby-users] Vista issues Hi again, I have just run shutter.rb (from the example folder, thanks! :)) under XP, and no scrolling effet at all on my computer. When I click on the shutter, change are immediate, no effect or whatever. Have you made tests on other XP computers? ________________________________ De : fxruby-users-bounces at rubyforge.org [mailto:fxruby-users-bounces at rubyforge.org] De la part de James Hibbard Envoy? : vendredi, 16. janvier 2009 13:01 ? : fxruby-users at rubyforge.org Objet : Re: [fxruby-users] Vista issues Hi, So, referring to shutter.rb Supposing you have the 'Lookout shortcuts' shutter item selected (you can see 'Lookout today', 'Inbox', 'Calendar', 'Contacts' etc) When you click on the shutter item below it, does it smoothly scroll up to nest underneath the 'Lookout shortcuts' item, or does it just spring up there in one frame? When running this under XP I got the first effect (smooth scrolling), when running it under Vista I got the second effect (jumpy frames). Do I understand it correctly that you get the jumpy frames effect in both XP and Vista, or just in XP? Cheers for looking into this. Jim P.S. under windows the shutter programme can be found here - no need to deactivate ithe icons :) C:\ruby\lib\ruby\gems\1.8\gems\fxruby-1.6.12-mswin32\examples ________________________________ From: Philippe Lang To: fxruby-users at rubyforge.org Sent: Friday, 16 January, 2009 11:24:39 Subject: Re: [fxruby-users] Vista issues > Hi, > > I also noticed that the FXShutter doesn't work properly under Vista. > When you click on the various shutter items, it just flicks from one > item to the next without the smooth animation in between. > It just flicks from one shutter button to the next in one frame. > Is there any way of fixing this, or should I just can Vista and go back to XP. Hi, I'm not using the FXShutter widget myself, so I'm not sure how it's supposed to work, but I have just run the FXShutter example here: http://www.fxruby.org/examples/shutter.rb ... And I don't see the smooth animation effect you are talking about, although I use XP as well. (I have disactivated the icons load, it's not supposed to change anything, right?) Maybe your XP machine is so old that your funny smooth effect is in fact a huge slowdow in screen redraw? :) Just kidding... Philippe Lang _______________________________________________ fxruby-users mailing list fxruby-users at rubyforge.org http://rubyforge.org/mailman/listinfo/fxruby-users -------------- next part -------------- An HTML attachment was scrubbed... URL: From lcl at tarazed.demon.co.uk Fri Jan 16 14:26:32 2009 From: lcl at tarazed.demon.co.uk (Len Lawrence) Date: Fri, 16 Jan 2009 19:26:32 +0000 Subject: [fxruby-users] Vista issues In-Reply-To: References: <510229.99982.qm@web55606.mail.re4.yahoo.com> Message-ID: <4970DF68.9090805@tarazed.demon.co.uk> Philippe Lang wrote: >> Hi, >> >> I also noticed that the FXShutter doesn't work properly under Vista. >> When you click on the various shutter items, it just flicks from one >> item to the next without the smooth animation in between. >> It just flicks from one shutter button to the next in one frame. >> Is there any way of fixing this, or should I just can Vista and go > back to XP. > > Hi, > > I'm not using the FXShutter widget myself, so I'm not sure how it's > supposed to work, but I have just run the FXShutter example here: > > http://www.fxruby.org/examples/shutter.rb > > ... And I don't see the smooth animation effect you are talking about, > although I use XP as well. (I have disactivated the icons load, it's not > supposed to change anything, right?) > > Maybe your XP machine is so old that your funny smooth effect is in fact > a huge slowdow in screen redraw? :) Just kidding... > > Philippe Lang > _______________________________________________ > fxruby-users mailing list > fxruby-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/fxruby-users > On my Linux system the changes are very fast as well. As Philippe suggests you would have to be running a much slower system to see the in-between frames, I would think. Len From jeroen at fox-toolkit.org Fri Jan 16 15:29:47 2009 From: jeroen at fox-toolkit.org (Jeroen van der Zijp) Date: Fri, 16 Jan 2009 14:29:47 -0600 Subject: [fxruby-users] Vista issues In-Reply-To: <4970DF68.9090805@tarazed.demon.co.uk> References: <510229.99982.qm@web55606.mail.re4.yahoo.com> <4970DF68.9090805@tarazed.demon.co.uk> Message-ID: <200901161429.47345.jeroen@fox-toolkit.org> On Friday 16 January 2009, Len Lawrence wrote: > Philippe Lang wrote: > >> Hi, > >> > >> I also noticed that the FXShutter doesn't work properly under Vista. > >> When you click on the various shutter items, it just flicks from one > >> item to the next without the smooth animation in between. > >> It just flicks from one shutter button to the next in one frame. > >> Is there any way of fixing this, or should I just can Vista and go > > back to XP. > > > > Hi, > > > > I'm not using the FXShutter widget myself, so I'm not sure how it's > > supposed to work, but I have just run the FXShutter example here: > > > > http://www.fxruby.org/examples/shutter.rb > > > > ... And I don't see the smooth animation effect you are talking about, > > although I use XP as well. (I have disactivated the icons load, it's not > > supposed to change anything, right?) > > > > Maybe your XP machine is so old that your funny smooth effect is in fact > > a huge slowdow in screen redraw? :) Just kidding... > > > > Philippe Lang > > _______________________________________________ > > fxruby-users mailing list > > fxruby-users at rubyforge.org > > http://rubyforge.org/mailman/listinfo/fxruby-users > > > On my Linux system the changes are very fast as well. As Philippe > suggests you would have to be running a much slower system to see the > in-between frames, I would think. You can change the speed in the registry [SETTINGS/animspeedns (nanoseconds) for 1.7, SETTINGS/animspeed (milliseconds) for 1.6 and below]. - Jeroen From lyle at lylejohnson.name Fri Jan 16 16:02:21 2009 From: lyle at lylejohnson.name (Lyle Johnson) Date: Fri, 16 Jan 2009 15:02:21 -0600 Subject: [fxruby-users] Vista issues In-Reply-To: <4970DF68.9090805@tarazed.demon.co.uk> References: <510229.99982.qm@web55606.mail.re4.yahoo.com> <4970DF68.9090805@tarazed.demon.co.uk> Message-ID: <7B5B01EF-265C-4221-842B-320AB917856F@lylejohnson.name> On Jan 16, 2009, at 1:26 PM, Len Lawrence wrote: > On my Linux system the changes are very fast as well. As Philippe > suggests you would have to be running a much slower system to see > the in-between frames, I would think. What happens if you increase the "animation speed" (which is technically the delay between frame updates) from its default of 10ms? Try adding this somewhere in the application initialization: app.animSpeed = 100 # increased from default value of 10 If that makes it too slow, obviously, pick some value in between. Just curious if this affects it at all. In _theory_, it shouldn't. From jeroen at fox-toolkit.org Fri Jan 16 17:00:09 2009 From: jeroen at fox-toolkit.org (Jeroen van der Zijp) Date: Fri, 16 Jan 2009 16:00:09 -0600 Subject: [fxruby-users] [Foxgui-users] selective disabling of text entry in a FXTable (again) In-Reply-To: <20090115203423.c2681878.wbparsons@cshore.com> References: <20090115203423.c2681878.wbparsons@cshore.com> Message-ID: <200901161600.09841.jeroen@fox-toolkit.org> On Thursday 15 January 2009, William B. Parsons wrote: > Hello, > > I originally sent the following query to the FXRuby mailing list, but as > it seems to be a FOX issue, Lyle Johnson forwarded it to the main FOX list. > There has been no reply, so is this a FOX bug or a misunderstanding on my > part? It was fixed in FOX 1.7: when an item is disabled, it can not be edited. Regards, - Jeroen From mr_nice66 at yahoo.com Fri Jan 16 17:34:36 2009 From: mr_nice66 at yahoo.com (James Hibbard) Date: Fri, 16 Jan 2009 14:34:36 -0800 (PST) Subject: [fxruby-users] Vista issues References: <510229.99982.qm@web55606.mail.re4.yahoo.com> <4970DF68.9090805@tarazed.demon.co.uk> <200901161429.47345.jeroen@fox-toolkit.org> Message-ID: <196571.68209.qm@web55601.mail.re4.yahoo.com> >You can change the speed in the registry [SETTINGS/animspeedns (nanoseconds) for 1.7, >SETTINGS/animspeed (milliseconds) for 1.6 and below]. Cheers Jeroen, That worked perfectly. You're a star! P.S. I'd still be really greatful if you could tell me how I can access the FOX ControlPanel application (ref. earlier post) >You should be able to run the FOX ControlPanel application and change color schemes; normally, >FOX fishes its colors from the Windows GUI control registry; this works pretty good on 2K and XP. -------------- next part -------------- An HTML attachment was scrubbed... URL: From mr_nice66 at yahoo.com Fri Jan 16 18:03:50 2009 From: mr_nice66 at yahoo.com (James Hibbard) Date: Fri, 16 Jan 2009 15:03:50 -0800 (PST) Subject: [fxruby-users] Vista issues References: <510229.99982.qm@web55606.mail.re4.yahoo.com> <4970DF68.9090805@tarazed.demon.co.uk> <7B5B01EF-265C-4221-842B-320AB917856F@lylejohnson.name> Message-ID: <939175.75263.qm@web55605.mail.re4.yahoo.com> On my system this has an effect (it slows it right down) >app.animSpeed = 100 So much the theory :-) ________________________________ From: Lyle Johnson To: fxruby-users at rubyforge.org Sent: Friday, 16 January, 2009 22:02:21 Subject: Re: [fxruby-users] Vista issues On Jan 16, 2009, at 1:26 PM, Len Lawrence wrote: > On my Linux system the changes are very fast as well. As Philippe suggests you would have to be running a much slower system to see the in-between frames, I would think. What happens if you increase the "animation speed" (which is technically the delay between frame updates) from its default of 10ms? Try adding this somewhere in the application initialization: app.animSpeed = 100 # increased from default value of 10 If that makes it too slow, obviously, pick some value in between. Just curious if this affects it at all. In _theory_, it shouldn't. _______________________________________________ fxruby-users mailing list fxruby-users at rubyforge.org http://rubyforge.org/mailman/listinfo/fxruby-users -------------- next part -------------- An HTML attachment was scrubbed... URL: From lyle at lylejohnson.name Fri Jan 16 19:21:16 2009 From: lyle at lylejohnson.name (Lyle Johnson) Date: Fri, 16 Jan 2009 18:21:16 -0600 Subject: [fxruby-users] Vista issues In-Reply-To: <939175.75263.qm@web55605.mail.re4.yahoo.com> References: <510229.99982.qm@web55606.mail.re4.yahoo.com> <4970DF68.9090805@tarazed.demon.co.uk> <7B5B01EF-265C-4221-842B-320AB917856F@lylejohnson.name> <939175.75263.qm@web55605.mail.re4.yahoo.com> Message-ID: <528E20C5-C3F9-48BD-99C2-36FFC7F11E71@lylejohnson.name> I guess a millisecond lasts longer when you're running XP vs. Vista. ;) Sent from my iPhone On Jan 16, 2009, at 5:03 PM, James Hibbard wrote: > On my system this has an effect (it slows it right down) > >app.animSpeed = 100 > So much the theory :-) > > From: Lyle Johnson > To: fxruby-users at rubyforge.org > Sent: Friday, 16 January, 2009 22:02:21 > Subject: Re: [fxruby-users] Vista issues > > > On Jan 16, 2009, at 1:26 PM, Len Lawrence wrote: > > > On my Linux system the changes are very fast as well. As Philippe > suggests you would have to be running a much slower system to see > the in-between frames, I would think. > > What happens if you increase the "animation speed" (which is > technically the delay between frame updates) from its default of > 10ms? Try adding this somewhere in the application initialization: > > app.animSpeed = 100 # increased from default value of 10 > > If that makes it too slow, obviously, pick some value in between. > Just curious if this affects it at all. In _theory_, it shouldn't. > _______________________________________________ > fxruby-users mailing list > fxruby-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/fxruby-users > > _______________________________________________ > fxruby-users mailing list > fxruby-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/fxruby-users -------------- next part -------------- An HTML attachment was scrubbed... URL: From wbparsons at cshore.com Sat Jan 17 08:48:24 2009 From: wbparsons at cshore.com (William B. Parsons) Date: Sat, 17 Jan 2009 08:48:24 -0500 Subject: [fxruby-users] [Foxgui-users] selective disabling of text entry in a FXTable (again) In-Reply-To: <200901161600.09841.jeroen@fox-toolkit.org> References: <20090115203423.c2681878.wbparsons@cshore.com> <200901161600.09841.jeroen@fox-toolkit.org> Message-ID: <20090117084824.27692f6b.wbparsons@cshore.com> On Fri, 16 Jan 2009 16:00:09 -0600 Jeroen van der Zijp wrote: > On Thursday 15 January 2009, William B. Parsons wrote: > > Hello, > > > > I originally sent the following query to the FXRuby mailing list, but as > > it seems to be a FOX issue, Lyle Johnson forwarded it to the main FOX list. > > There has been no reply, so is this a FOX bug or a misunderstanding on my > > part? > > It was fixed in FOX 1.7: when an item is disabled, it can not be edited. OK - Thanks. Is there an easy workaround to disable editing table cells for FOX 1.6? -- Will From jeroen at fox-toolkit.org Sat Jan 17 10:06:50 2009 From: jeroen at fox-toolkit.org (Jeroen van der Zijp) Date: Sat, 17 Jan 2009 09:06:50 -0600 Subject: [fxruby-users] [Foxgui-users] selective disabling of text entry in a FXTable (again) In-Reply-To: <20090117084824.27692f6b.wbparsons@cshore.com> References: <20090115203423.c2681878.wbparsons@cshore.com> <200901161600.09841.jeroen@fox-toolkit.org> <20090117084824.27692f6b.wbparsons@cshore.com> Message-ID: <200901170906.51432.jeroen@fox-toolkit.org> On Saturday 17 January 2009, William B. Parsons wrote: > On Fri, 16 Jan 2009 16:00:09 -0600 > Jeroen van der Zijp wrote: > > > On Thursday 15 January 2009, William B. Parsons wrote: > > > Hello, > > > > > > I originally sent the following query to the FXRuby mailing list, but as > > > it seems to be a FOX issue, Lyle Johnson forwarded it to the main FOX list. > > > There has been no reply, so is this a FOX bug or a misunderstanding on my > > > part? > > > > It was fixed in FOX 1.7: when an item is disabled, it can not be edited. > > OK - Thanks. Is there an easy workaround to disable editing table cells for > FOX 1.6? In this particular case, since I can implement it with no API changes, I could probably backport the fix. I think its unlikely to affect anyone since disabling cells isn't done all that often. So expect it in the next FOX 1.6.x update... - Jeroen -- +----------------------------------------------------------------------------+ | Copyright (C) 08:50 01/17/2009 Jeroen van der Zijp. All Rights Reserved. | +----------------------------------------------------------------------------+ From davidm at astro.berkeley.edu Sun Jan 18 14:20:49 2009 From: davidm at astro.berkeley.edu (David MacMahon) Date: Sun, 18 Jan 2009 11:20:49 -0800 Subject: [fxruby-users] Monitoring events/messages Message-ID: <567D5BDF-BD4F-4BF2-B1BE-BC4CA7FFACE5@astro.berkeley.edu> I am trying to learn FXRuby (and Fox). I already know Ruby pretty well. One thing that would help my understanding of FXRuby (and Fox) is to be able to monitor (i.e. spy) on events that are sent to a particular widget, class of widgets, or every widget. I tried to accomplish this both by redefining the FXObject#handle as well as creating my own subclass with its own #handle method. Neither way did what I was hoping it would do. Below is my modified hello.rb script. Can anyone tell me how to do what I'm trying to do? Can it be done at all in FXRuby? Thanks, Dave #!/usr/bin/env ruby require 'fox16' include Fox class FXObject alias :old_handle :handle def handle(sender, selector, data) p [self, sender, selector, data] old_handle(sender, selector, data) end end class MyApp < FXApp def handle(sender, selector, data) p ["MyApp", sender, selector, data] super(sender, selector, data) end end application = MyApp.new("Hello", "FoxTest") main = FXMainWindow.new(application, "Hello", nil, nil, DECOR_ALL) FXButton.new(main, "&Hello, World!", nil, application, FXApp::ID_QUIT) application.create() main.show(PLACEMENT_SCREEN) application.run() From davidm at astro.berkeley.edu Sun Jan 18 14:20:59 2009 From: davidm at astro.berkeley.edu (David MacMahon) Date: Sun, 18 Jan 2009 11:20:59 -0800 Subject: [fxruby-users] update question Message-ID: > ############method a ########## > > def press_next > > @all=("1".."100").to_a > > @button_next.connect(SEL_COMMAND) do > @all.each do |e| > ###app.addTimeout(1*1000){@radio1.text=e} > @radio1.text=e > 100.times{app.runOneEvent;sleep 0.01} > end > end > end > > > ##########method b################## > > def press_next > > @all=("1".."100").to_a > > @button_next.connect(SEL_COMMAND) do > @all.each do |e| > app.addTimeout(1*1000){@radio1.text=e} > ###@radio1.text=e > ###100.times{app.runOneEvent;sleep 0.01} > end > end > end My guess is that method b is setting up 100 timers that will all expire very close to each other, so close in fact that their effects are not all seen in individual repaints. What if you add 10 ms to each successive addTimeout call in method b? (i.e. the first is 1000 +0, the second is 1000+10, ..., the last is 1000+99)? BTW, how many timers does fox/fxruby support? Dave From philippe.lang at attiksystem.ch Mon Jan 19 02:56:07 2009 From: philippe.lang at attiksystem.ch (Philippe Lang) Date: Mon, 19 Jan 2009 08:56:07 +0100 Subject: [fxruby-users] FXTextField, FXTable, cut-copy-paste problems Message-ID: Hi, There are a few cut-copy-paste problems under FXRuby. I took the time this morning to test everything carefully. Here is the test code I have been using: --------------------------- #!/usr/bin/ruby require 'fox16' include Fox class MyWindow < FXMainWindow def initialize(app) super(app, "Window", nil, nil, DECOR_ALL, 0, 0, 600, 350) # Menu bar stretched along the top of the main window menubar = FXMenuBar.new(self, LAYOUT_SIDE_TOP|LAYOUT_FILL_X) # File menu filemenu = FXMenuPane.new(self) FXMenuTitle.new(menubar, "&File", nil, filemenu) FXMenuCommand.new(filemenu, "&Quit\tCtl-Q\tQuit the application", nil, app, FXApp::ID_QUIT) # Table and textfield f = FXVerticalFrame.new(self, LAYOUT_FILL_X|LAYOUT_FILL_Y) tf = FXTextField.new(f, 16) t = FXTable.new(f, nil, 0, TABLE_COL_SIZABLE|LAYOUT_FILL_X|LAYOUT_FILL_Y) t.visibleRows = 3 t.visibleColumns = 3 t.setTableSize(3, 3) # Data tf.text = "123" t.setItemText(1, 1, "456") end def create super show(PLACEMENT_SCREEN) end end if __FILE__ == $0 application = FXApp.new("Attik System", "FXRuby Test") MyWindow.new(application) application.create application.run end --------------------------- As we can expect, cut or copy behave exactly the same, so I'm just taking into account the copy-paste commands between the FXTextField and the FXTable. There are differences when you issue a command on an FXTable selected cell (after a single clic on a cell, I'll call that the "select mode"), or on an FXTable cell in "edit mode" (with the cursor blinking in it). Here are the results: --------------------- 1. Copy-paste from FXTextField to FXTextField -> Everything is fine 2. Copy-paste from FXTextField to FXTable -> Everything is fine 3. Copy-paste from FXTable to FXTextField -> Copy in select mode: trailing characters are added at the end of the pasted text -> Copy in edit mode: nothing is pasted 4. Copy-paste from FXTable to FXTable -> Copy in edit mode, paste in select mode: nothing is pasted -> Copy in edit mode, paste in edit mode: nothing is pasted -> Copy in select mode, paste in select mode: everything is fine -> Copy in select mode, paste in edit mode: trailing characters are added at the end of the pasted text My setups: ---------- Windows XP, Ruby 1.8.6, FXRuby 1.6.18 MacOS X, Ruby 1.8.6, FXRuby 1.6.18 Is that a fox or fxruby problem? Philippe From lyle at lylejohnson.name Mon Jan 19 10:47:20 2009 From: lyle at lylejohnson.name (Lyle Johnson) Date: Mon, 19 Jan 2009 09:47:20 -0600 Subject: [fxruby-users] FXTextField, FXTable, cut-copy-paste problems In-Reply-To: References: Message-ID: <2DB76773-F0A2-4C9A-8266-B0ED0E9159C4@lylejohnson.name> On Jan 19, 2009, at 1:56 AM, Philippe Lang wrote: > There are a few cut-copy-paste problems under FXRuby... > Is that a fox or fxruby problem? It's definitely a FOX bug. FXRuby just passes all of that data through as-is. From lyle at lylejohnson.name Mon Jan 19 10:45:49 2009 From: lyle at lylejohnson.name (Lyle Johnson) Date: Mon, 19 Jan 2009 09:45:49 -0600 Subject: [fxruby-users] Monitoring events/messages In-Reply-To: <567D5BDF-BD4F-4BF2-B1BE-BC4CA7FFACE5@astro.berkeley.edu> References: <567D5BDF-BD4F-4BF2-B1BE-BC4CA7FFACE5@astro.berkeley.edu> Message-ID: <2532CBB9-990A-4B35-867D-E451A3BCC217@lylejohnson.name> On Jan 18, 2009, at 1:20 PM, David MacMahon wrote: > I am trying to learn FXRuby (and Fox). I already know Ruby pretty > well. One thing that would help my understanding of FXRuby (and > Fox) is to be able to monitor (i.e. spy) on events that are sent to > a particular widget, class of widgets, or every widget. You can try setting the target for a particular widget to an FXDebugTarget instance. It should then print to the console all of the messages that that widget receives, e.g. button = FXButton.new(...) debug_target = FXDebugTarget.new button.target = debug_target Hope this helps, Lyle From andreas_s at hotmail.com Mon Jan 19 13:12:36 2009 From: andreas_s at hotmail.com (Andreas S) Date: Mon, 19 Jan 2009 18:12:36 +0000 Subject: [fxruby-users] Responding to a change in FXTableItem In-Reply-To: <2DB76773-F0A2-4C9A-8266-B0ED0E9159C4@lylejohnson.name> References: <2DB76773-F0A2-4C9A-8266-B0ED0E9159C4@lylejohnson.name> Message-ID: Hello, I'd like my app to response when a cell in my table is changed interactively (responding after the change has been done). For example, I want to pop up a confirmation dialog box. Looking at FXRuby or Fox API for FXTable and FXTableItem does not give me a clue what message FXTableItem or FXTable is sending when such event occurs. What message does it send? Or how can I detect that a cell value has been changed? If the information is available in RDoc, I'd appreciate if you can tell me where to look for, as the page for FXTable or FXTableItem itself does not give me a clue. Thank you in advance -andre _________________________________________________________________ Windows Live? Hotmail?: Chat. Store. Share. Do more with mail. http://windowslive.com/explore?ocid=TXT_TAGLM_WL_t1_hm_justgotbetter_explore_012009 -------------- next part -------------- An HTML attachment was scrubbed... URL: From andreas_s at hotmail.com Mon Jan 19 13:35:06 2009 From: andreas_s at hotmail.com (Andreas S) Date: Mon, 19 Jan 2009 18:35:06 +0000 Subject: [fxruby-users] Responding to a change in FXTableItem In-Reply-To: <2DB76773-F0A2-4C9A-8266-B0ED0E9159C4@lylejohnson.name> References: <2DB76773-F0A2-4C9A-8266-B0ED0E9159C4@lylejohnson.name> Message-ID: My apology, I misread FXTable's SEL_REPLACED as an event when the cells in range has been replaced, not the contents. In fact, this is exactly what I need. Thank you and I apologize for the noise -andre From: andreas_s at hotmail.com To: fxruby-users at rubyforge.org Subject: Responding to a change in FXTableItem Date: Mon, 19 Jan 2009 18:12:36 +0000 Hello, I'd like my app to response when a cell in my table is changed interactively (responding after the change has been done). For example, I want to pop up a confirmation dialog box. Looking at FXRuby or Fox API for FXTable and FXTableItem does not give me a clue what message FXTableItem or FXTable is sending when such event occurs. What message does it send? Or how can I detect that a cell value has been changed? If the information is available in RDoc, I'd appreciate if you can tell me where to look for, as the page for FXTable or FXTableItem itself does not give me a clue. Thank you in advance -andre Windows Live? Hotmail?: Chat. Store. Share. Do more with mail. Check it out. _________________________________________________________________ Windows Live?: Keep your life in sync. http://windowslive.com/explore?ocid=TXT_TAGLM_WL_t1_allup_explore_012009 -------------- next part -------------- An HTML attachment was scrubbed... URL: From davidm at astro.berkeley.edu Mon Jan 19 13:42:31 2009 From: davidm at astro.berkeley.edu (David MacMahon) Date: Mon, 19 Jan 2009 10:42:31 -0800 Subject: [fxruby-users] Monitoring events/messages In-Reply-To: <2532CBB9-990A-4B35-867D-E451A3BCC217@lylejohnson.name> References: <567D5BDF-BD4F-4BF2-B1BE-BC4CA7FFACE5@astro.berkeley.edu> <2532CBB9-990A-4B35-867D-E451A3BCC217@lylejohnson.name> Message-ID: On Jan 19, 2009, at 7:45 , Lyle Johnson wrote: > You can try setting the target for a particular widget to an > FXDebugTarget instance. It should then print to the console all of > the messages that that widget receives, e.g. > > button = FXButton.new(...) > debug_target = FXDebugTarget.new > button.target = debug_target Thanks, Lyle, I found FXDebugTarget after I had sent my message. That helps somewhat, but it seems like it tells me all the events sent by a widget rather than all the events received by a widget. It seems like FXDebugTarget does not forward the event to any other widget (i.e. the "real" target). I think it would be more useful if FXDebugTarget's constructor accepted a target (optionally, defaulting to nil). It would print the info as it does now and then pass the event on to the given target (if it's not nil). This would make it possible to insert and remove an FXDebugTarget at will while still allowing the application to function normally... # Insert FXDebugTarget to see events sent by button button.target = FXDebugTarget.new(button.target) # Remove FXDebugTarget from button button.target = button.target.target The remove operation assumes that FXDebugTarget has an attribute named "target" that returns the original target. This could be a problem if button's target is a regular widget rather than an FXDebugTarget since that will set button's target to the other widget's target, effectively bypassing button's original target. To avoid this, perhaps FXDebugTarget's "target" attribute should be called something else (e.g. "original_target"). Then the removal would give an error button's target does not respond to "original_target"... # Safer removal of FXDebugTarget from button button.target = button.target.original_target With this proxying in place, I could walk the widget tree and add FXDebugtargets to all the wdigets. Then I'd see all the events! Thanks for FXRuby, Dave From lyle at lylejohnson.name Mon Jan 19 17:53:52 2009 From: lyle at lylejohnson.name (Lyle Johnson) Date: Mon, 19 Jan 2009 16:53:52 -0600 Subject: [fxruby-users] fxRuby not Installing In-Reply-To: <20090119224006.E9FEA18585B2@rubyforge.org> References: <20090119224006.E9FEA18585B2@rubyforge.org> Message-ID: <1EB95044-C7D2-4BA5-B7D7-8B7687FF9E01@lylejohnson.name> On Jan 19, 2009, at 4:40 PM, Justin Shell wrote: > My reading of this was that I also needed to install Fox. Is this > correct? Yes, you need to install FOX first. > Looking at the option, I added -with-fox-include. I got the same > error. Adding the --with-fox-include flag won't help you if FOX isn't installed yet; that's just a way to tell the FXRuby gem builder where to find FOX on your system if it can't find it automatically. > I then opened up MacPorts and tried installing Fox that way. I got > some errors related to fonts (there were a lot of them so I didn't > paste them) and Fox was not installed. That's odd. Are you using MacPorts 1.7.0 (the current release)? I haven't had any (recent) reports about the FOX port not building properly. It would be good if you could file a bug report at MacPorts.org on that one. > Any thoughts on what I'm doing wrong here? Do I need to include more > options? Any help is greatly appreciated. I'm running 10.4.9 on an > iBook and have Ruby 1.8.6. The best situation would be to get the MacPorts build working. You could try downloading the FOX source code and building it "from scratch", but that's a little trickier than using MacPorts. Hope this helps, Lyle P.S. Please consider subscribing to the fxruby-users mailing list and posting these sorts of questions there; you'll have a larger audience of people who may bring better solutions to the table than I can! From davidm at astro.berkeley.edu Mon Jan 19 19:11:47 2009 From: davidm at astro.berkeley.edu (David MacMahon) Date: Mon, 19 Jan 2009 16:11:47 -0800 Subject: [fxruby-users] fxRuby not Installing In-Reply-To: <1EB95044-C7D2-4BA5-B7D7-8B7687FF9E01@lylejohnson.name> References: <20090119224006.E9FEA18585B2@rubyforge.org> <1EB95044-C7D2-4BA5-B7D7-8B7687FF9E01@lylejohnson.name> Message-ID: <325AE89E-9882-4840-8DF5-FEA212D4D2C9@astro.berkeley.edu> On Jan 19, 2009, at 14:53 , Lyle Johnson wrote: > On Jan 19, 2009, at 4:40 PM, Justin Shell wrote: > >> I then opened up MacPorts and tried installing Fox that way. I got >> some errors related to fonts (there were a lot of them so I didn't >> paste them) and Fox was not installed. > > That's odd. Are you using MacPorts 1.7.0 (the current release)? I > haven't had any (recent) reports about the FOX port not building > properly. It would be good if you could file a bug report at > MacPorts.org on that one. I don't know if this is related, but I also had problems installing Fox via MacPorts on Tiger (Mac OS X 10.4.11) until I found this... http://trac.macports.org/ticket/17779 Apparently, the Fox port lists Xft2 as a library dependency, but Tiger's "built-in" Xft2 library is not adequate so Fox on Tiger via MacPorts really needs the Macports Xft2 port installed. My symptom was that things would build, but the Fox examples (e.g. calculator) would crash during startup somewhere in the fontconfig library, so it looks like it might be a different problem from yours, Justin, but if you're on Tiger you could try doing... sudo port install Xft2 sudo port install fox sudo gem install fox16 Hope this helps, Dave From davidm at astro.berkeley.edu Tue Jan 20 00:07:53 2009 From: davidm at astro.berkeley.edu (David MacMahon) Date: Mon, 19 Jan 2009 21:07:53 -0800 Subject: [fxruby-users] fxRuby not Installing In-Reply-To: References: <20090119224006.E9FEA18585B2@rubyforge.org> <1EB95044-C7D2-4BA5-B7D7-8B7687FF9E01@lylejohnson.name> <325AE89E-9882-4840-8DF5-FEA212D4D2C9@astro.berkeley.edu> Message-ID: <45F0B36D-461E-4B7B-85C7-9AF17B1DFF3E@astro.berkeley.edu> Maybe stuff left around from a previously failed fxruby build attempt is confusing things? You could try this... sudo gem uninstall fxruby sudo gem install fxruby Can you run any Fox programs that use fxscintilla? Dave On Jan 19, 2009, at 20:50 , justin shell wrote: > Added Xft2 and that got fox and fxscintilla installed via macports. > Thanks for the tip, David. > > However, fxruby is still not installing. I'm installing via the gem > command. The last three lines of the error report read: > > /usr/bin/ld: can't locate file for: -lfxscintilla > collect2: ld returned 1 exit status > make: *** [fox16.bundle] Error 1 > > I can forward the full error if that would help. > > I'm not sure why it cannot locate the file. I've confirmed > fxscintilla is installed and active by using "port installed". > Anything else I should be looking for? Should I reinstall > fxscintilla. Could it be something in my.bash_login file? I'm going > back to the documentation to see if I've missed something, but any > advice is welcome. > > Thanks, > Justin > > > On Mon, Jan 19, 2009 at 6:11 PM, David MacMahon > wrote: > > On Jan 19, 2009, at 14:53 , Lyle Johnson wrote: > > On Jan 19, 2009, at 4:40 PM, Justin Shell wrote: > > I then opened up MacPorts and tried installing Fox that way. I got > some errors related to fonts (there were a lot of them so I didn't > paste them) and Fox was not installed. > > That's odd. Are you using MacPorts 1.7.0 (the current release)? I > haven't had any (recent) reports about the FOX port not building > properly. It would be good if you could file a bug report at > MacPorts.org on that one. > > I don't know if this is related, but I also had problems installing > Fox via MacPorts on Tiger (Mac OS X 10.4.11) until I found this... > > http://trac.macports.org/ticket/17779 > > Apparently, the Fox port lists Xft2 as a library dependency, but > Tiger's "built-in" Xft2 library is not adequate so Fox on Tiger via > MacPorts really needs the Macports Xft2 port installed. > > My symptom was that things would build, but the Fox examples (e.g. > calculator) would crash during startup somewhere in the fontconfig > library, so it looks like it might be a different problem from > yours, Justin, but if you're on Tiger you could try doing... > > sudo port install Xft2 > sudo port install fox > sudo gem install fox16 > > Hope this helps, > Dave > > From dglnz at yahoo.com Tue Jan 20 06:26:51 2009 From: dglnz at yahoo.com (dave L) Date: Tue, 20 Jan 2009 03:26:51 -0800 (PST) Subject: [fxruby-users] installation issues - kubuntu 8.04 Message-ID: <181616.38097.qm@web30003.mail.mud.yahoo.com> at the time of running make i got the error below... s/libFOX-1.6.so.0.0.34 /usr/bin/ld: cannot find -lXext collect2: ld returned 1 exit status make[1]: *** [libFOX-1.6.la] Error 1 make[1]: Leaving directory `/spare/fox-1.6.34/src' make: *** [install-recursive] Error 1 then i thought Ha no probs i'll go onto run make install but got the same error!!!! i had 2 other errors but they where due to me not having installed build-essentials & a Lib library. had googled for info on other 2 errors but it's not helped much this time. Anyone go a pointer or 2? my aim is to have foxGUIb running to help with the GUI (placement of controls etc). any and all help grateful. dave. Get the world's best email - http://nz.mail.yahoo.com/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From lyle at lylejohnson.name Tue Jan 20 09:40:27 2009 From: lyle at lylejohnson.name (Lyle Johnson) Date: Tue, 20 Jan 2009 08:40:27 -0600 Subject: [fxruby-users] installation issues - kubuntu 8.04 In-Reply-To: <181616.38097.qm@web30003.mail.mud.yahoo.com> References: <181616.38097.qm@web30003.mail.mud.yahoo.com> Message-ID: <57cf8f720901200640k7d90d4d3ycbbaf96c9706925d@mail.gmail.com> On Tue, Jan 20, 2009 at 5:26 AM, dave L wrote: > at the time of running make i got the error below... > > s/libFOX-1.6.so.0.0.34 > /usr/bin/ld: cannot find -lXext > collect2: ld returned 1 exit status > make[1]: *** [libFOX-1.6.la] Error 1 > make[1]: Leaving directory `/spare/fox-1.6.34/src' > make: *** [install-recursive] Error 1 Doesn't Ubuntu have a package for FOX anyways? Why not just install that instead? sudo aptitude install libfox1.6-dev But assuming you have some reason not to use the standard package, it looks like you don't have libXext installed. What happens if you do: sudo aptitude install libxext-dev and then try the "configure; make; make install" cycle for FOX again? Hope this helps, Lyle From lyle at lylejohnson.name Tue Jan 20 09:42:22 2009 From: lyle at lylejohnson.name (Lyle Johnson) Date: Tue, 20 Jan 2009 08:42:22 -0600 Subject: [fxruby-users] fxRuby not Installing In-Reply-To: <45F0B36D-461E-4B7B-85C7-9AF17B1DFF3E@astro.berkeley.edu> References: <20090119224006.E9FEA18585B2@rubyforge.org> <1EB95044-C7D2-4BA5-B7D7-8B7687FF9E01@lylejohnson.name> <325AE89E-9882-4840-8DF5-FEA212D4D2C9@astro.berkeley.edu> <45F0B36D-461E-4B7B-85C7-9AF17B1DFF3E@astro.berkeley.edu> Message-ID: <57cf8f720901200642w42252e20q6a017ef5e81d5bb6@mail.gmail.com> On Mon, Jan 19, 2009 at 11:07 PM, David MacMahon wrote: > Maybe stuff left around from a previously failed fxruby build attempt is > confusing things? You could try this... > > sudo gem uninstall fxruby > sudo gem install fxruby If he's using MacPorts anyways, he could, you know, just install the rb-fxruby port: sudo port install rb-fxruby -- Lyle From lyle at lylejohnson.name Tue Jan 20 10:32:26 2009 From: lyle at lylejohnson.name (Lyle Johnson) Date: Tue, 20 Jan 2009 09:32:26 -0600 Subject: [fxruby-users] fxRuby not Installing In-Reply-To: References: <20090119224006.E9FEA18585B2@rubyforge.org> <1EB95044-C7D2-4BA5-B7D7-8B7687FF9E01@lylejohnson.name> <325AE89E-9882-4840-8DF5-FEA212D4D2C9@astro.berkeley.edu> <45F0B36D-461E-4B7B-85C7-9AF17B1DFF3E@astro.berkeley.edu> <57cf8f720901200642w42252e20q6a017ef5e81d5bb6@mail.gmail.com> Message-ID: On Jan 20, 2009, at 9:29 AM, justin shell wrote: > I found this thread that seems to explain many of the same problems > I'm having. I'll work through it and see if it gets me anywhere. Cool. > As for using MacPorts, I could but that may create more problems. I > built Ruby from source, so it installed in /usr/bin/local. If I > install fxruby using macports, won't it be installed in the default > MacPorts dir? Yes, and it would first want to install MacPorts' version of Ruby. So the approach you're taking does make sense. > I'm just beginning with MacPorts, is there a way to change the > default location for a when installing a single port? I don't think so, but I'm not much of a MacPorts guru myself. > I'll read through the thread I found and let you know if I figure it > out. Great! Let us know how it goes. From dglnz at yahoo.com Tue Jan 20 14:57:20 2009 From: dglnz at yahoo.com (dave L) Date: Tue, 20 Jan 2009 11:57:20 -0800 (PST) Subject: [fxruby-users] installation issues - kubuntu 8.04 In-Reply-To: <57cf8f720901200640k7d90d4d3ycbbaf96c9706925d@mail.gmail.com> Message-ID: <217731.49488.qm@web30004.mail.mud.yahoo.com> --- On Wed, 21/1/09, Lyle Johnson wrote: > From: Lyle Johnson > Subject: Re: [fxruby-users] installation issues - kubuntu 8.04 > To: fxruby-users at rubyforge.org > Received: Wednesday, 21 January, 2009, 3:40 AM > On Tue, Jan 20, 2009 at 5:26 AM, dave L > wrote: > > > at the time of running make i got the error below... > > > > s/libFOX-1.6.so.0.0.34 > > /usr/bin/ld: cannot find -lXext > > collect2: ld returned 1 exit status > > make[1]: *** [libFOX-1.6.la] Error 1 > > make[1]: Leaving directory `/spare/fox-1.6.34/src' > > make: *** [install-recursive] Error 1 > > Doesn't Ubuntu have a package for FOX anyways? Why not > just install > that instead? Before embarking on my intriped journey I search through Adpet to see if anything to do with fox was in the repo's i have (namely bog standard repo's for *ubuntu) found nothing. My preference is to install within the package management system as you end up with a "just goes" program out of the box. > > sudo aptitude install libfox1.6-dev Will try this when i get home - actually may even try apt-get fxruby as a query and see what apt-get shows. > > But assuming you have some reason not to use the standard > package, it > looks like you don't have libXext installed. What > happens if you do: > > sudo aptitude install libxext-dev > all else fails i'll do this one last. > and then try the "configure; make; make install" > cycle for FOX again? > > Hope this helps, > > Lyle > Thanks Lyle sure i'll be able to get something done now dave. _______________________________________________ > fxruby-users mailing list > fxruby-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/fxruby-users Get the world's best email - http://nz.mail.yahoo.com/ From andreas_s at hotmail.com Tue Jan 20 15:08:01 2009 From: andreas_s at hotmail.com (Andreas S) Date: Tue, 20 Jan 2009 20:08:01 +0000 Subject: [fxruby-users] triggering tooltip manually In-Reply-To: <57cf8f720901200640k7d90d4d3ycbbaf96c9706925d@mail.gmail.com> References: <181616.38097.qm@web30003.mail.mud.yahoo.com> <57cf8f720901200640k7d90d4d3ycbbaf96c9706925d@mail.gmail.com> Message-ID: I have a table that is in "Show changes" mode and I would like to use tooltip to show the original value of a cell. Table's SEL_QUERY_TIP is not triggered anymore once something is selected. So I'm thinking to use SEL_SELECTED to capture the event and trigger tooltip manually. However, I haven't been quite successful triggering it. (with added access to tooltip) mytable.connect SEL_SELECTED do |sender, selector, pos| @current_old_value = somehow_get_old_value_for_cell_at pos app.getTooltip.handle mytable, FXSEL(SEL_COMMAND, FXToolTip::ID_TIP_SHOW), nil end mytable.connect SEL_QUERY_TIP do |sender, selector, ptr| sender.text = @current_old_value end I'm partially successful. The tooltip shows up but only for a fraction of a second. And it doesn't show up again when the same cell or any cell is selected. The SEL_SELECTED event definitely occur when I click the cell. Any idea how to trigger tool tip manually? Thank you in advance -andre _________________________________________________________________ Windows Live?: Keep your life in sync. http://windowslive.com/explore?ocid=TXT_TAGLM_WL_t1_allup_explore_012009 -------------- next part -------------- An HTML attachment was scrubbed... URL: From lyle at lylejohnson.name Tue Jan 20 16:01:24 2009 From: lyle at lylejohnson.name (Lyle Johnson) Date: Tue, 20 Jan 2009 15:01:24 -0600 Subject: [fxruby-users] installation issues - kubuntu 8.04 In-Reply-To: <217731.49488.qm@web30004.mail.mud.yahoo.com> References: <57cf8f720901200640k7d90d4d3ycbbaf96c9706925d@mail.gmail.com> <217731.49488.qm@web30004.mail.mud.yahoo.com> Message-ID: <57cf8f720901201301g7e5fbd28l378cf2b7e5333522@mail.gmail.com> On Tue, Jan 20, 2009 at 1:57 PM, dave L wrote: > Before embarking on my intriped journey I search through Adpet to see if anything to do > with fox was in the repo's i have (namely bog standard repo's for *ubuntu) found nothing. > > My preference is to install within the package management system as you end up with a "just goes" program out of the box. I understand. I think you have to enable the "universe" package set, or whatever it's called, to get the fox-1.6 packages (but my knowledge of Ubuntu is a little weak). > Will try this when i get home - actually may even try apt-get fxruby as a query and see what apt-get shows. Please let me know what you find; as far as I know, there's no Ubuntu package for FXRuby. From lyle at lylejohnson.name Thu Jan 22 09:54:22 2009 From: lyle at lylejohnson.name (Lyle Johnson) Date: Thu, 22 Jan 2009 08:54:22 -0600 Subject: [fxruby-users] installation issues - kubuntu 8.04 In-Reply-To: <960424.28813.qm@web30005.mail.mud.yahoo.com> References: <57cf8f720901200640k7d90d4d3ycbbaf96c9706925d@mail.gmail.com> <217731.49488.qm@web30004.mail.mud.yahoo.com> <57cf8f720901201301g7e5fbd28l378cf2b7e5333522@mail.gmail.com> <960424.28813.qm@web30005.mail.mud.yahoo.com> Message-ID: <81E36DE5-0F36-4D59-BCD0-8A2D3B366160@lylejohnson.name> On Jan 22, 2009, at 2:54 AM, dave L wrote: > had a look and got libfox-1.6 & -doc packages the -dev said there > would be a *lot* of upgrades and new packages total 24~27(Mb) so > didn't install that. > > these packages where from teh universal repoitories. > Get:1 http://nz.archive.ubuntu.com hardy/universe libfox-1.6- > doc 1.6.25-1 (from the terminal window) Well, you're going to need some sort of "dev" package for FOX, so that you get the header files. I know that libfox-1.6-dev would provide those, but maybe this alternate package will work too. > > apt-get couldn't find fxruby or FXRuby and ruby by it's self said > ruby is current (ie no updates!!). OK, so there's no Ubuntu package for FXRuby. Oh well! -------------- next part -------------- An HTML attachment was scrubbed... URL: From lyle at lylejohnson.name Thu Jan 22 09:56:48 2009 From: lyle at lylejohnson.name (Lyle Johnson) Date: Thu, 22 Jan 2009 08:56:48 -0600 Subject: [fxruby-users] installation issues - kubuntu 8.04 In-Reply-To: <341553.76646.qm@web30007.mail.mud.yahoo.com> References: <57cf8f720901200640k7d90d4d3ycbbaf96c9706925d@mail.gmail.com> <217731.49488.qm@web30004.mail.mud.yahoo.com> <57cf8f720901201301g7e5fbd28l378cf2b7e5333522@mail.gmail.com> <341553.76646.qm@web30007.mail.mud.yahoo.com> Message-ID: <7F505B6D-22F3-4FEA-AFC9-F7A5C778BC87@lylejohnson.name> On Jan 22, 2009, at 3:00 AM, dave L wrote: > Now i'm getting > /usr/bin/ld: cannot find -lXrandr > collect2: ld returned 1 exit status > make: *** [fox16.so] Error 1 > as my error just re-read your post saying to get sudo aptitude > install libxext-dev so did that too as well as the other libfox > packages in previous message. Good, and this error message seems to indicate that it can't find the Xrandr library, so you'll want to install that too (presumably the package is named something like "libxrandr", but you'll need to search for it). -------------- next part -------------- An HTML attachment was scrubbed... URL: From mr_nice66 at yahoo.com Sat Jan 24 07:26:21 2009 From: mr_nice66 at yahoo.com (James Hibbard) Date: Sat, 24 Jan 2009 04:26:21 -0800 (PST) Subject: [fxruby-users] (no subject) Message-ID: <160401.70685.qm@web55606.mail.re4.yahoo.com> Hi, I wrote a GUI using FXRuby under WinXP. I then upgraded to Vista, installed Ruby (and thus by default FXRuby) and ran my GUI. It was then that I noticed that the colours have gone weird. The main user interface is now white (the default colour that Vista uses), but all of the data targets and tables have remained beige (RGB 236, 233, 216). Of course one can individualy declare a white background colour for each of these widgets, but then it looks garish if run on XP or Linux. I'm looking for a setting I can apply to make the colour for the application uniform and overide the system default. I already tried such things as app.backColour = FXRGB(236, 233, 216). In an earlier post it was suggested that I could change these settings by running FOX ControlPanel application. Unfortunately I have no idea how to do this and extensive Googling has yielded no results. I would be grateful for any help you could give. I have included a screenshot to highlight my problem. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: vista_colours.jpg Type: image/jpeg Size: 63272 bytes Desc: not available URL: From migatine at gmail.com Sat Jan 24 12:13:43 2009 From: migatine at gmail.com (=?ISO-8859-1?Q?Mich=E8le_Garoche?=) Date: Sat, 24 Jan 2009 18:13:43 +0100 Subject: [fxruby-users] (no subject) In-Reply-To: <160401.70685.qm@web55606.mail.re4.yahoo.com> References: <160401.70685.qm@web55606.mail.re4.yahoo.com> Message-ID: <7590C8B7-E905-4DC6-BA32-3085FC53FD48@gmail.com> Le 24 janv. 2009 ? 13:26, James Hibbard a ?crit : > Hi, > > I wrote a GUI using FXRuby under WinXP. > I then upgraded to Vista, installed Ruby (and thus by default > FXRuby) and ran my GUI. > It was then that I noticed that the colours have gone weird. > The main user interface is now white (the default colour that Vista > uses), but all of the data targets and tables have remained beige > (RGB 236, 233, 216). > Of course one can individualy declare a white background colour for > each of these widgets, but then it looks garish if run on XP or Linux. > I'm looking for a setting I can apply to make the colour for the > application uniform and overide the system default. > I already tried such things as app.backColour = FXRGB(236, 233, 216). > In an earlier post it was suggested that I could change these > settings by running FOX ControlPanel application. You certainly installed FOX, before installing FXRuby. FOX built a couple of executables (don't ask me where I'm on a Mac), by me they are in /usr/local/src/tests/ControlPanel /usr/local/src is where I put the FOX source code to compile it. I have no idea if the tests applications are installed automatically on Windows machines. They are not on Mac, that may be the problem you face, if you have installed a pre-compiled binary shipped without the tests. It does not help much, but it may explain your problem. Cheers, Mich?le ? -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: 36C471DED4B09EEB30A0281F2608DB2FE6F9E147.gpgkey Type: application/octet-stream Size: 1744 bytes Desc: not available URL: -------------- next part -------------- An HTML attachment was scrubbed... URL: From stuart_clarke86 at yahoo.com Sun Jan 25 12:51:15 2009 From: stuart_clarke86 at yahoo.com (Stuart Clarke) Date: Sun, 25 Jan 2009 17:51:15 +0000 (GMT) Subject: [fxruby-users] FX on Mac OS X Message-ID: <166890.36181.qm@web86606.mail.ird.yahoo.com> Hi, I have recently installed Ruby on my Mac closely followed by FX. My FX install seems to have went without any problems however when I try to run my apps i get the the following suggesting that FX in not installed. evt.rb:1:in `require': no such file to load -- fox16 (LoadError) from evt.rb:1 Does anyone have any ideas? Regards Stuart From migatine at gmail.com Sun Jan 25 13:03:11 2009 From: migatine at gmail.com (=?ISO-8859-1?Q?Mich=E8le_Garoche?=) Date: Sun, 25 Jan 2009 19:03:11 +0100 Subject: [fxruby-users] FX on Mac OS X In-Reply-To: <166890.36181.qm@web86606.mail.ird.yahoo.com> References: <166890.36181.qm@web86606.mail.ird.yahoo.com> Message-ID: <4F54C402-6F8F-41E2-9291-86C43CC90168@gmail.com> Le 25 janv. 2009 ? 18:51, Stuart Clarke a ?crit : > Hi, > > I have recently installed Ruby on my Mac closely followed by FX. My > FX install seems to have went without any problems however when I > try to run my apps i get the the following suggesting that FX in > not installed. > > evt.rb:1:in `require': no such file to load -- fox16 (LoadError) > from evt.rb:1 > > Does anyone have any ideas? Just put at the top of each rb file: require 'rubygems' Cheers, Mich?le -------------- next part -------------- An HTML attachment was scrubbed... URL: From lyle at lylejohnson.name Sun Jan 25 14:43:29 2009 From: lyle at lylejohnson.name (Lyle Johnson) Date: Sun, 25 Jan 2009 13:43:29 -0600 Subject: [fxruby-users] FX on Mac OS X In-Reply-To: <166890.36181.qm@web86606.mail.ird.yahoo.com> References: <166890.36181.qm@web86606.mail.ird.yahoo.com> Message-ID: On Jan 25, 2009, at 11:51 AM, Stuart Clarke wrote: > I have recently installed Ruby on my Mac closely followed by FX. When you say you've installed "FX", what exactly do you mean? Did you install the FOX library and then FXRuby? How did you install them (via MacPorts, or compiling by hand, what?) Michele's suggestion (in a different reply) is a good thing to try if you installed FXRuby as a Ruby gem. If that doesn't fix it, however, please provide some more information. From lyle at lylejohnson.name Sun Jan 25 14:55:27 2009 From: lyle at lylejohnson.name (Lyle Johnson) Date: Sun, 25 Jan 2009 13:55:27 -0600 Subject: [fxruby-users] Overriding default GUI colors In-Reply-To: <160401.70685.qm@web55606.mail.re4.yahoo.com> References: <160401.70685.qm@web55606.mail.re4.yahoo.com> Message-ID: <2A241E56-D537-450C-A1E6-06E144AAC5DA@lylejohnson.name> On Jan 24, 2009, at 6:26 AM, James Hibbard wrote: > I wrote a GUI using FXRuby under WinXP. > I then upgraded to Vista, installed Ruby (and thus by default > FXRuby) and ran my GUI. > It was then that I noticed that the colours have gone weird. > The main user interface is now white (the default colour that Vista > uses), but all of the data targets and tables have remained beige > (RGB 236, 233, 216). > Of course one can individualy declare a white background colour for > each of these widgets, but then it looks garish if run on XP or Linux. > I'm looking for a setting I can apply to make the colour for the > application uniform and overide the system default. > I already tried such things as app.backColour = FXRGB(236, 233, 216). If you didn't build FOX from source code, you probably don't have the FOX Control Panel application installed, and so you'll need to change these default colors in your application code. The trick, however, is to change the color values after the FXApp's init() method gets called, but before you create any of your application's widgets: app = FXApp.new app.init(ARGV) # # Change default colors here, e.g. # app.backColor = FXRGB(236, 233, 216) # main_window = FXMainWindow.new(app, ...) app.create app.run When you construct a widget (like an FXMainWindow), it copies the colors from FXApp, and so if you haven't changed them by that point you have to go make changes on a widget-by-widget basis (which is a pain). Also, note that in many FXRuby applications you won't see FXApp#init called explicitly, because it gets called automatically for you if you don't need it. Hope this helps, Lyle -------------- next part -------------- An HTML attachment was scrubbed... URL: From mr_nice66 at yahoo.com Sun Jan 25 15:21:06 2009 From: mr_nice66 at yahoo.com (James Hibbard) Date: Sun, 25 Jan 2009 12:21:06 -0800 (PST) Subject: [fxruby-users] Overriding default GUI colors References: <160401.70685.qm@web55606.mail.re4.yahoo.com> <2A241E56-D537-450C-A1E6-06E144AAC5DA@lylejohnson.name> Message-ID: <271643.96559.qm@web55601.mail.re4.yahoo.com> That worked perfectly :-) Thank you very much for your help, and thank you everybody else for the replies. ________________________________ From: Lyle Johnson To: fxruby-users at rubyforge.org Sent: Sunday, 25 January, 2009 20:55:27 Subject: Re: [fxruby-users] Overriding default GUI colors On Jan 24, 2009, at 6:26 AM, James Hibbard wrote: I wrote a GUI using FXRuby under WinXP. I then upgraded to Vista, installed Ruby (and thus by default FXRuby) and ran my GUI. It was then that I noticed that the colours have gone weird. The main user interface is now white (the default colour that Vista uses), but all of the data targets and tables have remained beige (RGB 236, 233, 216). Of course one can individualy declare a white background colour for each of these widgets, but then it looks garish if run on XP or Linux. I'm looking for a setting I can apply to make the colour for the application uniform and overide the system default. I already tried such things as app.backColour = FXRGB(236, 233, 216). If you didn't build FOX from source code, you probably don't have the FOX Control Panel application installed, and so you'll need to change these default colors in your application code. The trick, however, is to change the color values after the FXApp's init() method gets called, but before you create any of your application's widgets: app = FXApp.new app.init(ARGV) # # Change default colors here, e.g. # app.backColor = FXRGB(236, 233, 216) # main_window = FXMainWindow.new(app, ...) app.create app.run When you construct a widget (like an FXMainWindow), it copies the colors from FXApp, and so if you haven't changed them by that point you have to go make changes on a widget-by-widget basis (which is a pain). Also, note that in many FXRuby applications you won't see FXApp#init called explicitly, because it gets called automatically for you if you don't need it. Hope this helps, Lyle -------------- next part -------------- An HTML attachment was scrubbed... URL: From davidm at astro.berkeley.edu Mon Jan 26 02:17:12 2009 From: davidm at astro.berkeley.edu (David MacMahon) Date: Sun, 25 Jan 2009 23:17:12 -0800 Subject: [fxruby-users] FXVec* default constructors Message-ID: I just noticed that the default constructors for FXVec* do not initialize their elements. This also affects anything that uses FXVec* default constructors under the covers such as the FXExtent* default constructors. It would be nice if the docs were explicit on this "point". :-) Perhaps this is the expected behavior in C++ given the various ways that the C++ default constructor can be invoked, but in Ruby I was expecting the no-argument constructor to initialize the instance to [0.0, 0.0]... $ cat defctor.rb #!/usr/bin/env ruby require 'rubygems' require 'fox16' include Fox 500.times do |i| v = FXVec2d.new next if v[0] == 0.0 && v[1] == 0.0 p [i, v] break end puts 'done' $ ruby defctor.rb [222, [6.76425275721251e-320, 4.70741886267958e-284]] $ fox-config --version 1.6.34 $ gem list -l fxruby | grep fxruby fxruby (1.6.18) Sorry if this is old news, Dave P.S. Ruby users can get an "always initialized" default constructor by using this "monkey patch"... class Fox::FXVec2d alias :fox_initialize :initialize def initialize(*args) args = [0.0, 0.0] if args.empty? fox_initialize(*args) end end From davidm at astro.berkeley.edu Mon Jan 26 03:37:33 2009 From: davidm at astro.berkeley.edu (David MacMahon) Date: Mon, 26 Jan 2009 00:37:33 -0800 Subject: [fxruby-users] FXVec* default constructors In-Reply-To: References: Message-ID: On Jan 25, 2009, at 23:17 , David MacMahon wrote: > I just noticed that the default constructors for FXVec* do not > initialize their elements. This also affects anything that uses > FXVec* default constructors under the covers such as the FXExtent* > default constructors. Another thing to note, which I think is an fxruby and/or swig issue, is that the FXExtent* methods #lower, #upper, and #[] return a new object for each call, but all these different objects are backed by the same underlying C++ object. This can lead to weird/undesirable behavior... $ irb -r fox16 irb(main):001:0> include Fox => Object irb(main):002:0> e1=FXExtentd.new(0,1,0,1) => # irb(main):003:0> l1=e1.lower => [0.0, 0.0] irb(main):004:0> l2=e1.lower => [0.0, 0.0] irb(main):005:0> l1.eql?(l2) => false irb(main):006:0> l1.equal?(l2) => false irb(main):007:0> l1 == l2 => true irb(main):008:0> h={} => {} irb(main):009:0> h[e1.lower]=1 => 1 irb(main):010:0> h[e1.lower] => nil irb(main):011:0> l2.x = 9 => 9 irb(main):012:0> l1 => [9.0, 0.0] irb(main):013:0> e1.lower => [9.0, 0.0] It is a little disconcerting to see the state of object_id A change when object_id B is altered. If the "new-object-returned-on-every-call" behavior is due to how swig maps public members, could that mapping be persuaded to return the same object on each call? If not, could the object_id method be overridden to return the address of the underlying C++ object or does Ruby and/or swig already use #object_id as a pointer to some other "wrapper" structure? If not, it would be nice to have a method that tests whether two objects are backed by the same memory if #object_id cannot be used for that purpose. I think the moral of the story (for now?) is don't use #eql? or #equal? to compare the return values from these methods, which also means don't use them as hash indexes. Thanks, Dave From jeroen at fox-toolkit.org Mon Jan 26 10:41:47 2009 From: jeroen at fox-toolkit.org (Jeroen van der Zijp) Date: Mon, 26 Jan 2009 09:41:47 -0600 Subject: [fxruby-users] FXVec* default constructors In-Reply-To: References: Message-ID: <200901260941.47714.jeroen@fox-toolkit.org> On Monday 26 January 2009, David MacMahon wrote: > I just noticed that the default constructors for FXVec* do not > initialize their elements. This also affects anything that uses > FXVec* default constructors under the covers such as the FXExtent* > default constructors. This is in the interest of speed; one often makes [very large] arrays of these things, and initializing them would be time-consuming. > It would be nice if the docs were explicit on this "point". :-) I'll update the doc-comments. > Perhaps this is the expected behavior in C++ given the various ways > that the C++ default constructor can be invoked, but in Ruby I was > expecting the no-argument constructor to initialize the instance to > [0.0, 0.0]... There is no rule that says it need to be initialized or not in C++; it all depends on what the developer wants. In this case, they're intended to behave very much like the regular "plain old data" types, which are also only initialized if you explicitly do so. Speed is the reason why this was done. - Jeroen From davidm at astro.berkeley.edu Mon Jan 26 13:10:16 2009 From: davidm at astro.berkeley.edu (David MacMahon) Date: Mon, 26 Jan 2009 10:10:16 -0800 Subject: [fxruby-users] [Foxgui-users] FXVec* default constructors In-Reply-To: <200901260941.47714.jeroen@fox-toolkit.org> References: <200901260941.47714.jeroen@fox-toolkit.org> Message-ID: <86757B8E-2970-49FC-8989-841607D7517C@astro.berkeley.edu> On Jan 26, 2009, at 7:41 , Jeroen van der Zijp wrote: > On Monday 26 January 2009, David MacMahon wrote: >> I just noticed that the default constructors for FXVec* do not >> initialize their elements. > > This is in the interest of speed; one often makes [very large] arrays > of these things, and initializing them would be time-consuming. Makes sense. > >> It would be nice if the docs were explicit on this "point". :-) > > I'll update the doc-comments. Thanks! > There is no rule that says it need to be initialized or not in C++; > it all > depends on what the developer wants. Agreed. I'm sorry if my post sounded too whiny about this. It was intended as a documentation request rather than a complaint. Thanks for Fox! Dave From lyle at lylejohnson.name Mon Jan 26 15:51:14 2009 From: lyle at lylejohnson.name (Lyle Johnson) Date: Mon, 26 Jan 2009 14:51:14 -0600 Subject: [fxruby-users] FX on Mac OS X In-Reply-To: <839281.38814.qm@web86610.mail.ird.yahoo.com> References: <839281.38814.qm@web86610.mail.ird.yahoo.com> Message-ID: <7293A0FC-C6E7-4BEA-AD4F-9D95E57BAC88@lylejohnson.name> On Jan 26, 2009, at 2:45 PM, Stuart Clarke wrote: > Apologies for being so vague. > > I was having trouble with the Gem so I followed the instructions on > this site: > > http://lylejohnson.name/blog/2007/12/01/building-fox-and-fxruby-on-mac-os-x-leopard/ > also > > http://davidrupp.blogspot.com/2008/01/installing-fox-and-fxruby-on-mac-os-x.html > > After completing this, I was still having problems so I attempted > the gem installation again (sudo gem install fxruby). I still end > with the error that there is no FX to load. OK. And did you try doing: require 'rubygems' before loading the gem, i.e. require 'rubygems' require 'fox16' # ... your code follows ... ? From dglnz at yahoo.com Tue Jan 27 03:19:01 2009 From: dglnz at yahoo.com (dave L) Date: Tue, 27 Jan 2009 00:19:01 -0800 (PST) Subject: [fxruby-users] foxGUIb - believe it's intalled okay but.... Message-ID: <488597.5194.qm@web30002.mail.mud.yahoo.com> I've tried calling foxGUIb from command line as ... ruby foxGUIb.rb got an error - no file found by that name ruby /usr/bin/foxGUIb.rb again got error to say i didn't have permissions sudo ruby /usr/foxGUIb.rb and got informed .... /usr/bin/foxGUIb.rb:7:in `require': no such file to load -- version (LoadError) from /usr/bin/foxGUIb.rb:7 Now do i need to add anything into ruby's configuration (ie have a path pointing to anything?) Line 7 say require "Version" i have fox1.6 installed! many thanks. dave. Get the world's best email - http://nz.mail.yahoo.com/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From migatine at gmail.com Tue Jan 27 03:54:11 2009 From: migatine at gmail.com (=?ISO-8859-1?Q?Mich=E8le_Garoche?=) Date: Tue, 27 Jan 2009 09:54:11 +0100 Subject: [fxruby-users] foxGUIb - believe it's intalled okay but.... In-Reply-To: <488597.5194.qm@web30002.mail.mud.yahoo.com> References: <488597.5194.qm@web30002.mail.mud.yahoo.com> Message-ID: <2C8FEF57-3DF3-4CFF-8DBA-B0877AD037C5@gmail.com> Le 27 janv. 2009 ? 09:19, dave L a ?crit : > I've tried calling foxGUIb from command line as ... > > ruby foxGUIb.rb got an error - no file found by that name > > ruby /usr/bin/foxGUIb.rb again got error to say i didn't have > permissions > > sudo ruby /usr/foxGUIb.rb and got informed .... > /usr/bin/foxGUIb.rb:7:in `require': no such file to load -- version > (LoadError) > from /usr/bin/foxGUIb.rb:7 > > Now do i need to add anything into ruby's configuration (ie have a > path pointing to anything?) > Line 7 say require "Version" > > i have fox1.6 installed! > > many thanks. Not sure if it will be useful to you, but here's how I call foxGuib: I've the source in /usr/local/src, so, once it is compiled and installed, I jump into it: cd /usr/local/src/foxGUIb_1.0.0/foxGUIb and call it for this directory (I've read somewhere that you should be in this directory to call it); ruby foxGUI.rb Of course X11 should be open beforehand (if you're on a Mac), then after some time, you'll see the edi and can work with it. Cheers, Mich?le -------------- next part -------------- An HTML attachment was scrubbed... URL: From meinrad.recheis at gmail.com Tue Jan 27 04:04:20 2009 From: meinrad.recheis at gmail.com (Meinrad Recheis) Date: Tue, 27 Jan 2009 10:04:20 +0100 Subject: [fxruby-users] foxGUIb - believe it's intalled okay but.... In-Reply-To: <488597.5194.qm@web30002.mail.mud.yahoo.com> References: <488597.5194.qm@web30002.mail.mud.yahoo.com> Message-ID: <43d756720901270104v37778b49v5ad376df94d502fd@mail.gmail.com> On Tue, Jan 27, 2009 at 9:19 AM, dave L wrote: > I've tried calling foxGUIb from command line as ... > > ruby foxGUIb.rb got an error - no file found by that name > > ruby /usr/bin/foxGUIb.rb again got error to say i didn't have permissions > > sudo ruby /usr/foxGUIb.rb and got informed .... > /usr/bin/foxGUIb.rb:7:in `require': no such file to load -- version > (LoadError) > from /usr/bin/foxGUIb.rb:7 > > Now do i need to add anything into ruby's configuration (ie have a path > pointing to anything?) > Line 7 say require "Version" > > i have fox1.6 installed! > > many thanks. > > dave. > yes, you need to call it from the directory where foxguib.rb is located. i'm sure there is a quite easy way to get around this limitation. so if anyone cares to fix it i'd be glad to merge it in. btw.: for everyone who loves git, there is now a foxguib repo at github: git:// github.com/henon/foxguib.git -- henon -------------- next part -------------- An HTML attachment was scrubbed... URL: From serviciipeweb at yahoo.com Tue Jan 27 04:14:07 2009 From: serviciipeweb at yahoo.com (Boiko Cincarsky) Date: Tue, 27 Jan 2009 01:14:07 -0800 (PST) Subject: [fxruby-users] Multiple popup windows Message-ID: <21680238.post@talk.nabble.com> Maybe you can help me with this. I wrote a background ruby application and in special cases I need to raise popup windows for some input from user. Those windows should appear one of the time. I can`t figure out how to create multiple main windows with the same FXApp object. After FXApp.run is called the thread freeze until exit or stop. I need some ideea, something simple, maybe a main FXobject who raise some dialog boxes which I can override. But I don`t know how to do it. It`s a lack of documnetation in that dirrection. Help will be apreciated, Thanks -- View this message in context: http://www.nabble.com/Multiple-popup-windows-tp21680238p21680238.html Sent from the FXRuby Users mailing list archive at Nabble.com. From dglnz at yahoo.com Tue Jan 27 04:36:47 2009 From: dglnz at yahoo.com (dave L) Date: Tue, 27 Jan 2009 01:36:47 -0800 (PST) Subject: [fxruby-users] foxGUIb - believe it's intalled okay but.... References: <488597.5194.qm@web30002.mail.mud.yahoo.com> <43d756720901270104v37778b49v5ad376df94d502fd@mail.gmail.com> Message-ID: <586465.38518.qm@web30003.mail.mud.yahoo.com> Hi Henon & Mich?le, Sorry but i've physically gone to the /usr/bin directory and ran the command with no joy!!! here is what i've got. dave at AMD3000:/usr/bin$ ruby foxGUIb.rb ruby: Permission denied -- foxGUIb.rb (LoadError) dave at AMD3000:/usr/bin$ sudo ruby foxGUIb.rb sudo: unable to resolve host AMD3000 foxGUIb.rb:7:in `require': no such file to load -- version (LoadError) from foxGUIb.rb:7 dave at AMD3000:/usr/bin$ now i've actually got the sample programs working by going into the directory /spare/downloads/FXRuby.../examples/ruby and it's worked so i know i've got FXRuby installed okay or would it be Fox making it work? Could a ruby gem cause any issues? I did try and install a FXGem before getting FXRuby going this is what i got when last i tried to install FXRuby and so believe it installed correctly! ***** line below is start of the terminal screen grab ***** install timeout.rb /usr/local/lib/site_ruby/1.8/fox16 install undolist.rb /usr/local/lib/site_ruby/1.8/fox16 install version.rb /usr/local/lib/site_ruby/1.8/fox16 <--- lib/fox16 <--- lib ---> ext ---> ext/fox16 mkdir -p /usr/local/lib/site_ruby/1.8/i486-linux/. install fox16.so /usr/local/lib/site_ruby/1.8/i486-linux/. ---> ext/fox16/include <--- ext/fox16/include <--- ext/fox16 <--- ext dave at AMD3000:/spare/downloads/FXRuby-1.6.18$ ***** end of the terminal screen grab ***** ________________________________ From: Meinrad Recheis To: fxruby-users at rubyforge.org Sent: Tuesday, 27 January, 2009 10:04:20 PM Subject: Re: [fxruby-users] foxGUIb - believe it's intalled okay but.... On Tue, Jan 27, 2009 at 9:19 AM, dave L wrote: I've tried calling foxGUIb from command line as ... ruby foxGUIb.rb got an error - no file found by that name ruby /usr/bin/foxGUIb.rb again got error to say i didn't have permissions sudo ruby /usr/foxGUIb.rb and got informed .... /usr/bin/foxGUIb.rb:7:in `require': no such file to load -- version (LoadError) from /usr/bin/foxGUIb.rb:7 Now do i need to add anything into ruby's configuration (ie have a path pointing to anything?) Line 7 say require "Version" i have fox1.6 installed! many thanks. dave. yes, you need to call it from the directory where foxguib.rb is located. i'm sure there is a quite easy way to get around this limitation. so if anyone cares to fix it i'd be glad to merge it in. btw.: for everyone who loves git, there is now a foxguib repo at github: git://github.com/henon/foxguib.git -- henon Get the world's best email - http://nz.mail.yahoo.com/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From dglnz at yahoo.com Tue Jan 27 04:59:36 2009 From: dglnz at yahoo.com (dave L) Date: Tue, 27 Jan 2009 01:59:36 -0800 (PST) Subject: [fxruby-users] Further to my fxruby install Message-ID: <45436.78438.qm@web30002.mail.mud.yahoo.com> to try and help things more i went to this area and ran install as a means of trying to get it to run correctly but no luck as you can see from the output below. root at AMD3000:/opt/foxGUIb_1.0.0/libGUIb# ruby install.rb parsearg_config install.rb: entering config phase... ---> lib <--- lib install.rb: config done. parsearg_setup install.rb: entering setup phase... ---> lib <--- lib install.rb: setup done. parsearg_install parsearg_install!!! ARGV: install.rb: entering install phase... ---> lib mkdir -p /usr/local/lib/site_ruby/1.8/ install libGUIb14.rb /usr/local/lib/site_ruby/1.8/ install libGUIb16.rb /usr/local/lib/site_ruby/1.8/ <--- lib install.rb: install done. root at AMD3000:/opt/foxGUIb_1.0.0/libGUIb# cd .. root at AMD3000:/opt/foxGUIb_1.0.0# cd foxGUIb/ root at AMD3000:/opt/foxGUIb_1.0.0/foxGUIb# foxGUIb.rb /usr/bin/foxGUIb.rb: line 6: $:: command not found root at AMD3000:/opt/foxGUIb_1.0.0/foxGUIb# ruby foxGUIb.rb /usr/local/lib/site_ruby/1.8/libGUIb16.rb:263: warning: method redefined; discarding old to_s (eval):14: warning: `*' interpreted as argument prefix (eval):14: warning: `*' interpreted as argument prefix /usr/local/lib/site_ruby/1.8/libGUIb16.rb:938: warning: method redefined; discarding old app /usr/local/lib/site_ruby/1.8/libGUIb16.rb:943: warning: method redefined; discarding old enabled= /usr/local/lib/site_ruby/1.8/libGUIb16.rb:946: warning: discarding old enabled /usr/local/lib/site_ruby/1.8/libGUIb16.rb:947: warning: method redefined; discarding old visible= /usr/local/lib/site_ruby/1.8/libGUIb16.rb:950: warning: discarding old visible? (eval):14: warning: `*' interpreted as argument prefix ./src/gui/mainwin.rb:44: warning: method redefined; discarding old about (eval):14: warning: `*' interpreted as argument prefix (eval):14: warning: `*' interpreted as argument prefix (eval):14: warning: `*' interpreted as argument prefix (eval):14: warning: `*' interpreted as argument prefix (eval):14: warning: `*' interpreted as argument prefix (eval):14: warning: `*' interpreted as argument prefix (eval):14: warning: `*' interpreted as argument prefix No protocol specified FXRbApp::openDisplay: unable to open display :0.0 root at AMD3000:/opt/foxGUIb_1.0.0/foxGUIb# from this i then copied *all* files to another directory where call /spare/foxGUIb. Chown all files & directories to dave:dave (which is my username and my group name) and tried again. this is the result of that! dave at AMD3000:/spare/foxgui$ ruby foxGUIb.rb foxGUIb.rb:7:in `require': no such file to load -- version (LoadError) from foxGUIb.rb:7 dave at AMD3000:/spare/foxgui$ So i am missing something!!! what is version on line 7 wanting? this 1 screen of output for the foxGUIb.rb file. # Copyright (c) 2004-2008 by Henon (meinrad dot recheis at gmail dot com) # foxGUIb - main script # when started with ruby's commandline option -d output goes to $stdout otherwise to log.txt $:<<"src"<<"src/gui"<<"src/code-gen" require "version" <<<<<<<<<<<<<<<<<<<<<< believe the error occurs!!!! begin require FOXGUIB_LIBRARY rescue LoadError puts $! puts puts "Possible causes of this error are:" puts "* libGUIb is not installed" puts "* fxruby is not installed" puts "* fxruby gem could not be loaded because you did not start ruby with -rubygems option" puts "* other unexpected error. please check the following backtrace to find the cause of the error." puts puts $!.backtrace exit end regards, dave. Easy recipes for Christmas entertaining on Yahoo!Xtra Lifestyle- http://nz.lifestyle.yahoo.com/food-recipes -------------- next part -------------- An HTML attachment was scrubbed... URL: From meinrad.recheis at gmail.com Tue Jan 27 05:14:25 2009 From: meinrad.recheis at gmail.com (Meinrad Recheis) Date: Tue, 27 Jan 2009 11:14:25 +0100 Subject: [fxruby-users] foxGUIb - believe it's intalled okay but.... In-Reply-To: <586465.38518.qm@web30003.mail.mud.yahoo.com> References: <488597.5194.qm@web30002.mail.mud.yahoo.com> <43d756720901270104v37778b49v5ad376df94d502fd@mail.gmail.com> <586465.38518.qm@web30003.mail.mud.yahoo.com> Message-ID: <43d756720901270214q374d3c00id2c50e68804fea41@mail.gmail.com> On Tue, Jan 27, 2009 at 10:36 AM, dave L wrote: > Hi Henon & Mich?le, > > Sorry but i've physically gone to the /usr/bin directory and ran the > command with no joy!!! > > here is what i've got. > > dave at AMD3000:/usr/bin$ ruby foxGUIb.rb > ruby: Permission denied -- foxGUIb.rb (LoadError) > dave at AMD3000:/usr/bin$ sudo ruby foxGUIb.rb > sudo: unable to resolve host AMD3000 > foxGUIb.rb:7:in `require': no such file to load -- version (LoadError) > from foxGUIb.rb:7 > dave at AMD3000:/usr/bin$ > I doubt that foxguib.rb is located in /usr/bin. can you verify that please? I think you installed foxguib in a directory under /usr/bin such as /usr/bin/foxGUIb-1.7.0 or something like that. you need to cd in there and and start. sorry for the inconvenience. btw: you might want to move your installation of foxguib to your homedir in order to use it without sudo. -- henon > [...] > -------------- next part -------------- An HTML attachment was scrubbed... URL: From meinrad.recheis at gmail.com Tue Jan 27 05:18:57 2009 From: meinrad.recheis at gmail.com (Meinrad Recheis) Date: Tue, 27 Jan 2009 11:18:57 +0100 Subject: [fxruby-users] Further to my fxruby install In-Reply-To: <45436.78438.qm@web30002.mail.mud.yahoo.com> References: <45436.78438.qm@web30002.mail.mud.yahoo.com> Message-ID: <43d756720901270218k39759b95v4fcd28bfcfd57b2f@mail.gmail.com> version.rb is located in the same directory as foxguib.rb !!!! so it would normally find the file without a problem and load it. you are somehow calling foxguib.rb from a different directory (maybe via a symlink ?) and thus the file cannot be found. please make sure that you are located in the same dir as foxguib.rb and version.rb in order to get around this.hth, -- henon On Tue, Jan 27, 2009 at 10:59 AM, dave L wrote: > to try and help things more i went to this area and ran install as a means > of trying to get it to run correctly but no luck as you can see from the > output below. > > > root at AMD3000:/opt/foxGUIb_1.0.0/libGUIb# ruby install.rb > parsearg_config > install.rb: entering config phase... > ---> lib > <--- lib > install.rb: config done. > parsearg_setup > install.rb: entering setup phase... > ---> lib > <--- lib > install.rb: setup done. > parsearg_install > parsearg_install!!! ARGV: > install.rb: entering install phase... > ---> lib > mkdir -p /usr/local/lib/site_ruby/1.8/ > install libGUIb14.rb /usr/local/lib/site_ruby/1.8/ > install libGUIb16.rb /usr/local/lib/site_ruby/1.8/ > <--- lib > install.rb: install done. > root at AMD3000:/opt/foxGUIb_1.0.0/libGUIb# cd .. > root at AMD3000:/opt/foxGUIb_1.0.0# cd foxGUIb/ > root at AMD3000:/opt/foxGUIb_1.0.0/foxGUIb# foxGUIb.rb > /usr/bin/foxGUIb.rb: line 6: $:: command not found > root at AMD3000:/opt/foxGUIb_1.0.0/foxGUIb# ruby foxGUIb.rb > /usr/local/lib/site_ruby/1.8/libGUIb16.rb:263: warning: method redefined; > discarding old to_s > (eval):14: warning: `*' interpreted as argument prefix > (eval):14: warning: `*' interpreted as argument prefix > /usr/local/lib/site_ruby/1.8/libGUIb16.rb:938: warning: method redefined; > discarding old app > /usr/local/lib/site_ruby/1.8/libGUIb16.rb:943: warning: method redefined; > discarding old enabled= > /usr/local/lib/site_ruby/1.8/libGUIb16.rb:946: warning: discarding old > enabled > /usr/local/lib/site_ruby/1.8/libGUIb16.rb:947: warning: method redefined; > discarding old visible= > /usr/local/lib/site_ruby/1.8/libGUIb16.rb:950: warning: discarding old > visible? > (eval):14: warning: `*' interpreted as argument prefix > ./src/gui/mainwin.rb:44: warning: method redefined; discarding old about > (eval):14: warning: `*' interpreted as argument prefix > (eval):14: warning: `*' interpreted as argument prefix > (eval):14: warning: `*' interpreted as argument prefix > (eval):14: warning: `*' interpreted as argument prefix > (eval):14: warning: `*' interpreted as argument prefix > (eval):14: warning: `*' interpreted as argument prefix > (eval):14: warning: `*' interpreted as argument prefix > No protocol specified > FXRbApp::openDisplay: unable to open display :0.0 > root at AMD3000:/opt/foxGUIb_1.0.0/foxGUIb# > > > from this i then copied *all* files to another directory where call > /spare/foxGUIb. > Chown all files & directories to dave:dave (which is my username and my > group name) and tried again. > > this is the result of that! > > dave at AMD3000:/spare/foxgui$ ruby foxGUIb.rb > foxGUIb.rb:7:in `require': no such file to load -- version (LoadError) > from foxGUIb.rb:7 > dave at AMD3000:/spare/foxgui$ > > So i am missing something!!! > what is version on line 7 wanting? > this 1 screen of output for the foxGUIb.rb file. > > # Copyright (c) 2004-2008 by Henon (meinrad dot recheis at gmail dot com) > > # foxGUIb - main script > # when started with ruby's commandline option -d output goes to $stdout > otherwise to log.txt > > $:<<"src"<<"src/gui"<<"src/code-gen" > require "version" <<<<<<<<<<<<<<<<<<<<<< believe the error occurs!!!! > > begin > require FOXGUIB_LIBRARY > rescue LoadError > puts $! > puts > puts "Possible causes of this error are:" > puts "* libGUIb is not installed" > puts "* fxruby is not installed" > puts "* fxruby gem could not be loaded because you did not start ruby > with -rubygems option" > puts "* other unexpected error. please check the following backtrace to > find the cause of the error." > puts > puts $!.backtrace > exit > end > > regards, > > dave. > > Get the world's best email - Yahoo!Xtra Mail > > _______________________________________________ > fxruby-users mailing list > fxruby-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/fxruby-users > -------------- next part -------------- An HTML attachment was scrubbed... URL: From dglnz at yahoo.com Tue Jan 27 06:13:58 2009 From: dglnz at yahoo.com (dave L) Date: Tue, 27 Jan 2009 03:13:58 -0800 (PST) Subject: [fxruby-users] Further to my fxruby install References: <45436.78438.qm@web30002.mail.mud.yahoo.com> <43d756720901270218k39759b95v4fcd28bfcfd57b2f@mail.gmail.com> Message-ID: <766794.33420.qm@web30005.mail.mud.yahoo.com> okay now we're getting somewhere :) I've found the file version.rb in this directory as scrapped from the terminal (showing other files also) dave at AMD3000:/spare/downloads/foxGUIb_1.0.0/libGUIb$ ls /usr/local/lib/site_ruby/1.8/fox16/ aliases.rb exceptions_for_fxerror.rb keys.rb scintilla.rb bitmapview.rb execute_nonmodal.rb kwargs.rb settings.rb calendar.rb glgroup.rb missingdep.rb signal.rb chore.rb glshapes.rb pseudokeyboard.rb splashscreen.rb colors.rb input.rb pseudomouse.rb timeout.rb core.rb irb.rb responder2.rb undolist.rb dict.rb iterators.rb responder.rb version.rb dave at AMD3000:/spare/downloads/foxGUIb_1.0.0/libGUIb$ Now i suspect that these files should be together with foxGUIb in an area that doesn't require root access. am i right? How did this mess get like it? :) I mean i d/l the zip file, unzipped in a folder where i had access rights to as a default (namely /spare/downloads/FXRuby) I had lots of issues and tried installing a number of times. also d/l a gems version and loaded that. it didn't seem to like that either and couldn't get it to work. Now as an thought i did this and it works (scrapped from terminal) dave at AMD3000:/spare/downloads/foxGUIb_1.0.0/foxGUIb$ ruby -S /scr foxGUIb.rb ruby: No such file or directory -- /scr (LoadError) dave at AMD3000:/spare/downloads/foxGUIb_1.0.0/foxGUIb$ ruby -S /src foxGUIb.rb ruby: No such file or directory -- /src (LoadError) dave at AMD3000:/spare/downloads/foxGUIb_1.0.0/foxGUIb$ ruby foxGUIb.rb -S src/ /usr/local/lib/site_ruby/1.8/libGUIb16.rb:263: warning: method redefined; discarding old to_s (eval):14: warning: `*' interpreted as argument prefix (eval):14: warning: `*' interpreted as argument prefix /usr/local/lib/site_ruby/1.8/libGUIb16.rb:938: warning: method redefined; discarding old app /usr/local/lib/site_ruby/1.8/libGUIb16.rb:943: warning: method redefined; discarding old enabled= /usr/local/lib/site_ruby/1.8/libGUIb16.rb:946: warning: discarding old enabled /usr/local/lib/site_ruby/1.8/libGUIb16.rb:947: warning: method redefined; discarding old visible= /usr/local/lib/site_ruby/1.8/libGUIb16.rb:950: warning: discarding old visible? (eval):14: warning: `*' interpreted as argument prefix ./src/gui/mainwin.rb:44: warning: method redefined; discarding old about (eval):14: warning: `*' interpreted as argument prefix (eval):14: warning: `*' interpreted as argument prefix (eval):14: warning: `*' interpreted as argument prefix (eval):14: warning: `*' interpreted as argument prefix (eval):14: warning: `*' interpreted as argument prefix (eval):14: warning: `*' interpreted as argument prefix (eval):14: warning: `*' interpreted as argument prefix ./src/docman.rb:170: warning: instance variable @current not initialized ./src/docman.rb:173: warning: instance variable @current not initialized /usr/local/lib/site_ruby/1.8/libGUIb16.rb:102: warning: global variable `$dummy_img' not initialized I now get GUIb up and running Hurray!!! pointer in how i get it up without the errors etc above? ________________________________ From: Meinrad Recheis To: fxruby-users at rubyforge.org Sent: Tuesday, 27 January, 2009 11:18:57 PM Subject: Re: [fxruby-users] Further to my fxruby install version.rb is located in the same directory as foxguib.rb !!!! so it would normally find the file without a problem and load it. you are somehow calling foxguib.rb from a different directory (maybe via a symlink ?) and thus the file cannot be found. please make sure that you are located in the same dir as foxguib.rb and version.rb in order to get around this. hth, -- henon On Tue, Jan 27, 2009 at 10:59 AM, dave L wrote: to try and help things more i went to this area and ran install as a means of trying to get it to run correctly but no luck as you can see from the output below. root at AMD3000:/opt/foxGUIb_1.0.0/libGUIb# ruby install.rb parsearg_config install.rb: entering config phase... ---> lib <--- lib install.rb: config done. parsearg_setup install.rb: entering setup phase... ---> lib <--- lib install.rb: setup done. parsearg_install parsearg_install!!! ARGV: install.rb: entering install phase... ---> lib mkdir -p /usr/local/lib/site_ruby/1.8/ install libGUIb14.rb /usr/local/lib/site_ruby/1.8/ install libGUIb16.rb /usr/local/lib/site_ruby/1.8/ <--- lib install.rb: install done. root at AMD3000:/opt/foxGUIb_1.0.0/libGUIb# cd .. root at AMD3000:/opt/foxGUIb_1.0.0# cd foxGUIb/ root at AMD3000:/opt/foxGUIb_1.0.0/foxGUIb# foxGUIb.rb /usr/bin/foxGUIb.rb: line 6: $:: command not found root at AMD3000:/opt/foxGUIb_1.0.0/foxGUIb# ruby foxGUIb.rb /usr/local/lib/site_ruby/1.8/libGUIb16.rb:263: warning: method redefined; discarding old to_s (eval):14: warning: `*' interpreted as argument prefix (eval):14: warning: `*' interpreted as argument prefix /usr/local/lib/site_ruby/1.8/libGUIb16.rb:938: warning: method redefined; discarding old app /usr/local/lib/site_ruby/1.8/libGUIb16.rb:943: warning: method redefined; discarding old enabled= /usr/local/lib/site_ruby/1.8/libGUIb16.rb:946: warning: discarding old enabled /usr/local/lib/site_ruby/1.8/libGUIb16.rb:947: warning: method redefined; discarding old visible= /usr/local/lib/site_ruby/1.8/libGUIb16.rb:950: warning: discarding old visible? (eval):14: warning: `*' interpreted as argument prefix ./src/gui/mainwin.rb:44: warning: method redefined; discarding old about (eval):14: warning: `*' interpreted as argument prefix (eval):14: warning: `*' interpreted as argument prefix (eval):14: warning: `*' interpreted as argument prefix (eval):14: warning: `*' interpreted as argument prefix (eval):14: warning: `*' interpreted as argument prefix (eval):14: warning: `*' interpreted as argument prefix (eval):14: warning: `*' interpreted as argument prefix No protocol specified FXRbApp::openDisplay: unable to open display :0.0 root at AMD3000:/opt/foxGUIb_1.0.0/foxGUIb# from this i then copied *all* files to another directory where call /spare/foxGUIb. Chown all files & directories to dave:dave (which is my username and my group name) and tried again. this is the result of that! dave at AMD3000:/spare/foxgui$ ruby foxGUIb.rb foxGUIb.rb:7:in `require': no such file to load -- version (LoadError) from foxGUIb.rb:7 dave at AMD3000:/spare/foxgui$ So i am missing something!!! what is version on line 7 wanting? this 1 screen of output for the foxGUIb.rb file. # Copyright (c) 2004-2008 by Henon (meinrad dot recheis at gmail dot com) # foxGUIb - main script # when started with ruby's commandline option -d output goes to $stdout otherwise to log.txt $:<<"src"<<"src/gui"<<"src/code-gen" require "version" <<<<<<<<<<<<<<<<<<<<<< believe the error occurs!!!! begin require FOXGUIB_LIBRARY rescue LoadError puts $! puts puts "Possible causes of this error are:" puts "* libGUIb is not installed" puts "* fxruby is not installed" puts "* fxruby gem could not be loaded because you did not start ruby with -rubygems option" puts "* other unexpected error. please check the following backtrace to find the cause of the error." puts puts $!.backtrace exit end regards, dave. Get the world's best email - Yahoo!Xtra Mail _______________________________________________ fxruby-users mailing list fxruby-users at rubyforge.org http://rubyforge.org/mailman/listinfo/fxruby-users Easy recipes for Christmas entertaining on Yahoo!Xtra Lifestyle- http://nz.lifestyle.yahoo.com/food-recipes -------------- next part -------------- An HTML attachment was scrubbed... URL: From meinrad.recheis at gmail.com Tue Jan 27 06:39:28 2009 From: meinrad.recheis at gmail.com (Meinrad Recheis) Date: Tue, 27 Jan 2009 12:39:28 +0100 Subject: [fxruby-users] Further to my fxruby install In-Reply-To: <766794.33420.qm@web30005.mail.mud.yahoo.com> References: <45436.78438.qm@web30002.mail.mud.yahoo.com> <43d756720901270218k39759b95v4fcd28bfcfd57b2f@mail.gmail.com> <766794.33420.qm@web30005.mail.mud.yahoo.com> Message-ID: <43d756720901270339tb0e7666se047099cb479b42c@mail.gmail.com> congratulations. hmm, i see there are too many things that could possibly go wrong with an unexperienced user trying out foxguib. i will give it some thought and maybe change some things. if only i had some more time or some more clones of myself ... ^^-- henon On Tue, Jan 27, 2009 at 12:13 PM, dave L wrote: > okay now we're getting somewhere :) > > I've found the file version.rb in this directory as scrapped from the > terminal (showing other files also) > > dave at AMD3000:/spare/downloads/foxGUIb_1.0.0/libGUIb$ ls > /usr/local/lib/site_ruby/1.8/fox16/ > aliases.rb exceptions_for_fxerror.rb keys.rb scintilla.rb > bitmapview.rb execute_nonmodal.rb kwargs.rb settings.rb > calendar.rb glgroup.rb missingdep.rb signal.rb > chore.rb glshapes.rb pseudokeyboard.rb > splashscreen.rb > colors.rb input.rb pseudomouse.rb timeout.rb > core.rb irb.rb responder2.rb undolist.rb > dict.rb iterators.rb responder.rb version.rb > dave at AMD3000:/spare/downloads/foxGUIb_1.0.0/libGUIb$ > > Now i suspect that these files should be together with foxGUIb in an area > that doesn't require root access. > am i right? > > How did this mess get like it? :) > > I mean i d/l the zip file, unzipped in a folder where i had access rights > to as a default (namely > /spare/downloads/FXRuby) > I had lots of issues and tried installing a number of times. > also d/l a gems version and loaded that. > it didn't seem to like that either and couldn't get it to work. > > Now as an thought i did this and it works (scrapped from terminal) > > dave at AMD3000:/spare/downloads/foxGUIb_1.0.0/foxGUIb$ ruby -S /scr > foxGUIb.rb > ruby: No such file or directory -- /scr (LoadError) > dave at AMD3000:/spare/downloads/foxGUIb_1.0.0/foxGUIb$ ruby -S /src > foxGUIb.rb > ruby: No such file or directory -- /src (LoadError) > dave at AMD3000:/spare/downloads/foxGUIb_1.0.0/foxGUIb$ ruby foxGUIb.rb -S > src/ > /usr/local/lib/site_ruby/1.8/libGUIb16.rb:263: warning: method redefined; > discarding old to_s > (eval):14: warning: `*' interpreted as argument prefix > (eval):14: warning: `*' interpreted as argument prefix > /usr/local/lib/site_ruby/1.8/libGUIb16.rb:938: warning: method redefined; > discarding old app > /usr/local/lib/site_ruby/1.8/libGUIb16.rb:943: warning: method redefined; > discarding old enabled= > /usr/local/lib/site_ruby/1.8/libGUIb16.rb:946: warning: discarding old > enabled > /usr/local/lib/site_ruby/1.8/libGUIb16.rb:947: warning: method redefined; > discarding old visible= > /usr/local/lib/site_ruby/1.8/libGUIb16.rb:950: warning: discarding old > visible? > (eval):14: warning: `*' interpreted as argument prefix > ./src/gui/mainwin.rb:44: warning: method redefined; discarding old about > (eval):14: warning: `*' interpreted as argument prefix > (eval):14: warning: `*' interpreted as argument prefix > (eval):14: warning: `*' interpreted as argument prefix > (eval):14: warning: `*' interpreted as argument prefix > (eval):14: warning: `*' interpreted as argument prefix > (eval):14: warning: `*' interpreted as argument prefix > (eval):14: warning: `*' interpreted as argument prefix > ./src/docman.rb:170: warning: instance variable @current not initialized > ./src/docman.rb:173: warning: instance variable @current not initialized > /usr/local/lib/site_ruby/1.8/libGUIb16.rb:102: warning: global variable > `$dummy_img' not initialized > > I now get GUIb up and running Hurray!!! > pointer in how i get it up without the errors etc above? > > ------------------------------ > *From:* Meinrad Recheis > *To:* fxruby-users at rubyforge.org > *Sent:* Tuesday, 27 January, 2009 11:18:57 PM > *Subject:* Re: [fxruby-users] Further to my fxruby install > > version.rb is located in the same directory as foxguib.rb !!!! so it would > normally find the file without a problem and load it. you are somehow > calling foxguib.rb from a different directory (maybe via a symlink ?) and > thus the file cannot be found. please make sure that you are located in the > same dir as foxguib.rb and version.rb in order to get around this. hth, > -- henon > > On Tue, Jan 27, 2009 at 10:59 AM, dave L wrote: > >> to try and help things more i went to this area and ran install as a means >> of trying to get it to run correctly but no luck as you can see from the >> output below. >> >> >> root at AMD3000:/opt/foxGUIb_1.0.0/libGUIb# ruby install.rb >> parsearg_config >> install.rb: entering config phase... >> ---> lib >> <--- lib >> install.rb: config done. >> parsearg_setup >> install.rb: entering setup phase... >> ---> lib >> <--- lib >> install.rb: setup done. >> parsearg_install >> parsearg_install!!! ARGV: >> install.rb: entering install phase... >> ---> lib >> mkdir -p /usr/local/lib/site_ruby/1.8/ >> install libGUIb14.rb /usr/local/lib/site_ruby/1.8/ >> install libGUIb16.rb /usr/local/lib/site_ruby/1.8/ >> <--- lib >> install.rb: install done. >> root at AMD3000:/opt/foxGUIb_1.0.0/libGUIb# cd .. >> root at AMD3000:/opt/foxGUIb_1.0.0# cd foxGUIb/ >> root at AMD3000:/opt/foxGUIb_1.0.0/foxGUIb# foxGUIb.rb >> /usr/bin/foxGUIb.rb: line 6: $:: command not found >> root at AMD3000:/opt/foxGUIb_1.0.0/foxGUIb# ruby foxGUIb.rb >> /usr/local/lib/site_ruby/1.8/libGUIb16.rb:263: warning: method redefined; >> discarding old to_s >> (eval):14: warning: `*' interpreted as argument prefix >> (eval):14: warning: `*' interpreted as argument prefix >> /usr/local/lib/site_ruby/1.8/libGUIb16.rb:938: warning: method redefined; >> discarding old app >> /usr/local/lib/site_ruby/1.8/libGUIb16.rb:943: warning: method redefined; >> discarding old enabled= >> /usr/local/lib/site_ruby/1.8/libGUIb16.rb:946: warning: discarding old >> enabled >> /usr/local/lib/site_ruby/1.8/libGUIb16.rb:947: warning: method redefined; >> discarding old visible= >> /usr/local/lib/site_ruby/1.8/libGUIb16.rb:950: warning: discarding old >> visible? >> (eval):14: warning: `*' interpreted as argument prefix >> ./src/gui/mainwin.rb:44: warning: method redefined; discarding old about >> (eval):14: warning: `*' interpreted as argument prefix >> (eval):14: warning: `*' interpreted as argument prefix >> (eval):14: warning: `*' interpreted as argument prefix >> (eval):14: warning: `*' interpreted as argument prefix >> (eval):14: warning: `*' interpreted as argument prefix >> (eval):14: warning: `*' interpreted as argument prefix >> (eval):14: warning: `*' interpreted as argument prefix >> No protocol specified >> FXRbApp::openDisplay: unable to open display :0.0 >> root at AMD3000:/opt/foxGUIb_1.0.0/foxGUIb# >> >> >> from this i then copied *all* files to another directory where call >> /spare/foxGUIb. >> Chown all files & directories to dave:dave (which is my username and my >> group name) and tried again. >> >> this is the result of that! >> >> dave at AMD3000:/spare/foxgui$ ruby foxGUIb.rb >> foxGUIb.rb:7:in `require': no such file to load -- version (LoadError) >> from foxGUIb.rb:7 >> dave at AMD3000:/spare/foxgui$ >> >> So i am missing something!!! >> what is version on line 7 wanting? >> this 1 screen of output for the foxGUIb.rb file. >> >> # Copyright (c) 2004-2008 by Henon (meinrad dot recheis at gmail dot com) >> >> # foxGUIb - main script >> # when started with ruby's commandline option -d output goes to $stdout >> otherwise to log.txt >> >> $:<<"src"<<"src/gui"<<"src/code-gen" >> require "version" <<<<<<<<<<<<<<<<<<<<<< believe the error occurs!!!! >> >> begin >> require FOXGUIB_LIBRARY >> rescue LoadError >> puts $! >> puts >> puts "Possible causes of this error are:" >> puts "* libGUIb is not installed" >> puts "* fxruby is not installed" >> puts "* fxruby gem could not be loaded because you did not start ruby >> with -rubygems option" >> puts "* other unexpected error. please check the following backtrace to >> find the cause of the error." >> puts >> puts $!.backtrace >> exit >> end >> >> regards, >> >> dave. >> >> Get the world's best email - Yahoo!Xtra Mail >> >> _______________________________________________ >> fxruby-users mailing list >> fxruby-users at rubyforge.org >> http://rubyforge.org/mailman/listinfo/fxruby-users >> > > > Get the world's best email - Yahoo!Xtra Mail > > _______________________________________________ > fxruby-users mailing list > fxruby-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/fxruby-users > -------------- next part -------------- An HTML attachment was scrubbed... URL: From dglnz at yahoo.com Tue Jan 27 07:11:45 2009 From: dglnz at yahoo.com (dave L) Date: Tue, 27 Jan 2009 04:11:45 -0800 (PST) Subject: [fxruby-users] Further to my fxruby install References: <45436.78438.qm@web30002.mail.mud.yahoo.com> <43d756720901270218k39759b95v4fcd28bfcfd57b2f@mail.gmail.com> <766794.33420.qm@web30005.mail.mud.yahoo.com> <43d756720901270339tb0e7666se047099cb479b42c@mail.gmail.com> Message-ID: <675446.74948.qm@web30006.mail.mud.yahoo.com> Think it's more about explaining that before you even go to install get fox from if linux type OS - your OS repositories - from this site For MS windows - download from this site then instruct user to execute this file Linux ruby install.rb from MS execute installation program after fox is installed onto the pc Have the file in the root directory instead of libGUIb. I know i went into foxGUIb 1st looking for an installion notes and or suitably named run script. HTH dave. ________________________________ From: Meinrad Recheis To: fxruby-users at rubyforge.org Sent: Wednesday, 28 January, 2009 12:39:28 AM Subject: Re: [fxruby-users] Further to my fxruby install congratulations. hmm, i see there are too many things that could possibly go wrong with an unexperienced user trying out foxguib. i will give it some thought and maybe change some things. if only i had some more time or some more clones of myself ... ^^ -- henon On Tue, Jan 27, 2009 at 12:13 PM, dave L wrote: okay now we're getting somewhere :) I've found the file version.rb in this directory as scrapped from the terminal (showing other files also) dave at AMD3000:/spare/downloads/foxGUIb_1.0.0/libGUIb$ ls /usr/local/lib/site_ruby/1.8/fox16/ aliases.rb exceptions_for_fxerror.rb keys.rb scintilla.rb bitmapview.rb execute_nonmodal.rb kwargs.rb settings.rb calendar.rb glgroup.rb missingdep.rb signal.rb chore.rb glshapes.rb pseudokeyboard.rb splashscreen.rb colors.rb input.rb pseudomouse.rb timeout.rb core.rb irb.rb responder2.rb undolist.rb dict.rb iterators.rb responder.rb version.rb dave at AMD3000:/spare/downloads/foxGUIb_1.0.0/libGUIb$ Now i suspect that these files should be together with foxGUIb in an area that doesn't require root access. am i right? How did this mess get like it? :) I mean i d/l the zip file, unzipped in a folder where i had access rights to as a default (namely /spare/downloads/FXRuby) I had lots of issues and tried installing a number of times. also d/l a gems version and loaded that. it didn't seem to like that either and couldn't get it to work. Now as an thought i did this and it works (scrapped from terminal) dave at AMD3000:/spare/downloads/foxGUIb_1.0.0/foxGUIb$ ruby -S /scr foxGUIb.rb ruby: No such file or directory -- /scr (LoadError) dave at AMD3000:/spare/downloads/foxGUIb_1.0.0/foxGUIb$ ruby -S /src foxGUIb.rb ruby: No such file or directory -- /src (LoadError) dave at AMD3000:/spare/downloads/foxGUIb_1.0.0/foxGUIb$ ruby foxGUIb.rb -S src/ /usr/local/lib/site_ruby/1.8/libGUIb16.rb:263: warning: method redefined; discarding old to_s (eval):14: warning: `*' interpreted as argument prefix (eval):14: warning: `*' interpreted as argument prefix /usr/local/lib/site_ruby/1.8/libGUIb16.rb:938: warning: method redefined; discarding old app /usr/local/lib/site_ruby/1.8/libGUIb16.rb:943: warning: method redefined; discarding old enabled= /usr/local/lib/site_ruby/1.8/libGUIb16.rb:946: warning: discarding old enabled /usr/local/lib/site_ruby/1.8/libGUIb16.rb:947: warning: method redefined; discarding old visible= /usr/local/lib/site_ruby/1.8/libGUIb16.rb:950: warning: discarding old visible? (eval):14: warning: `*' interpreted as argument prefix ./src/gui/mainwin.rb:44: warning: method redefined; discarding old about (eval):14: warning: `*' interpreted as argument prefix (eval):14: warning: `*' interpreted as argument prefix (eval):14: warning: `*' interpreted as argument prefix (eval):14: warning: `*' interpreted as argument prefix (eval):14: warning: `*' interpreted as argument prefix (eval):14: warning: `*' interpreted as argument prefix (eval):14: warning: `*' interpreted as argument prefix ./src/docman.rb:170: warning: instance variable @current not initialized ./src/docman.rb:173: warning: instance variable @current not initialized /usr/local/lib/site_ruby/1.8/libGUIb16.rb:102: warning: global variable `$dummy_img' not initialized I now get GUIb up and running Hurray!!! pointer in how i get it up without the errors etc above? ________________________________ From: Meinrad Recheis To: fxruby-users at rubyforge.org Sent: Tuesday, 27 January, 2009 11:18:57 PM Subject: Re: [fxruby-users] Further to my fxruby install version.rb is located in the same directory as foxguib.rb !!!! so it would normally find the file without a problem and load it. you are somehow calling foxguib.rb from a different directory (maybe via a symlink ?) and thus the file cannot be found. please make sure that you are located in the same dir as foxguib.rb and version.rb in order to get around this. hth, -- henon On Tue, Jan 27, 2009 at 10:59 AM, dave L wrote: to try and help things more i went to this area and ran install as a means of trying to get it to run correctly but no luck as you can see from the output below. root at AMD3000:/opt/foxGUIb_1.0.0/libGUIb# ruby install.rb parsearg_config install.rb: entering config phase... ---> lib <--- lib install.rb: config done. parsearg_setup install.rb: entering setup phase... ---> lib <--- lib install.rb: setup done. parsearg_install parsearg_install!!! ARGV: install.rb: entering install phase... ---> lib mkdir -p /usr/local/lib/site_ruby/1.8/ install libGUIb14.rb /usr/local/lib/site_ruby/1.8/ install libGUIb16.rb /usr/local/lib/site_ruby/1.8/ <--- lib install.rb: install done. root at AMD3000:/opt/foxGUIb_1.0.0/libGUIb# cd .. root at AMD3000:/opt/foxGUIb_1.0.0# cd foxGUIb/ root at AMD3000:/opt/foxGUIb_1.0.0/foxGUIb# foxGUIb.rb /usr/bin/foxGUIb.rb: line 6: $:: command not found root at AMD3000:/opt/foxGUIb_1.0.0/foxGUIb# ruby foxGUIb.rb /usr/local/lib/site_ruby/1.8/libGUIb16.rb:263: warning: method redefined; discarding old to_s (eval):14: warning: `*' interpreted as argument prefix (eval):14: warning: `*' interpreted as argument prefix /usr/local/lib/site_ruby/1.8/libGUIb16.rb:938: warning: method redefined; discarding old app /usr/local/lib/site_ruby/1.8/libGUIb16.rb:943: warning: method redefined; discarding old enabled= /usr/local/lib/site_ruby/1.8/libGUIb16.rb:946: warning: discarding old enabled /usr/local/lib/site_ruby/1.8/libGUIb16.rb:947: warning: method redefined; discarding old visible= /usr/local/lib/site_ruby/1.8/libGUIb16.rb:950: warning: discarding old visible? (eval):14: warning: `*' interpreted as argument prefix ./src/gui/mainwin.rb:44: warning: method redefined; discarding old about (eval):14: warning: `*' interpreted as argument prefix (eval):14: warning: `*' interpreted as argument prefix (eval):14: warning: `*' interpreted as argument prefix (eval):14: warning: `*' interpreted as argument prefix (eval):14: warning: `*' interpreted as argument prefix (eval):14: warning: `*' interpreted as argument prefix (eval):14: warning: `*' interpreted as argument prefix No protocol specified FXRbApp::openDisplay: unable to open display :0.0 root at AMD3000:/opt/foxGUIb_1.0.0/foxGUIb# from this i then copied *all* files to another directory where call /spare/foxGUIb. Chown all files & directories to dave:dave (which is my username and my group name) and tried again. this is the result of that! dave at AMD3000:/spare/foxgui$ ruby foxGUIb.rb foxGUIb.rb:7:in `require': no such file to load -- version (LoadError) from foxGUIb.rb:7 dave at AMD3000:/spare/foxgui$ So i am missing something!!! what is version on line 7 wanting? this 1 screen of output for the foxGUIb.rb file. # Copyright (c) 2004-2008 by Henon (meinrad dot recheis at gmail dot com) # foxGUIb - main script # when started with ruby's commandline option -d output goes to $stdout otherwise to log.txt $:<<"src"<<"src/gui"<<"src/code-gen" require "version" <<<<<<<<<<<<<<<<<<<<<< believe the error occurs!!!! begin require FOXGUIB_LIBRARY rescue LoadError puts $! puts puts "Possible causes of this error are:" puts "* libGUIb is not installed" puts "* fxruby is not installed" puts "* fxruby gem could not be loaded because you did not start ruby with -rubygems option" puts "* other unexpected error. please check the following backtrace to find the cause of the error." puts puts $!.backtrace exit end regards, dave. Get the world's best email - Yahoo!Xtra Mail _______________________________________________ fxruby-users mailing list fxruby-users at rubyforge.org http://rubyforge.org/mailman/listinfo/fxruby-users Get the world's best email - Yahoo!Xtra Mail _______________________________________________ fxruby-users mailing list fxruby-users at rubyforge.org http://rubyforge.org/mailman/listinfo/fxruby-users Get the world's best email - http://nz.mail.yahoo.com/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From lyle at lylejohnson.name Tue Jan 27 09:15:49 2009 From: lyle at lylejohnson.name (Lyle Johnson) Date: Tue, 27 Jan 2009 08:15:49 -0600 Subject: [fxruby-users] FX on Mac OS X In-Reply-To: <188254.35177.qm@web86606.mail.ird.yahoo.com> References: <188254.35177.qm@web86606.mail.ird.yahoo.com> Message-ID: <761DF80D-6F7B-4501-85DA-C236A08805C8@lylejohnson.name> On Jan 26, 2009, at 2:50 PM, Stuart Clarke wrote: > PS. I have also tried Michele's suggestion, but nothing changes, OK. Let's dig a little deeper then. Go to the command line and type: gem environment gemdir This should give some output like: /usr/local/lib/ruby/gems/1.8 Change directories to the "gems" subdirectory under this directory, e.g. cd `gem environment gemdir`/gems If you list the subdirectories in this directory, one of them should be "fxruby-1.6.18". Let's check to see if the extension actually built successfully: ls /usr/local/lib/ruby/gems/1.8/gems/fxruby-1.6.18/ext/fox16/*.bundle Does that last command (with the appropriate path for your machine, of course) show a "fox16.bundle" file? From stuart_clarke86 at yahoo.com Tue Jan 27 15:13:56 2009 From: stuart_clarke86 at yahoo.com (Stuart Clarke) Date: Tue, 27 Jan 2009 20:13:56 +0000 (GMT) Subject: [fxruby-users] FX on Mac OS X In-Reply-To: <761DF80D-6F7B-4501-85DA-C236A08805C8@lylejohnson.name> Message-ID: <476126.50255.qm@web86612.mail.ird.yahoo.com> Thats great, were up and running now. Many thanks, first class support as ever. --- On Tue, 27/1/09, Lyle Johnson wrote: > From: Lyle Johnson > Subject: Re: [fxruby-users] FX on Mac OS X > To: fxruby-users at rubyforge.org > Date: Tuesday, 27 January, 2009, 2:15 PM > On Jan 26, 2009, at 2:50 PM, Stuart Clarke wrote: > > > PS. I have also tried Michele's suggestion, but > nothing changes, > > OK. Let's dig a little deeper then. Go to the command > line and type: > > gem environment gemdir > > This should give some output like: > > /usr/local/lib/ruby/gems/1.8 > > Change directories to the "gems" subdirectory > under this directory, e.g. > > cd `gem environment gemdir`/gems > > If you list the subdirectories in this directory, one of > them should be "fxruby-1.6.18". Let's check to > see if the extension actually built successfully: > > ls > /usr/local/lib/ruby/gems/1.8/gems/fxruby-1.6.18/ext/fox16/*.bundle > > Does that last command (with the appropriate path for your > machine, of course) show a "fox16.bundle" file? > _______________________________________________ > fxruby-users mailing list > fxruby-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/fxruby-users From dglnz at yahoo.com Wed Jan 28 03:55:28 2009 From: dglnz at yahoo.com (dave L) Date: Wed, 28 Jan 2009 00:55:28 -0800 (PST) Subject: [fxruby-users] (no subject) Message-ID: <614648.45105.qm@web30005.mail.mud.yahoo.com> okay now that i've got GUIb running time to play :) Issue i now have is the 1st example in the online tutorial troubling version 2 where we separate code from the generated code of GUIb. here is my source require "inchesX" Class inchesX #events def init convertButton.connect(SEL_COMMAND){ cmLabel.text = (inchesField.text.to_f * 2.54).to_s} end #unit test if __FILE__==$0 require "FX" app=App.new w=inchesX.new app w.topwin.show(0) app.create app.run end and here is the error i get when run from teh terminal (using kate to code wit a terminal at the bottom so i don't have to flick between windows/programs. dave at AMD3000:/spare/foxgui$ ruby ExtendInches.rb ExtendInches.rb:2: undefined local variable or method `inchesX' for main:Object (NameError) dave at AMD3000:/spare/foxgui$ I have just tried as an experiment adding inchesX:: in front of the Widget names (eg inchesX::cmLabel...) but still no joy!! have also tried adding a require fox16 above the require inchesX wit no joy. pointers please. dave. Easy recipes for Christmas entertaining on Yahoo!Xtra Lifestyle- http://nz.lifestyle.yahoo.com/food-recipes -------------- next part -------------- An HTML attachment was scrubbed... URL: From dglnz at yahoo.com Wed Jan 28 06:12:01 2009 From: dglnz at yahoo.com (dave L) Date: Wed, 28 Jan 2009 03:12:01 -0800 (PST) Subject: [fxruby-users] dipping one foot into the fox Message-ID: <42865.41268.qm@web30005.mail.mud.yahoo.com> Right-ho, looking at exercise 2 of the tutorial i've decided to extend what is shown to do this. - Save dialog box - Open dialog box got the main window setup and 1 dialog box with a generic message saying this hasn't been implemented yet with a close button on it. below is the code done so far for the dialog box (any place i can be pointed to for FAQ's on what common errors i might hit? Question : this is completely off the topic of my coding error but is related to HOW one goes about structuring multiple windows like this (coming from a RAD - Delphi background) where one has a project container folder and dialog boxes like this are within the application would one put the dialog window in as a child or have it as i have - a seperate file? My code I've written tonight I could have the command done with the form BUT it would defeat my reason for doing this - namely understand how i do things in code - use GUIb to position widget etc only! TextEd_DiaBoxEx.rb code written tonight - errors are as shown below. dave at AMD3000:/spare/foxgui$ ruby TextEd_DiaBoxEx.rb TextEd_DiaBoxEx.rb:3: syntax error, unexpected '\n', expecting tCOLON2 or '[' or '.' TextEd_DiaBoxEx.rb:9: syntax error, unexpected kEND, expecting $end dave at AMD3000:/spare/foxgui$ require "TextEd_DiaBox" class "TextEd_DiaBox" def init button1.connect(SEL_COMMAND) {me.close} #Button is clicked so close the dialogbox! end end concentrate on this then i'll have a crack at the Open & save Dialog boxes of which this will be one actually i'd like to dynamically use this based on which button is pushed the user sees one of TWO panels. Panel 1 would have save as caption and allow the saving of text written. Panel 2 would have Open File caption and load the file. Close button would exit the app - no saving or attempting to check etc. Version 2 would do some sort of check and ask the user a question about saving before exiting. TextEd_DiaBox.rb source code.... Not problems # source generated by foxGUIb 1.0.0 class DialogBox def initialize( parent) construct_widget_tree( parent) init if respond_to? 'init' end def construct_widget_tree( parent) @topwin= FX::DialogBox.new(parent){|w| @dialogBox=w w.wdg_name='dialogBox' w.width=436 w.shown=true w.y=339 w.height=93 w.decorations=131072 w.title="Dialog Box" w.layoutHints=768 w.x=268 FX::Label.new(@dialogBox){|w| @label1=w w.wdg_name='label1' w.text="Sample text to be displayed but not yet implemented as yet" w.padLeft=10 w.frameStyle=20480 w.font=FX::Font.new.from_s('AlArabiya [unknown]|90|40|5|0|0|0').to_FXFont w.width=342 w.padRight=10 w.height=29 w.padTop=0 w.layoutHints=8 w.x=47 } FX::Button.new(@dialogBox){|w| @button1=w w.wdg_name='button1' w.text="CLOSE" w.font=FX::Font.new.from_s('FreeMono [unknown]|140|70|5|0|0|768').to_FXFont w.width=68 w.buttonButtonStyle=67108864 w.y=49 w.height=28 w.layoutHints=40 w.x=184 } } end attr_reader :topwin attr_reader :dialogBox attr_reader :label1 attr_reader :button1 end #unit test if __FILE__==$0 require 'libGUIb16' app=FX::App.new w=DialogBox.new app w.topwin.show(Fox::PLACEMENT_SCREEN) app.create app.run end Easy recipes for Christmas entertaining on Yahoo!Xtra Lifestyle- http://nz.lifestyle.yahoo.com/food-recipes -------------- next part -------------- An HTML attachment was scrubbed... URL: From lyle at lylejohnson.name Wed Jan 28 08:32:24 2009 From: lyle at lylejohnson.name (Lyle Johnson) Date: Wed, 28 Jan 2009 07:32:24 -0600 Subject: [fxruby-users] (no subject) In-Reply-To: <614648.45105.qm@web30005.mail.mud.yahoo.com> References: <614648.45105.qm@web30005.mail.mud.yahoo.com> Message-ID: <57069BA1-85B1-4426-B1B1-BB8FCEFEA602@lylejohnson.name> On Jan 28, 2009, at 2:55 AM, dave L wrote: > here is my source > > require "inchesX" > Class inchesX > #events > def init > > convertButton.connect(SEL_COMMAND){ > cmLabel.text = (inchesField.text.to_f * 2.54).to_s} > end > > > #unit test > if __FILE__==$0 > require "FX" > app=App.new > w=inchesX.new app > w.topwin.show(0) > app.create > app.run > end > > and here is the error i get when run from teh terminal (using kate > to code wit a terminal at the bottom so i don't have to flick > between windows/programs. > > dave at AMD3000:/spare/foxgui$ ruby ExtendInches.rb > ExtendInches.rb:2: undefined local variable or method `inchesX' for > main:Object (NameError) This is an odd-looking program. It's tough to know where to begin. One obvious problem you're running into is that class names in Ruby must begin with an uppercase letter. You will need to rename your "inchesX" class to "InchesX". Also, the code that you're showing is incomplete: class inchesX def init convertButton.connect(SEL_COMMAND) { cmLabel.text = (inchesField.text.to_f*2.54).to_s } end There's no "end" statement corresponding to the "class" statement, so I'm surprised this parsed at all. What does the contents of the "inchesX.rb" file look like? In your main program (i.e. the part in the "if __FILE__" block), you call: inchesX.new app but unless the code in "inchesX.rb" contains a corresponding initialize() method, that's not going to work either. -------------- next part -------------- An HTML attachment was scrubbed... URL: From meinrad.recheis at gmail.com Wed Jan 28 14:42:41 2009 From: meinrad.recheis at gmail.com (Meinrad Recheis) Date: Wed, 28 Jan 2009 20:42:41 +0100 Subject: [fxruby-users] (no subject) In-Reply-To: <57069BA1-85B1-4426-B1B1-BB8FCEFEA602@lylejohnson.name> References: <614648.45105.qm@web30005.mail.mud.yahoo.com> <57069BA1-85B1-4426-B1B1-BB8FCEFEA602@lylejohnson.name> Message-ID: <43d756720901281142k17726a20l76ad47e6e7c9ab52@mail.gmail.com> On Wed, Jan 28, 2009 at 2:32 PM, Lyle Johnson wrote: > > On Jan 28, 2009, at 2:55 AM, dave L wrote: > > here is my source > > require "inchesX" > Class inchesX > #events > def init > > convertButton.connect(SEL_COMMAND){ > cmLabel.text = (inchesField.text.to_f * 2.54).to_s} > end > > > #unit test > if __FILE__==$0 > require "FX" > app=App.new > w=inchesX.new app > w.topwin.show(0) > app.create > app.run > end > > and here is the error i get when run from teh terminal (using kate to code > wit a terminal at the bottom so i don't have to flick between > windows/programs. > > dave at AMD3000:/spare/foxgui$ ruby ExtendInches.rb > ExtendInches.rb:2: undefined local variable or method `inchesX' for > main:Object (NameError) > > > This is an odd-looking program. It's tough to know where to begin. > > One obvious problem you're running into is that class names in Ruby must > begin with an uppercase letter. You will need to rename your "inchesX" class > to "InchesX". > > Also, the code that you're showing is incomplete: > > class inchesX > def init > convertButton.connect(SEL_COMMAND) { cmLabel.text = > (inchesField.text.to_f*2.54).to_s } > end > > There's no "end" statement corresponding to the "class" statement, so I'm > surprised this parsed at all. What does the contents of the "inchesX.rb" > file look like? > > In your main program (i.e. the part in the "if __FILE__" block), you call: > > inchesX.new app > > but unless the code in "inchesX.rb" contains a corresponding initialize() > method, that's not going to work either. > yes it will, because the initialize method is defined in the source file generated by foxGUIb. this example in the users guide is about keeping manual additions separated from generated code in order to be able to re-generate it. -- henon -------------- next part -------------- An HTML attachment was scrubbed... URL: From meinrad.recheis at gmail.com Wed Jan 28 14:51:49 2009 From: meinrad.recheis at gmail.com (Meinrad Recheis) Date: Wed, 28 Jan 2009 20:51:49 +0100 Subject: [fxruby-users] dipping one foot into the fox In-Reply-To: <42865.41268.qm@web30005.mail.mud.yahoo.com> References: <42865.41268.qm@web30005.mail.mud.yahoo.com> Message-ID: <43d756720901281151x413223e3g3865c1ce61f6e00f@mail.gmail.com> On Wed, Jan 28, 2009 at 12:12 PM, dave L wrote: > Right-ho, > > looking at exercise 2 of the tutorial i've decided to extend what is shown > to do this. > - Save dialog box > - Open dialog box > got the main window setup and 1 dialog box with a generic message saying > this hasn't been implemented yet with a close button on it. > > below is the code done so far for the dialog box (any place i can be > pointed to for FAQ's on what common errors i might hit? > I'd suggest you read the online pickaxe or follow some tutorials to gain a substantial base of ruby skills before continuing here. then you will know how not to produce so many syntax errors ;) http://www.ruby-doc.org/docs/ProgrammingRuby/ > > Question : > this is completely off the topic of my coding error but is related to HOW > one goes about structuring multiple windows like this (coming from a RAD - > Delphi background) where one has a project container folder and dialog boxes > like this are within the application would one put the dialog window in as a > child or have it as i have - a seperate file? > For a multiwindow application one typically has a MainWindow and some DialogBoxes (which is almost the same as MainWindow). Or you can have multiple MainWindows, or just multiple DialogBox instances. I suggest to read the fxruby users guide: http://www.fxruby.org/doc/book.html > > > > My code I've written tonight I could have the command done with the form > BUT it would defeat my reason for doing this - namely understand how i do > things in code - use GUIb to position widget etc only! > > TextEd_DiaBoxEx.rb code written tonight - errors are as shown below. > > dave at AMD3000:/spare/foxgui$ ruby TextEd_DiaBoxEx.rb > TextEd_DiaBoxEx.rb:3: syntax error, unexpected '\n', expecting tCOLON2 or > '[' or '.' > TextEd_DiaBoxEx.rb:9: syntax error, unexpected kEND, expecting $end > dave at AMD3000:/spare/foxgui$ > > require "TextEd_DiaBox" > > class "TextEd_DiaBox" > this is not a Ruby class name here! drop the " hth -- henon > > > def init > button1.connect(SEL_COMMAND) {me.close} #Button is clicked so close > the dialogbox! > > end > end > > concentrate on this then i'll have a crack at the Open & save Dialog boxes > of which this will be one > actually i'd like to dynamically use this based on which button is pushed > the user sees one of TWO panels. > Panel 1 would have save as caption and allow the saving of text written. > Panel 2 would have Open File caption and load the file. > Close button would exit the app - no saving or attempting to check etc. > > Version 2 would do some sort of check and ask the user a question about > saving before exiting. > > TextEd_DiaBox.rb source code.... Not problems > # source generated by foxGUIb 1.0.0 > > class DialogBox > def initialize( parent) > construct_widget_tree( parent) > init if respond_to? 'init' > end > > def construct_widget_tree( parent) > @topwin= > FX::DialogBox.new(parent){|w| > @dialogBox=w > w.wdg_name='dialogBox' > w.width=436 > w.shown=true > w.y=339 > w.height=93 > w.decorations=131072 > w.title="Dialog Box" > w.layoutHints=768 > w.x=268 > FX::Label.new(@dialogBox){|w| > @label1=w > w.wdg_name='label1' > w.text="Sample text to be displayed but not yet implemented > as yet" > w.padLeft=10 > w.frameStyle=20480 > w.font=FX::Font.new.from_s('AlArabiya > [unknown]|90|40|5|0|0|0').to_FXFont > w.width=342 > w.padRight=10 > w.height=29 > w.padTop=0 > w.layoutHints=8 > w.x=47 > } > FX::Button.new(@dialogBox){|w| > @button1=w > w.wdg_name='button1' > w.text="CLOSE" > w.font=FX::Font.new.from_s('FreeMono > [unknown]|140|70|5|0|0|768').to_FXFont > w.width=68 > w.buttonButtonStyle=67108864 > w.y=49 > w.height=28 > w.layoutHints=40 > w.x=184 > } > } > end > attr_reader :topwin > attr_reader :dialogBox > attr_reader :label1 > attr_reader :button1 > end > > #unit test > if __FILE__==$0 > require 'libGUIb16' > app=FX::App.new > w=DialogBox.new app > w.topwin.show(Fox::PLACEMENT_SCREEN) > app.create > app.run > end > > > > Food for the party season- Easy recipes for Christmas entertaining on Yahoo!Xtra Lifestyle > > _______________________________________________ > fxruby-users mailing list > fxruby-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/fxruby-users > -------------- next part -------------- An HTML attachment was scrubbed... URL: From kb9agt at gmail.com Wed Jan 28 16:12:15 2009 From: kb9agt at gmail.com (Douglas Allen) Date: Wed, 28 Jan 2009 15:12:15 -0600 Subject: [fxruby-users] GTK2 Message-ID: I am looking at using gtk2 now that I have just tasted fox16. I tend to play with these programs when I first discover them but after a while go on to something else. I have GUI tool kits for both now and was wanting to see if others here have tried gtk2 also. I will get into a forum there when I learn a little more basic ruby. There is an online course for FXruby here: http://rubylearning.com/blog/2008/10/20/fxruby-yaml-activerecord-and-database-a-new-course/ Looking for folks interested in GTK2. From lyle at lylejohnson.name Wed Jan 28 17:48:59 2009 From: lyle at lylejohnson.name (Lyle Johnson) Date: Wed, 28 Jan 2009 16:48:59 -0600 Subject: [fxruby-users] FXVec* default constructors In-Reply-To: References: Message-ID: <57cf8f720901281448l7d5e8efave145810c0260a9a2@mail.gmail.com> On Mon, Jan 26, 2009 at 2:37 AM, David MacMahon wrote: > Another thing to note, which I think is an fxruby and/or swig issue, is that > the FXExtent* methods #lower, #upper, and #[] return a new object for each > call, but all these different objects are backed by the same underlying C++ > object. This can lead to weird/undesirable behavior... Yes, that's a problem. I'll see what I can do about modifying those methods (FXExtentd#lower, upper, and []) so that they always return a reference to the same Ruby object. P.S. Also made a fix for the uninitialized values for the FXVec classes. Thanks for pointing that out! From dglnz at yahoo.com Wed Jan 28 19:27:41 2009 From: dglnz at yahoo.com (dave L) Date: Wed, 28 Jan 2009 16:27:41 -0800 (PST) Subject: [fxruby-users] (no subject) In-Reply-To: <57069BA1-85B1-4426-B1B1-BB8FCEFEA602@lylejohnson.name> Message-ID: <937995.55787.qm@web30006.mail.mud.yahoo.com> The code that you see in my original post is SUPPOSED to be the same as that which is shown in the GUIb tutorial. Okay the file name isn't the same _but_ that shouldn't matter. the lower case c in class was a capital but i still had the same error. --- On Thu, 29/1/09, Lyle Johnson wrote: > From: Lyle Johnson > Subject: Re: [fxruby-users] (no subject) > To: fxruby-users at rubyforge.org > Received: Thursday, 29 January, 2009, 2:32 AM > On Jan 28, 2009, at 2:55 AM, dave L wrote: > > > here is my source > > > > require "inchesX" > > Class inchesX > > #events > > def init > > > > convertButton.connect(SEL_COMMAND){ > > cmLabel.text = (inchesField.text.to_f * > 2.54).to_s} > > end > > > > > > #unit test > > if __FILE__==$0 > > require "FX" > > app=App.new > > w=inchesX.new app > > w.topwin.show(0) > > app.create > > app.run > > end > > > > and here is the error i get when run from teh terminal > (using kate to code wit a terminal at the bottom so i > don't have to flick between windows/programs. > > > > dave at AMD3000:/spare/foxgui$ ruby ExtendInches.rb > > ExtendInches.rb:2: undefined local variable or method > `inchesX' for main:Object (NameError) > > This is an odd-looking program. It's tough to know > where to begin. > > One obvious problem you're running into is that class > names in Ruby must begin with an uppercase letter. You will > need to rename your "inchesX" class to > "InchesX". > > Also, the code that you're showing is incomplete: > > class inchesX > def init > convertButton.connect(SEL_COMMAND) { cmLabel.text = > (inchesField.text.to_f*2.54).to_s } > end > > There's no "end" statement corresponding to > the "class" statement, so I'm surprised this > parsed at all. What does the contents of the > "inchesX.rb" file look like? > > In your main program (i.e. the part in the "if > __FILE__" block), you call: > > inchesX.new app > > but unless the code in "inchesX.rb" contains a > corresponding initialize() method, that's not going to > work either._______________________________________________ > fxruby-users mailing list > fxruby-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/fxruby-users Easy recipes for Christmas entertaining on Yahoo!Xtra Lifestyle- http://nz.lifestyle.yahoo.com/food-recipes From dglnz at yahoo.com Wed Jan 28 20:08:57 2009 From: dglnz at yahoo.com (dave L) Date: Wed, 28 Jan 2009 17:08:57 -0800 (PST) Subject: [fxruby-users] GTK2 In-Reply-To: Message-ID: <472242.54507.qm@web30008.mail.mud.yahoo.com> regarding your comment about learning more basic ruby my i suggest this FREE online site. www.rubylearning.com I did 2 class (bit thick :)). and then sat on my hands until recently. may even redo it again sometime this year. lost of mentors/assistant instructors etc. expectations? you participate in forums by posting your code and helping others. 1 lession (a number of excerises last 1 week - Sat - Sat) all at India Std Time. have a look it's worth it and FREE - course is 3 months (12 weeks). cheers, dave. --- On Thu, 29/1/09, Douglas Allen wrote: > From: Douglas Allen > Subject: [fxruby-users] GTK2 > To: fxruby-users at rubyforge.org > Received: Thursday, 29 January, 2009, 10:12 AM > I am looking at using gtk2 now that I have just tasted > fox16. I tend > to play with these programs when I first discover them but > after a > while go on to something else. I have GUI tool kits for > both now and > was wanting to see if others here have tried gtk2 also. I > will get > into a forum there when I learn a little more basic ruby. > There is an > online course for FXruby here: > > http://rubylearning.com/blog/2008/10/20/fxruby-yaml-activerecord-and-database-a-new-course/ > > Looking for folks interested in GTK2. > _______________________________________________ > fxruby-users mailing list > fxruby-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/fxruby-users Easy recipes for Christmas entertaining on Yahoo!Xtra Lifestyle- http://nz.lifestyle.yahoo.com/food-recipes From lyle at lylejohnson.name Thu Jan 29 09:06:19 2009 From: lyle at lylejohnson.name (Lyle Johnson) Date: Thu, 29 Jan 2009 08:06:19 -0600 Subject: [fxruby-users] Considering a move to GitHub Message-ID: <57cf8f720901290606x7fc89a27y4508b951169b5b3e@mail.gmail.com> I'm considering moving the source code repository for FXRuby over to GitHub and wanted to float the idea here first to make sure there are no objections. I don't get the impression that anyone is actively watching the Subversion repository that's currently hosted at RubyForge, and I'm using Git almost exclusively these days anyways. There's the added bonus that a move to GitHub might encourage more people to fork the code and make changes, contributions, etc.---more so than has happened to date. Any thoughts? If no one raises any objections by, say, Monday, I'll probably go ahead and make the switch next week. The existing Subversion repository at RubyForge will effectively become frozen at that point. From meinrad.recheis at gmail.com Thu Jan 29 09:59:06 2009 From: meinrad.recheis at gmail.com (Meinrad Recheis) Date: Thu, 29 Jan 2009 15:59:06 +0100 Subject: [fxruby-users] Considering a move to GitHub In-Reply-To: <57cf8f720901290606x7fc89a27y4508b951169b5b3e@mail.gmail.com> References: <57cf8f720901290606x7fc89a27y4508b951169b5b3e@mail.gmail.com> Message-ID: <43d756720901290659j17a39cb2g72998f58643b884@mail.gmail.com> On Thu, Jan 29, 2009 at 3:06 PM, Lyle Johnson wrote: > I'm considering moving the source code repository for FXRuby over to > GitHub and wanted to float the idea here first to make sure there are > no objections. > > I don't get the impression that anyone is actively watching the > Subversion repository that's currently hosted at RubyForge, and I'm > using Git almost exclusively these days anyways. There's the added > bonus that a move to GitHub might encourage more people to fork the > code and make changes, contributions, etc.---more so than has happened > to date. > > Any thoughts? If no one raises any objections by, say, Monday, I'll > probably go ahead and make the switch next week. The existing > Subversion repository at RubyForge will effectively become frozen at > that point. I'd do it. I can think only of advantages from a move to github. cheers, -- henon -------------- next part -------------- An HTML attachment was scrubbed... URL: From lyle at lylejohnson.name Thu Jan 29 12:29:52 2009 From: lyle at lylejohnson.name (Lyle Johnson) Date: Thu, 29 Jan 2009 11:29:52 -0600 Subject: [fxruby-users] [Foxgui-users] Considering a move to GitHub In-Reply-To: <34CA156948227742B5CD7445A3C0BC4004163CDA@AL07EXM01.gddsi.com> References: <57cf8f720901290606x7fc89a27y4508b951169b5b3e@mail.gmail.com> <34CA156948227742B5CD7445A3C0BC4004163CDA@AL07EXM01.gddsi.com> Message-ID: On Jan 29, 2009, at 9:16 AM, Hubbell, Sean-W49290 wrote: > If you do not mind me asking, are there any reasons that you are using > Git over Subversion? One of the main reasons is being able to work (i.e. make commits) offline, without being connected to the remote repository. But if that's all I needed, I could have used something like SVK (which I did experiment with, for awhile). The main thing I like about Git is that it's a lot faster, generally speaking, than Subversion, in terms of things like making commits, creating branches, and so forth. And I can use Git to track Subversion repositories, for those projects (like some at work) that can't move away from Subversion. From meinrad.recheis at gmail.com Thu Jan 29 13:11:37 2009 From: meinrad.recheis at gmail.com (Meinrad Recheis) Date: Thu, 29 Jan 2009 19:11:37 +0100 Subject: [fxruby-users] [Foxgui-users] Considering a move to GitHub In-Reply-To: References: <57cf8f720901290606x7fc89a27y4508b951169b5b3e@mail.gmail.com> <34CA156948227742B5CD7445A3C0BC4004163CDA@AL07EXM01.gddsi.com> Message-ID: <43d756720901291011v7c842b0fsbc40b7faec9ec6c6@mail.gmail.com> On Thu, Jan 29, 2009 at 6:29 PM, Lyle Johnson wrote: > > On Jan 29, 2009, at 9:16 AM, Hubbell, Sean-W49290 wrote: > > If you do not mind me asking, are there any reasons that you are using >> Git over Subversion? > > With git I am able to check in my daily work in a different branch (efficiently, svn is dead slow with branches) without affecting the current stable development branch my fellows are depending on. I also like to keep a git repo on an usb stick to be able to switch computers and systems easily. I also like tracking subversion working directories with a git repo to be able to work offline. The best thing, however, is git's "rebase" function. you can work on a branch for a long time without getting completely off from the main branch by continuously rebasing your branch on the main line. with subversion i once made a long lived branch, did some serious refactoring to improve the design and later had to abandon all the work because it was simply too costly to merge it back to the main branch which had evolved very much. -- henon -------------- next part -------------- An HTML attachment was scrubbed... URL: