From lyle at lylejohnson.name Tue Jun 3 10:41:00 2008 From: lyle at lylejohnson.name (Lyle Johnson) Date: Tue, 3 Jun 2008 09:41:00 -0500 Subject: [fxruby-users] Getting items to fill a column In-Reply-To: <14cf210a0805311342o76770539jbb6e429c6a358c78@mail.gmail.com> References: <14cf210a0805311342o76770539jbb6e429c6a358c78@mail.gmail.com> Message-ID: <976B8A3E-300D-4CEC-B72E-5E44EA175430@lylejohnson.name> On May 31, 2008, at 3:42 PM, Jonathan Stott wrote: > I'd like to get the images display at the centre of a column and have > a uniform width for all columns. The centering I have fixed, but no > combinations of setting width and height options and LAYOUT_FILLs > seems to work to get columns to display at the same width, no matter > the width of the image within. Jonathan, You're still using the matrix-style layout, right? Are you specifying LAYOUT_FILL_COLUMN (in addition to LAYOUT_FILL_X) for the widgets in the matrix? Take a look at the information about this in section 12.2 of the book and see if that addresses your problem. If it doesn't, let me know and I'll take a closer look. Hope this helps, Lyle --- "FXRuby: Create Lean and Mean GUIs with Ruby" Now available from the Pragmatic Bookshelf! http://www.pragprog.com/titles/fxruby From jonathan.stott at gmail.com Tue Jun 3 16:04:28 2008 From: jonathan.stott at gmail.com (Jonathan Stott) Date: Tue, 3 Jun 2008 21:04:28 +0100 Subject: [fxruby-users] Getting items to fill a column In-Reply-To: <976B8A3E-300D-4CEC-B72E-5E44EA175430@lylejohnson.name> References: <14cf210a0805311342o76770539jbb6e429c6a358c78@mail.gmail.com> <976B8A3E-300D-4CEC-B72E-5E44EA175430@lylejohnson.name> Message-ID: <14cf210a0806031304o563a6719nacb258db06ed1004@mail.gmail.com> Yes, I'm still using the matrix layout. LAYOUT_FILL_COLUMN and ROW almost did what I wanted (I missed them in my read over, or didn't grab the significance). A closer re-reading of the chapter revealed the options I wanted to include as well. PACK_UNIFORM_HEIGHT and WIDTH on the Matrix itself now gets it displaying as I want. Thank you, Jon From lyle at lylejohnson.name Fri Jun 6 10:00:13 2008 From: lyle at lylejohnson.name (Lyle Johnson) Date: Fri, 6 Jun 2008 09:00:13 -0500 Subject: [fxruby-users] [ANN] FXRuby 1.6.15 Now Available Message-ID: <12C042D6-697E-4196-AFC5-1A8A3331D347@lylejohnson.name> All, FXRuby version 1.6.15 is now available for download from this page: http://rubyforge.org/frs/?group_id=300&release_id=22658 Note that if you're building FXRuby from source, you should be using FOX 1.6.16 or later due to some important changes made in that release of FOX. For a summary of the changes in this release of FXRuby, please see this page: http://www.fxruby.org/doc/changes.html The code is provided in source form, along with binaries for Win32 and OS X. For instructions on compiling FXRuby from source, please see: http://www.fxruby.org/doc/build.html And as always, the FXRuby home page is here: http://www.fxruby.org Enjoy, Lyle --- "FXRuby: Create Lean and Mean GUIs with Ruby" Now available from the Pragmatic Bookshelf! http://www.pragprog.com/titles/fxruby From ernst at tanakasite.com Mon Jun 9 11:36:30 2008 From: ernst at tanakasite.com (Ernst J. Tanaka) Date: Mon, 09 Jun 2008 11:36:30 -0400 Subject: [fxruby-users] FX ruby program error EOF Message-ID: <484D4DFE.3060806@tanakasite.com> Since a week or so I am getting this error in a program which has been running fine for 6 months or so. I have a hard time running debug on this error and finding the cause. As it seems that the error is in the middle of fxruby and not in my application. I click on button1 - the first time every works perfect. Handling the next record, pressing button1 leads to this error. Any help is appreciated. Ernst C:/ruby/lib/ruby/1.8/net/protocol.rb:133:in `sysread': end of file reached (EOFError) from C:/ruby/lib/ruby/1.8/net/protocol.rb:133:in `rbuf_fill' from C:/ruby/lib/ruby/1.8/timeout.rb:56:in `timeout' from C:/ruby/lib/ruby/1.8/timeout.rb:76:in `timeout' from C:/ruby/lib/ruby/1.8/net/protocol.rb:132:in `rbuf_fill' from C:/ruby/lib/ruby/1.8/net/protocol.rb:116:in `readuntil' from C:/ruby/lib/ruby/1.8/net/protocol.rb:126:in `readline' from C:/ruby/lib/ruby/1.8/net/http.rb:2017:in `read_status_line' from C:/ruby/lib/ruby/1.8/net/http.rb:2006:in `read_new' ... 14 levels... from C:/ruby/lib/ruby/gems/1.8/gems/fxruby-1.6.13-mswin32/lib/fox16/responder2.rb:55:in `call' from C:/ruby/lib/ruby/gems/1.8/gems/fxruby-1.6.13-mswin32/lib/fox16/responder2.rb:55:in `onHandleMsg' from C:/rubydev/ch06/monitor/trade.rb:1754:in `run' from C:/rubydev/ch06/monitor/trade.rb:1754 -------------- next part -------------- A non-text attachment was scrubbed... Name: ernst.vcf Type: text/x-vcard Size: 264 bytes Desc: not available URL: From rmelton at ball.com Thu Jun 12 14:42:17 2008 From: rmelton at ball.com (Melton, Ryan) Date: Thu, 12 Jun 2008 12:42:17 -0600 Subject: [fxruby-users] [Foxgui-users] Segmentation fault on exit In-Reply-To: <200806121122.28990.jeroen@fox-toolkit.org> References: <1213283728.4775.67.camel@lutoslawski.cfd> <200806121122.28990.jeroen@fox-toolkit.org> Message-ID: <2EC28B773AF39E47850AC45765483C2C09EDB250@AEROMSG2.AERO.BALL.COM> How would you delete the Menu Pane using FXRuby? -----Original Message----- From: foxgui-users-bounces at lists.sourceforge.net [mailto:foxgui-users-bounces at lists.sourceforge.net] On Behalf Of Jeroen van der Zijp Sent: Thursday, June 12, 2008 10:22 AM To: Dr Gavin Tabor Cc: FOX Users Subject: Re: [Foxgui-users] Segmentation fault on exit On Thursday 12 June 2008, you wrote: > Hi there. I am probably doing something really stupid here, but I am > having difficulty getting my Fox application to exit cleanly. I have > written it as a new class "viewer"; my top level code looks like this; > > // Make application > FXApp application("GLTest","FoxTest"); > > // Open the display > application.init(argc,argv); > > // Make window > new viewer(&application,meshDescription, runTime); > > // Create the application's windows > application.create(); > > // Run the application > return application.run(); > > Viewer is a gl window with a menubar across the top; one of the entries > in the pull-down menu is an exit button, implemented thus; > > > filemenuQuit_ = new FXMenuCommand > ( > filemenu_, > "&Quit\tCtl-Q", > NULL, > getApp(), > FXApp::ID_QUIT > ); > > which I believe is the standard way of exiting a Fox application window. > viewer also contains a destructor function ~viewer which cleans up all > the memory allocated to the viewer object. It ends with a statement > Info << "Out here\n"; to identify where I have got to. When I run the > code and try to exit, I get "Out here" followed by a segmentation fault. > So I believe it is getting to the end of the destructor function with no > problem, but beyond that something is going wrong. Can anyone help me > identify what the problem is, please? AFAICT, my exit button passes the > message FXApp::ID_QUIT to the application; what happens after that?? The most likely cause is that the menu pane is not being deleted explicitly, and then continues to exist after the main window that owns it has already been deleted. When an FXMenuPane is deleted, all the menu commands in it will try to remove their accelerators from the main window's accelerator table. This will not work, since the main window is already gone. Solution: in your main window's destructor, delete all menu panes owned by that main window. This way, the destructors inside the FXMenuPane and its children will be running BEFORE the main window itself is destroyed. Hope this helps, - Jeroen ------------------------------------------------------------------------ - Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://sourceforge.net/services/buy/index.php _______________________________________________ Foxgui-users mailing list Foxgui-users at lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/foxgui-users This message and any enclosures are intended only for the addressee. Please notify the sender by email if you are not the intended recipient. If you are not the intended recipient, you may not use, copy, disclose, or distribute this message or its contents or enclosures to any other person and any such actions may be unlawful. Ball reserves the right to monitor and review all messages and enclosures sent to or from this email address. From bob.whiteside at gmail.com Mon Jun 16 00:54:12 2008 From: bob.whiteside at gmail.com (Bob Whiteside) Date: Sun, 15 Jun 2008 21:54:12 -0700 Subject: [fxruby-users] Tracking mouse outside my window. Message-ID: <249cf1380806152154u18412496pcbe9a97432476f6d@mail.gmail.com> Hi All, I seek general guidance about an aspect of app I'd like to write in Ruby/FXRuby. Imagine something like a "point picker" written in Ruby. There's a little window that has a "crosshair" button (or something) and an area for displaying coordinates. I'd like to drag from the crosshairs off to anywhere on the screen. As the mouse is dragged, I want to display the coordinates. I don't have my heart set on any particular UI gesture. For example, if the user could click on the crosshairs, then click somewhere else, that'd be fine, too. The main issue is that I want to watch mouse events even when the cursor is not over the FXRuby window. Is this possible? I've fooled around a little bit with the win32/api stuff trying to install a mouse hook, to no avail. Thanks in advance for any suggestions/guidance anyone has to offer. Especially welcome would be, 'You dufus! The FxFranastat widget does exactly that!" :-) Cheers, --Bob From wruyahoo05 at comcast.net Mon Jun 16 10:43:33 2008 From: wruyahoo05 at comcast.net (William Rutiser) Date: Mon, 16 Jun 2008 10:43:33 -0400 Subject: [fxruby-users] Printing alternatives with FXRuby Message-ID: <48567C15.7070108@comcast.net> I am working on a program which constructs simple graphic diagrams which need to be printed. Currently, I am drawing on an FXCanvas, doing a screen capture of the window with ALT-PrintScreen, pasting the bitmap into MS Paint, and printing from there. The documentation for FXPrinter, etc seems pretty thin and I haven't found an example or demonstration for its use tho I did find a couple of archived emails that suggest it may be limited, particularly on Windows. I am using Ruby 1.8.26, FXRuby 1.6.14, and Windows XP SP3 How do other applications, *nix or Windows, handle printing? Is there anything in FxRuby or elsewhere that can be used to directly capture the canvas pixels in a form that can be exported in a useful file format? Thank you for any advice or suggestions, however incomplete. Bill Rutiser From meinrad.recheis at gmail.com Mon Jun 16 11:33:32 2008 From: meinrad.recheis at gmail.com (Meinrad Recheis) Date: Mon, 16 Jun 2008 17:33:32 +0200 Subject: [fxruby-users] Printing alternatives with FXRuby In-Reply-To: <48567C15.7070108@comcast.net> References: <48567C15.7070108@comcast.net> Message-ID: <43d756720806160833w496ee55dic535f0a2f6690c4@mail.gmail.com> On Mon, Jun 16, 2008 at 4:43 PM, William Rutiser wrote: > I am working on a program which constructs simple graphic diagrams which > need to be printed. Currently, I am drawing on an FXCanvas, doing a screen > capture of the window with ALT-PrintScreen, pasting the bitmap into MS > Paint, and printing from there. > > The documentation for FXPrinter, etc seems pretty thin and I haven't found > an example or demonstration for its use tho I did find a couple of archived > emails that suggest it may be limited, particularly on Windows. yeah, you are not the first to discover that FXPrinter is useless. > > > I am using Ruby 1.8.26, FXRuby 1.6.14, and Windows XP SP3 > > How do other applications, *nix or Windows, handle printing? > > Is there anything in FxRuby or elsewhere that can be used to directly > capture the canvas pixels in a form that can be exported in a useful file > format? just a random thought: you could instead of using drawing operations on FXCanvas use one of the wonderful svg libs from RAA to construct a svg drawing then render it using image magick (or inkscape) to render any image file you want and draw that to your FXCanvas or send it to a printer. I have used imagemagick successfully on both windows and linux. hth, -- henon -------------- next part -------------- An HTML attachment was scrubbed... URL: From lyle at lylejohnson.name Mon Jun 16 12:20:06 2008 From: lyle at lylejohnson.name (Lyle Johnson) Date: Mon, 16 Jun 2008 11:20:06 -0500 Subject: [fxruby-users] FX ruby program error EOF In-Reply-To: <484D4DFE.3060806@tanakasite.com> References: <484D4DFE.3060806@tanakasite.com> Message-ID: <57cf8f720806160920l56a403afgbce5bed818df51b8@mail.gmail.com> On Mon, Jun 9, 2008 at 10:36 AM, Ernst J. Tanaka wrote: > Since a week or so I am getting this error in a program which has been > running fine for 6 months or so. > I have a hard time running debug on this error and finding the cause. As it > seems that the error is in the middle of fxruby and not in my application... > C:/ruby/lib/ruby/1.8/net/protocol.rb:133:in `sysread': end of file reached > (EOFError) > from C:/ruby/lib/ruby/1.8/net/protocol.rb:133:in `rbuf_fill' > from C:/ruby/lib/ruby/1.8/timeout.rb:56:in `timeout' > from C:/ruby/lib/ruby/1.8/timeout.rb:76:in `timeout' > from C:/ruby/lib/ruby/1.8/net/protocol.rb:132:in `rbuf_fill' Ernst, Sorry for the delayed response; I just discovered that Gmail has been queuing up a bunch of my e-mail messages since June 5 (still not sure why). I don't know anything about your application, but it's pretty clear from the stack trace that the error's occurring way down in Ruby's I/O libraries, which FXRuby has nothing to do with. You say your application has been running fine for the past six months; have you recently upgraded the version of Ruby that you're using (say, a newer version of the one-click installer for Ruby)? Or is it possible that something has changed in the remote service that your application is accessing over the network? I'm sorry I can't be of more help, other than to say that based on the stack trace you've shown, I don't see any evidence that FXRuby is at fault. Hope this helps, Lyle From lyle at lylejohnson.name Sun Jun 22 18:51:05 2008 From: lyle at lylejohnson.name (Lyle Johnson) Date: Sun, 22 Jun 2008 17:51:05 -0500 Subject: [fxruby-users] Tracking mouse outside my window. In-Reply-To: <249cf1380806152154u18412496pcbe9a97432476f6d@mail.gmail.com> References: <249cf1380806152154u18412496pcbe9a97432476f6d@mail.gmail.com> Message-ID: <54C548D3-3357-4AA2-A382-EF0EA8A95859@lylejohnson.name> On Jun 15, 2008, at 11:54 PM, Bob Whiteside wrote: > I seek general guidance about an aspect of app I'd like to write in > Ruby/FXRuby. Imagine something like a "point picker" written in > Ruby. There's a little window that has a "crosshair" button (or > something) and an area for displaying coordinates. I'd like to drag > from the crosshairs off to anywhere on the screen. As the mouse is > dragged, I want to display the coordinates. > > I don't have my heart set on any particular UI gesture. For example, > if the user could click on the crosshairs, then click somewhere else, > that'd be fine, too. > > The main issue is that I want to watch mouse events even when the > cursor is not over the FXRuby window. > > Is this possible? Yes, and there's already a widget that does most or all of what you want: the FXPicker widget. The FXPicker is like a button, but when you click it, it goes into "pick" mode and the cursor changes shape to crosshairs. Then you can move the cursor around the screen, and the picker will send a SEL_CHANGED message as it moves, telling you its new location on screen. You exit "pick" mode when you click on the button again. Unfortunately, it looks like there's a bug with FXPicker in the current release of FXRuby, so I'll try to get out a bug fix release soon to take care of that. Hope this helps, Lyle --- "FXRuby: Create Lean and Mean GUIs with Ruby" Now available from the Pragmatic Bookshelf! http://www.pragprog.com/titles/fxruby From jcastelain at gmail.com Mon Jun 23 16:53:51 2008 From: jcastelain at gmail.com (Julien Castelain) Date: Mon, 23 Jun 2008 22:53:51 +0200 Subject: [fxruby-users] Problem with FXJPGImage on Ubuntu Message-ID: <57b444a70806231353s6cb090cdtc6c14338e42747c7@mail.gmail.com> Hi all, I installed FXRuby and fox on Ubuntu 8.04 started reading the documentation online and managed to run most of the example applications. I've also started reading the book and when I try to use the FXJPGImage class, it doesn't display images in the application. The same code works without a problem on windows, so I wonder if I didn't forget to install something during the setup process. Has anyone faced this problem? Thanks, -------------- next part -------------- An HTML attachment was scrubbed... URL: From lyle at lylejohnson.name Mon Jun 23 17:38:51 2008 From: lyle at lylejohnson.name (Lyle Johnson) Date: Mon, 23 Jun 2008 16:38:51 -0500 Subject: [fxruby-users] Problem with FXJPGImage on Ubuntu In-Reply-To: <57b444a70806231353s6cb090cdtc6c14338e42747c7@mail.gmail.com> References: <57b444a70806231353s6cb090cdtc6c14338e42747c7@mail.gmail.com> Message-ID: <57cf8f720806231438o6df26634w1f0317a5bc1f4bcb@mail.gmail.com> On Mon, Jun 23, 2008 at 3:53 PM, Julien Castelain wrote: > I installed FXRuby and fox on Ubuntu 8.04 started reading the documentation > online and managed to run most of the example applications. I've also > started reading the book and when I try to use the FXJPGImage class, it > doesn't display images in the application. > > The same code works without a problem on windows, so I wonder if I didn't > forget to install something during the setup process. Has anyone faced this > problem? This probably indicates that your FOX library wasn't built with JPEG support. Did you install FOX from a package, or did you compile it yourself? From jcastelain at gmail.com Mon Jun 23 17:57:51 2008 From: jcastelain at gmail.com (Julien Castelain) Date: Mon, 23 Jun 2008 23:57:51 +0200 Subject: [fxruby-users] Problem with FXJPGImage on Ubuntu In-Reply-To: <57cf8f720806231438o6df26634w1f0317a5bc1f4bcb@mail.gmail.com> References: <57b444a70806231353s6cb090cdtc6c14338e42747c7@mail.gmail.com> <57cf8f720806231438o6df26634w1f0317a5bc1f4bcb@mail.gmail.com> Message-ID: <57b444a70806231457g7463a647i7e01a6eeb1ae6959@mail.gmail.com> Hi Lyle, I'm compiling it myself, and you're right, I think I missed something when I built it, once again I should have read a bit more before complaining :) So, if I understand what I'm doing, when I ./configure I noticed this checking jpeglib.h usability... no checking jpeglib.h presence... no checking for jpeglib.h... no I downloaded this http://www.fox-toolkit.org/ftp/jpegsrc.v6b.tar.gz from the fox toolkit site, but I supposed that it's not been correctly installed. How can I fix this Thanks On Mon, Jun 23, 2008 at 11:38 PM, Lyle Johnson wrote: > On Mon, Jun 23, 2008 at 3:53 PM, Julien Castelain > wrote: > > > I installed FXRuby and fox on Ubuntu 8.04 started reading the > documentation > > online and managed to run most of the example applications. I've also > > started reading the book and when I try to use the FXJPGImage class, it > > doesn't display images in the application. > > > > The same code works without a problem on windows, so I wonder if I didn't > > forget to install something during the setup process. Has anyone faced > this > > problem? > > This probably indicates that your FOX library wasn't built with JPEG > support. Did you install FOX from a package, or did you compile it > yourself? > _______________________________________________ > 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 jonathan.stott at gmail.com Mon Jun 23 18:06:46 2008 From: jonathan.stott at gmail.com (Jonathan Stott) Date: Mon, 23 Jun 2008 23:06:46 +0100 Subject: [fxruby-users] Problem with FXJPGImage on Ubuntu In-Reply-To: <57b444a70806231457g7463a647i7e01a6eeb1ae6959@mail.gmail.com> References: <57b444a70806231353s6cb090cdtc6c14338e42747c7@mail.gmail.com> <57cf8f720806231438o6df26634w1f0317a5bc1f4bcb@mail.gmail.com> <57b444a70806231457g7463a647i7e01a6eeb1ae6959@mail.gmail.com> Message-ID: <14cf210a0806231506l5c90251q2ac3fc89da1be895@mail.gmail.com> Have you tried just installing them from the repositories hardy offers? It should pull in all the deps. sudo aptitude install libfox libfox-dev I don't have hardy so I can't give the exact method names, but that worked for me on Gutsy. You may need to enable the universe repository. Regards, Jon From jcastelain at gmail.com Mon Jun 23 18:15:02 2008 From: jcastelain at gmail.com (Julien Castelain) Date: Tue, 24 Jun 2008 00:15:02 +0200 Subject: [fxruby-users] Problem with FXJPGImage on Ubuntu In-Reply-To: <14cf210a0806231506l5c90251q2ac3fc89da1be895@mail.gmail.com> References: <57b444a70806231353s6cb090cdtc6c14338e42747c7@mail.gmail.com> <57cf8f720806231438o6df26634w1f0317a5bc1f4bcb@mail.gmail.com> <57b444a70806231457g7463a647i7e01a6eeb1ae6959@mail.gmail.com> <14cf210a0806231506l5c90251q2ac3fc89da1be895@mail.gmail.com> Message-ID: <57b444a70806231515r1a2537d0y32936f01e5004582@mail.gmail.com> Hi Jon, Perfect, Thanks you all for the fast help, Julien On Tue, Jun 24, 2008 at 12:06 AM, Jonathan Stott wrote: > Have you tried just installing them from the repositories hardy > offers? It should pull in all the deps. > > sudo aptitude install libfox libfox-dev > > I don't have hardy so I can't give the exact method names, but that > worked for me on Gutsy. You may need to enable the universe > repository. > > Regards, > Jon > _______________________________________________ > 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 jeroen at fox-toolkit.org Mon Jun 23 18:16:40 2008 From: jeroen at fox-toolkit.org (Jeroen van der Zijp) Date: Mon, 23 Jun 2008 17:16:40 -0500 Subject: [fxruby-users] Problem with FXJPGImage on Ubuntu In-Reply-To: <57b444a70806231457g7463a647i7e01a6eeb1ae6959@mail.gmail.com> References: <57b444a70806231353s6cb090cdtc6c14338e42747c7@mail.gmail.com> <57cf8f720806231438o6df26634w1f0317a5bc1f4bcb@mail.gmail.com> <57b444a70806231457g7463a647i7e01a6eeb1ae6959@mail.gmail.com> Message-ID: <200806231716.41162.jeroen@fox-toolkit.org> On Monday 23 June 2008, Julien Castelain wrote: > Hi Lyle, > > I'm compiling it myself, and you're right, I think I missed something when I > built it, once again I should have read a bit more before complaining :) > So, if I understand what I'm doing, when I ./configure I noticed this > > checking jpeglib.h usability... no > checking jpeglib.h presence... no > checking for jpeglib.h... no > > I downloaded this http://www.fox-toolkit.org/ftp/jpegsrc.v6b.tar.gz from the > fox toolkit site, but I supposed that it's not been correctly installed. How > can I fix this On Linux systems there's hardly ever a need to install jpeg, tiff, or png (etc) support from source. Most distros have ready-made packages for these. On Ubuntu, its likely all you need to do is something like: apt-get libjpeg-devel libjpeg or something like that... - Jeroen From vjoel at path.berkeley.edu Mon Jun 23 16:59:12 2008 From: vjoel at path.berkeley.edu (Joel VanderWerf) Date: Mon, 23 Jun 2008 13:59:12 -0700 Subject: [fxruby-users] Problem with FXJPGImage on Ubuntu In-Reply-To: <57b444a70806231353s6cb090cdtc6c14338e42747c7@mail.gmail.com> References: <57b444a70806231353s6cb090cdtc6c14338e42747c7@mail.gmail.com> Message-ID: <48600EA0.5070101@path.berkeley.edu> Julien Castelain wrote: > Hi all, > > I installed FXRuby and fox on Ubuntu 8.04 started reading the > documentation online and managed to run most of the example > applications. I've also started reading the book and when I try to use > the FXJPGImage class, it doesn't display images in the application. > > The same code works without a problem on windows, so I wonder if I > didn't forget to install something during the setup process. Has anyone > faced this problem? just a guess... is the jpeg devel. package installed? (libjpeg62-dev on my system). -- vjoel : Joel VanderWerf : path berkeley edu : 510 665 3407 From bob.whiteside at gmail.com Mon Jun 23 20:36:26 2008 From: bob.whiteside at gmail.com (Bob Whiteside) Date: Mon, 23 Jun 2008 17:36:26 -0700 Subject: [fxruby-users] Tracking mouse outside my window. In-Reply-To: <54C548D3-3357-4AA2-A382-EF0EA8A95859@lylejohnson.name> References: <249cf1380806152154u18412496pcbe9a97432476f6d@mail.gmail.com> <54C548D3-3357-4AA2-A382-EF0EA8A95859@lylejohnson.name> Message-ID: <249cf1380806231736i6be71adftd3749afb42e753ec@mail.gmail.com> Hi Lyle, On Sun, Jun 22, 2008 at 3:51 PM, Lyle Johnson wrote: > > Yes, and there's already a widget that does most or all of what you want: > the FXPicker widget. The FXPicker is like a button, but when you click it, > it goes into "pick" mode and the cursor changes shape to crosshairs. Then > you can move the cursor around the screen, and the picker will send a > SEL_CHANGED message as it moves, telling you its new location on screen. You > exit "pick" mode when you click on the button again. > > Unfortunately, it looks like there's a bug with FXPicker in the current > release of FXRuby, so I'll try to get out a bug fix release soon to take > care of that. > > Hope this helps, > > Lyle Thanks so much for the response, Lyle. Yes, that's exactly the widget I was seeking. I've been trying to learn my way around through the widget set, but I'd not noticed that one. It's not an emergency for me, and I'm pleased to await the update release. BTW, your book is *really* nicely done. I'm incredibly pleased with my purchase of it. Thanks for the incredibly nice work you're letting me take advantage of. Cheers, --Bob From lyle at lylejohnson.name Mon Jun 23 21:37:50 2008 From: lyle at lylejohnson.name (Lyle Johnson) Date: Mon, 23 Jun 2008 20:37:50 -0500 Subject: [fxruby-users] Tracking mouse outside my window. In-Reply-To: <249cf1380806231736i6be71adftd3749afb42e753ec@mail.gmail.com> References: <249cf1380806152154u18412496pcbe9a97432476f6d@mail.gmail.com> <54C548D3-3357-4AA2-A382-EF0EA8A95859@lylejohnson.name> <249cf1380806231736i6be71adftd3749afb42e753ec@mail.gmail.com> Message-ID: <4B399328-0A5E-4827-BC7F-8B9F0C6849AC@lylejohnson.name> On Jun 23, 2008, at 7:36 PM, Bob Whiteside wrote: > Thanks so much for the response, Lyle. Yes, that's exactly the widget > I was seeking. I've been trying to learn my way around through the > widget set, but I'd not noticed that one. It's not an emergency for > me, and I'm pleased to await the update release. OK. I'm looking into a couple of other recently reported problems to see what else I can squeeze into this release. > BTW, your book is *really* nicely done. I'm incredibly pleased with > my purchase of it. Thanks for the incredibly nice work you're letting > me take advantage of. Thanks, I'm glad you're enjoying it! --- "FXRuby: Create Lean and Mean GUIs with Ruby" Now available from the Pragmatic Bookshelf! http://www.pragprog.com/titles/fxruby From bob.whiteside at gmail.com Mon Jun 23 23:53:13 2008 From: bob.whiteside at gmail.com (Bob Whiteside) Date: Mon, 23 Jun 2008 20:53:13 -0700 Subject: [fxruby-users] Tracking mouse outside my window. In-Reply-To: <4B399328-0A5E-4827-BC7F-8B9F0C6849AC@lylejohnson.name> References: <249cf1380806152154u18412496pcbe9a97432476f6d@mail.gmail.com> <54C548D3-3357-4AA2-A382-EF0EA8A95859@lylejohnson.name> <249cf1380806231736i6be71adftd3749afb42e753ec@mail.gmail.com> <4B399328-0A5E-4827-BC7F-8B9F0C6849AC@lylejohnson.name> Message-ID: <249cf1380806232053i76b3ecd5hc309d587ff5b254d@mail.gmail.com> On Mon, Jun 23, 2008 at 6:37 PM, Lyle Johnson wrote: > > OK. I'm looking into a couple of other recently reported problems to see > what else I can squeeze into this release. > Do you happen to know whether the FXPicker consumes the foreign mouse click, or sends it on through in addition to reporting it back to the widget? Oh, I guess I should learn to examine the Fox site to learn such thing. Cheers, --Bob From jcastelain at gmail.com Tue Jun 24 00:40:46 2008 From: jcastelain at gmail.com (Julien Castelain) Date: Tue, 24 Jun 2008 06:40:46 +0200 Subject: [fxruby-users] Problem with FXJPGImage on Ubuntu In-Reply-To: <48600EA0.5070101@path.berkeley.edu> References: <57b444a70806231353s6cb090cdtc6c14338e42747c7@mail.gmail.com> <48600EA0.5070101@path.berkeley.edu> Message-ID: <57b444a70806232140x20f82ce9i7f3d5f25729a52fc@mail.gmail.com> Hi Joel, No libjpeg62-dev wasn't installed. However I just installed with aptidude" and everything works fine now, so it looks like I am ready to take a deep dive in the fxruby world, Thanks again, Julien On Mon, Jun 23, 2008 at 10:59 PM, Joel VanderWerf wrote: > Julien Castelain wrote: > >> Hi all, >> >> I installed FXRuby and fox on Ubuntu 8.04 started reading the >> documentation online and managed to run most of the example applications. >> I've also started reading the book and when I try to use the FXJPGImage >> class, it doesn't display images in the application. >> >> The same code works without a problem on windows, so I wonder if I didn't >> forget to install something during the setup process. Has anyone faced this >> problem? >> > > just a guess... is the jpeg devel. package installed? (libjpeg62-dev on my > system). > > -- > vjoel : Joel VanderWerf : path berkeley edu : 510 665 3407 > > _______________________________________________ > 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 angico at angico.org Wed Jun 25 17:11:15 2008 From: angico at angico.org (angico) Date: Wed, 25 Jun 2008 18:11:15 -0300 Subject: [fxruby-users] mysql Message-ID: <1214428275.20052.11.camel@caipora> Hi, list! I'm new to Ruby and FXRuby, and I'm trying to develop an application that needs to access a mysql database. Do you have any hints on how do I get started with it? Any help will be appreciated. Thanks, -- angico ------ home page: www.angico.org Gnu/Linux, FLOSS, Espiritismo, e eu por mim mesmo 8^I ------ contatos: email: angico at angico.org skype: angico00 ------ From lyle at lylejohnson.name Wed Jun 25 22:08:59 2008 From: lyle at lylejohnson.name (Lyle Johnson) Date: Wed, 25 Jun 2008 21:08:59 -0500 Subject: [fxruby-users] mysql In-Reply-To: <1214428275.20052.11.camel@caipora> References: <1214428275.20052.11.camel@caipora> Message-ID: <0448155E-DF2A-435C-9E18-20D21C3FF6E2@lylejohnson.name> On Jun 25, 2008, at 4:11 PM, angico wrote: > I'm new to Ruby and FXRuby, and I'm trying to develop an application > that needs to access a mysql database. > > Do you have any hints on how do I get started with it? Any help will > be > appreciated. I'd recommend learning about those topics separately instead of trying to learn them all at once. That is to say, the issues involved in accessing MySQL databases aren't really related to the issues involved in developing FXRuby-based applications. I think most people use the Ruby/MySQL library to deal with MySQL databases; here's a good article on that topic: http://www.kitebird.com/articles/ruby-mysql.html The best resource for getting started with FXRuby development is the book (see my signature for the details). There are also some tutorials on line (Google for "fxruby tutorial"), and coverage in other books like "The Ruby Way". Hope this helps, Lyle --- "FXRuby: Create Lean and Mean GUIs with Ruby" Now available from the Pragmatic Bookshelf! http://www.pragprog.com/titles/fxruby From jonathan.stott at gmail.com Thu Jun 26 03:35:10 2008 From: jonathan.stott at gmail.com (Jonathan Stott) Date: Thu, 26 Jun 2008 08:35:10 +0100 Subject: [fxruby-users] mysql In-Reply-To: <0448155E-DF2A-435C-9E18-20D21C3FF6E2@lylejohnson.name> References: <1214428275.20052.11.camel@caipora> <0448155E-DF2A-435C-9E18-20D21C3FF6E2@lylejohnson.name> Message-ID: <14cf210a0806260035p56b41e0fp7a0dcc2b2911ef14@mail.gmail.com> I would second Lyle's suggestion that the two are seperate issues. However, instead of interacting with the database directly via the mysql gem, you might instead want to consider some form of Object-Relational Manager (ORM). An ORM will wrap a lot of the SQL you are likely to write, and the rows you return, in Ruby objects and methods. There are several available for ruby: ActiveRecord (of rails fame): http://wiki.rubyonrails.org/rails/pages/ActiveRecord Sequel: http://sequel.rubyforge.org/ DataMapper (my personal favourite, but currently under heavy development) http://datamapper.org They can significantly reduce the amount of 'boilerplate' SQL you have to write. Regards, Jon From philippe.lang at attiksystem.ch Thu Jun 26 04:31:28 2008 From: philippe.lang at attiksystem.ch (Philippe Lang) Date: Thu, 26 Jun 2008 10:31:28 +0200 Subject: [fxruby-users] mysql References: <1214428275.20052.11.camel@caipora> Message-ID: fxruby-users-bounces at rubyforge.org wrote: > Hi, list! > > I'm new to Ruby and FXRuby, and I'm trying to develop an application > that needs to access a mysql database. Hi, Jonathan idea to use an Object Relational Mapper is just fine. We are using Active Record here. Be careful of one thing, though: if your application is running on a LAN, I guess there will be no speed problem at all. But if you run your application on a higher latency network (for example 40 ms latency between the client and the server), be careful not to do to many round-trips between the client and the server, otherwise your application will be very slow... If you need to run complex algorithms requiring database access in your application, consider running them on the server directly. I have chosen to run them inside the Postgresql Database, in the form of PLPGSQL functions. This is 100% database dependant code, but so much faster... Regards, Philippe Lang http://www.attiksystem.ch From stroemarius84 at yahoo.com Thu Jun 26 05:50:35 2008 From: stroemarius84 at yahoo.com (Marius Stroe) Date: Thu, 26 Jun 2008 02:50:35 -0700 (PDT) Subject: [fxruby-users] How to make a copy of an existing image instance Message-ID: <569932.43792.qm@web44911.mail.sp1.yahoo.com> Maybe someone know the answer. How to make an exact copy of a previously instanced FXImage object? I need that because image manipulation like crop or scale methods affect the current object. I have tried to use clone or dup method to create an exact copy of image but when I tried to use cloned object I recieve : c:/ruby/lib/ruby/gems/1.8/gems/fxruby-1.6.14-mswin32/lib/fox16/aliases.rb:1118:in `getWidth': This FXDrawable * already released (RuntimeError) Here is some code: dataBuffer = File.open("someFile.jpg","rb").read img = FXJPGImage.new(getApp(), dataBuffer, IMAGE_OWNED|IMAGE_KEEP|IMAGE_SHMI|IMAGE_SHMP) clonedImage = img.clone puts clonedImage.width I need some idea to make multiple copies of a current image. Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: