From lyle at knology.net Mon Nov 7 08:37:08 2005 From: lyle at knology.net (Lyle Johnson) Date: Mon, 7 Nov 2005 07:37:08 -0600 Subject: [fxruby-users] [ANN] FXRuby 1.4.3 Now Available Message-ID: <33a09cd74ae3138f53b250d40ddb58a5@knology.net> All, FXRuby version 1.4.3 is now available for download from this page: http://rubyforge.org/frs/?group_id=300&release_id=3402 For a summary of the changes in this release, please see this page: http://www.fxruby.org/doc/changes.html As usual, the code is provided as a Win32 installer or a binary Gem (both compatible with the latest One-Click Installer for Ruby 1.8.2), as a source gem, and as a source tarball. 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 From lyle at knology.net Thu Nov 10 15:23:41 2005 From: lyle at knology.net (lyle@knology.net) Date: 10 Nov 2005 20:23:41 -0000 Subject: [fxruby-users] PNG not working In-Reply-To: <> References: <> Message-ID: <20051110202341.935.qmail@webmail3.knology.net> On Thu, 10 Nov 2005 21:12:09 +0100 (MET), "Steven Schmid" wrote : > I recently installed FOX 1.4.23 and FXRuby 1.4.3 and after a few problems > with the Compiler and some missing libraries, it worked. I can run the > FXRuby examples, but there's one problem, in the samples where you load a > png image, theres just a rectangle with the text "PNG" in it. I tried the > same (imageviewer) example in FOX and it worked. I googled but I couldn't > find any help, hopefully you can give me a hint? :) When you build FXRuby, as a last step it links against some FOX library. The fact that you're seeing the rectangle with "PNG" indicates that FXRuby is linked against a FOX library that was built *without* PNG support. If the imageviewer example (for regular FOX) is working, that may indicate that you have multiple versions of FOX installed and that FXRuby is linked against some build that didn't have PNG support enabled. From d.cano.lagneaux at gmail.com Wed Nov 16 03:11:36 2005 From: d.cano.lagneaux at gmail.com (Diego Cano Lagneaux) Date: Wed, 16 Nov 2005 08:11:36 +0000 Subject: [fxruby-users] Compiling error In-Reply-To: References: Message-ID: Hello, I am a Gentoo user. I emerged Fox 1.4.11 with all features turned on recently. Since FXRuby 1.4.x is not on Portage, I tried to install 1.4.2 manually. install.rb config works with no problems at all. install.rb setup aborts with the following output: --------------- install.rb: entering setup phase... ---> lib ---> lib/fox14 <--- lib/fox14 <--- lib ---> ext ---> ext/fox14 make g++ -fPIC -O2 -march=pentium-m -fPIC -O0 -Iinclude -DWITH_FXSCINTILLA -I. -I/usr/lib/ruby/1.8/i686-linux -I/usr/lib/ruby/1.8/i686-linux -I/tmp/FXRuby-1.4.2/ext/fox14 -DHAVE_SYS_TIME_H -DHAVE_SIGNAL_H -I/usr/local/include/fxscintilla -I/usr/local/include/fox-1.4 -I/usr/include/fox-1.4 -I/usr/include/fxscintilla -c core_wrap.cpp In file included from include/FXRuby.h:747, from include/FXRbCommon.h:90, from core_wrap.cpp:588: include/FXRbIconSourceVirtuals.h:15: error: tipo de devoluci?n covariante inv?lido para `virtual FX::FXImage* FXRbIconSource::loadImage(const void*, const FX::FXString&) const' /usr/include/fox-1.4/FXIconSource.h:109: error: sustituyendo `virtual FX::FXIcon* FX::FXIconSource::loadImage(const void*, const FX::FXString&) const' make: *** [core_wrap.o] Error 1 setup failed 'system make ' failed Try 'ruby install.rb --help' for detailed usage. ------------------ I am sorry part of the error is in Spanish. Here is an approximative translation by me: include/FXRbIconSourceVirtuals.h:15: error: invalid covariant return type for `virtual FX::FXImage* FXRbIconSource::loadImage(const void*, const FX::FXString&) const' /usr/include/fox-1.4/FXIconSource.h:109: error: substituting `virtual FX::FXIcon* FX::FXIconSource::loadImage(const void*, const FX::FXString&) const' If anyone has any advice, I would be really grateful. Diego From lyle at knology.net Wed Nov 16 08:19:54 2005 From: lyle at knology.net (Lyle Johnson) Date: Wed, 16 Nov 2005 07:19:54 -0600 Subject: [fxruby-users] Compiling error In-Reply-To: References: Message-ID: <3bb864c37e1d3b8690ba586543e22801@knology.net> On Nov 16, 2005, at 2:11 AM, Diego Cano Lagneaux wrote: > I emerged Fox 1.4.11 with all features turned on recently. > Since FXRuby 1.4.x is not on Portage, I tried to install 1.4.2 > manually. > > install.rb config works with no problems at all. > > install.rb setup aborts with the following output: Diego, The compilation problem you're seeing is due to an error that was present in the FOX header files for FOX versions 1.4.11 and earlier. This bug was fixed in FOX version 1.4.12; see: http://www.fox-toolkit.com/news3.html and the release information for FOX 1.4.12 appears about halfway down the page. I recommend that you download and install the latest version of FOX 1.4 (which is now up to 1.4.24 I believe) and try again. Hope this helps, Lyle From fkchang2000 at yahoo.com Wed Nov 16 19:02:38 2005 From: fkchang2000 at yahoo.com (Forrest Chang) Date: Wed, 16 Nov 2005 16:02:38 -0800 (PST) Subject: [fxruby-users] Large Forms Crash In-Reply-To: Message-ID: <20051117000238.57943.qmail@web82001.mail.mud.yahoo.com> Hi All: I've got an fxruby app that creates large dialog forms -- mostly combinations of FXLabel, and FXTextField. It seems that after I've displayed some finite number of them, it crashes the app. I've duplicated this with a simple app that you press a button to display a new dialog. The demo app doesn't have the scrolling I've added to be able to see all the entries, but seems to demonstrate the same thing happening -- i.e. creating a certain number causes the app to crash (4 for my laptop (windows XP), 6 on citrix session (windows 2000). I'm running from the latest one click installer for windows. Any clues on either what I'm doing wrong or a workaround? Code follows. Thanks in advance Forrest ====================================== #!/usr/bin/env ruby require 'rubygems' require_gem 'fxruby' require 'fox12' include Fox # A little dialog box to use in our tests class FXTestDialog < FXDialogBox def create_entry( parent, number) frame = FXHorizontalFrame.new( parent, LAYOUT_FILL_X) FXLabel.new( frame, "Entry of #{ number} fields:", nil, JUSTIFY_LEFT|LAYOUT_FILL_X) 1.upto( number) { FXTextField.new( frame, 10, nil, 0); } end def initialize(owner) # Invoke base class initialize function first super(owner, "Test of Dialog Box", DECOR_TITLE|DECOR_BORDER) # Bottom buttons buttons = FXHorizontalFrame.new(self, LAYOUT_SIDE_BOTTOM|FRAME_NONE|LAYOUT_FILL_X|PACK_UNIFORM_WIDTH, 0, 0, 0, 0, 40, 40, 20, 20) # Separator FXHorizontalSeparator.new(self, LAYOUT_SIDE_BOTTOM|LAYOUT_FILL_X|SEPARATOR_GROOVE) # Contents contents = FXVerticalFrame.new(self, LAYOUT_SIDE_TOP|FRAME_NONE|LAYOUT_FILL_X|LAYOUT_FILL_Y|PACK_UNIFORM_WIDTH) # simulate large screens of data 1.upto( 60) { |i| create_entry( contents, 30) } # Accept accept = FXButton.new(buttons, "&Accept", nil, self, ID_ACCEPT, FRAME_RAISED|FRAME_THICK|LAYOUT_RIGHT|LAYOUT_CENTER_Y) # Cancel FXButton.new(buttons, "&Cancel", nil, self, ID_CANCEL, FRAME_RAISED|FRAME_THICK|LAYOUT_RIGHT|LAYOUT_CENTER_Y) accept.setDefault accept.setFocus end end # Simulating the kinds of large dialogs in my application class LargeDialogTester < FXMainWindow def initialize(app) # Invoke base class initialize first super(app, "Dialog Test", nil, nil, DECOR_ALL, 0, 0, 400, 200) # Menubar menubar = FXMenuBar.new(self, LAYOUT_SIDE_TOP|LAYOUT_FILL_X) # Separator FXHorizontalSeparator.new(self, LAYOUT_SIDE_TOP|LAYOUT_FILL_X|SEPARATOR_GROOVE) # File Menu filemenu = FXMenuPane.new(self) FXMenuCommand.new(filemenu, "&Quit", nil, getApp(), FXApp::ID_QUIT, 0) FXMenuTitle.new(menubar, "&File", nil, filemenu) # Contents contents = FXHorizontalFrame.new(self, LAYOUT_SIDE_TOP|FRAME_NONE|LAYOUT_FILL_X|LAYOUT_FILL_Y|PACK_UNIFORM_WIDTH) # Button to pop modal dialog modalButton = FXButton.new(contents, "&New Large Form", nil, nil, 0, FRAME_RAISED|FRAME_THICK|LAYOUT_CENTER_X|LAYOUT_CENTER_Y) modalButton.connect(SEL_COMMAND, method(:onCmdShowDialogModal)) # Build a dialog box @dialog = FXTestDialog.new(self) end # Show a modal dialog def onCmdShowDialogModal(sender, sel, ptr) FXTestDialog.new(self).execute return 1 end # Start def create super show(PLACEMENT_SCREEN) end end def run # Make an application application = FXApp.new("LargeDialog", "FoxTest") # Construct the application's main window LargeDialogTester.new(application) # Create the application application.create # Run the application application.run end run From vjoel at path.berkeley.edu Wed Nov 16 19:12:01 2005 From: vjoel at path.berkeley.edu (Joel VanderWerf) Date: Wed, 16 Nov 2005 16:12:01 -0800 Subject: [fxruby-users] Large Forms Crash In-Reply-To: <20051117000238.57943.qmail@web82001.mail.mud.yahoo.com> References: <20051117000238.57943.qmail@web82001.mail.mud.yahoo.com> Message-ID: <437BCAD1.2000602@path.berkeley.edu> Forrest Chang wrote: > Hi All: > > I've got an fxruby app that creates large dialog > forms -- mostly combinations of FXLabel, and > FXTextField. It seems that after I've displayed some > finite number of them, it crashes the app. I've > duplicated this with a simple app that you press a > button to display a new dialog. The demo app doesn't > have the scrolling I've added to be able to see all > the entries, but seems to demonstrate the same thing > happening -- i.e. creating a certain number causes the > app to crash (4 for my laptop (windows XP), 6 on > citrix session (windows 2000). I'm running from the > latest one click installer for windows. > > Any clues on either what I'm doing wrong or a > workaround? Code follows. Thanks in advance > > Forrest > > ====================================== > > #!/usr/bin/env ruby > > require 'rubygems' > require_gem 'fxruby' > require 'fox12' No crash with fox14 (that's on linux though, so there may be other variables). -- vjoel : Joel VanderWerf : path berkeley edu : 510 665 3407 From ggarra at advancedsl.com.ar Wed Nov 16 20:27:34 2005 From: ggarra at advancedsl.com.ar (=?iso-8859-15?Q?Gonzalo_Garramu=F1o?=) Date: Wed, 16 Nov 2005 22:27:34 -0300 Subject: [fxruby-users] Large Forms Crash In-Reply-To: <20051117000238.57943.qmail@web82001.mail.mud.yahoo.com> References: <20051117000238.57943.qmail@web82001.mail.mud.yahoo.com> Message-ID: En Wed, 16 Nov 2005 21:02:38 -0300, Forrest Chang escribi?: > > Any clues on either what I'm doing wrong or a > workaround? Code follows. Thanks in advance > > Forrest > Seems to work fine for me. I can get it to display the form in a 1024x800 desktop with no problem. I tested it under fox12 and fox14 on windows. Latest one-click installer (installed only last week). -- Gonzalo Garramu?o From jeroen at fox-toolkit.org Wed Nov 16 21:33:53 2005 From: jeroen at fox-toolkit.org (Jeroen van der Zijp) Date: Wed, 16 Nov 2005 20:33:53 -0600 Subject: [fxruby-users] Compiling error In-Reply-To: <3bb864c37e1d3b8690ba586543e22801@knology.net> References: <3bb864c37e1d3b8690ba586543e22801@knology.net> Message-ID: <200511162033.53943.jeroen@fox-toolkit.org> On Wednesday 16 November 2005 07:19, Lyle Johnson wrote: > > On Nov 16, 2005, at 2:11 AM, Diego Cano Lagneaux wrote: > > > I emerged Fox 1.4.11 with all features turned on recently. > > Since FXRuby 1.4.x is not on Portage, I tried to install 1.4.2 > > manually. > > > > install.rb config works with no problems at all. > > > > install.rb setup aborts with the following output: > > > > Diego, > > The compilation problem you're seeing is due to an error that was > present in the FOX header files for FOX versions 1.4.11 and earlier. > This bug was fixed in FOX version 1.4.12; see: > > http://www.fox-toolkit.com/news3.html > > and the release information for FOX 1.4.12 appears about halfway down > the page. I recommend that you download and install the latest version > of FOX 1.4 (which is now up to 1.4.24 I believe) and try again. What Lyle says is correct; I don't usually change header files after a stable release, but in this extreme case the header file itself was where the bug was, so there really wasn't any choice. FOX 1.4.24 is the latest version with all the bug fixes. regards, - Jeroen -- +----------------------------------------------------------------------------+ | Copyright (C) 20:30 11/16/2005 Jeroen van der Zijp. All Rights Reserved. | +----------------------------------------------------------------------------+ From fkchang2000 at yahoo.com Fri Nov 18 12:07:16 2005 From: fkchang2000 at yahoo.com (Forrest Chang) Date: Fri, 18 Nov 2005 09:07:16 -0800 (PST) Subject: [fxruby-users] Large Forms Crash In-Reply-To: Message-ID: <20051118170716.50729.qmail@web82007.mail.mud.yahoo.com> Gonzalo wrote > En Wed, 16 Nov 2005 21:02:38 -0300, Forrest Chang > escribi?: > > > > > Any clues on either what I'm doing wrong or a > > workaround? Code follows. Thanks in advance > > > > Forrest > > > > Seems to work fine for me. I can get it to display the form in a 1024x800 > desktop with no problem. I tested it under fox12 and fox14 on windows. > Latest one-click installer (installed only last week). > Did you try clicking the button repeatedly? I've tried on 2 different winxp and 1 windows 2K machine and I crash eventually, some with more clicks and some with less? Thanks Forrest From r.fulton at auckland.ac.nz Sat Nov 19 02:38:28 2005 From: r.fulton at auckland.ac.nz (Russell Fulton) Date: Sat, 19 Nov 2005 20:38:28 +1300 Subject: [fxruby-users] Installing RubyFX on MacOS X 10.4.3 Message-ID: <437ED674.7030406@auckland.ac.nz> Hi, I'm an experienced programmer (mostly perl for the last 10 years) who is very new to Ruby. I have just installed Foxgui on my powerbook and am now attempting to install FXRuby. The setup step results in some undefined symbols when building fox14.bundle. output from the config step: [rful011 at bluebottle FXRuby-1.4.3]$ruby install.rb config install.rb: entering config phase... ---> lib ---> lib/fox14 <--- lib/fox14 <--- lib ---> ext ---> ext/fox14 /sw/bin/ruby1.8 /Users/rful011/src/FXRuby-1.4.3/ext/fox14/extconf.rb checking for sys/time.h... yes checking for signal.h... yes checking for png_create_read_struct() in -lpng... no checking for deflate() in -lz... no checking for jpeg_mem_init() in -ljpeg... no checking for TIFFSetErrorHandler() in -ltiff... no checking for XShmQueryVersion() in -lXext... no checking for XFindContext() in -lX11... no checking for glXCreateContext() in -lGL... no checking for gluNewQuadric() in -lGLU... no creating Makefile ---> ext/fox14/include <--- ext/fox14/include <--- ext/fox14 <--- ext install.rb: config done. and the end of the setup step: cc -dynamic -bundle -read_only_relocs suppress -L"/sw/lib" -L"/usr/local/lib" -o fox14.bundle librb.o core_wrap.o dc_wrap.o dialogs_wrap.o frames_wrap.o fx3d_wrap.o FXRbApp.o FXRbDataTarget.o FXRbGLViewer.o FXRuby.o iconlist_wrap.o icons_wrap.o image_wrap.o impl.o label_wrap.o layout_wrap.o list_wrap.o markfuncs.o mdi_wrap.o menu_wrap.o table_wrap.o text_wrap.o treelist_wrap.o ui_wrap.o unregisterOwnedObjects.o -lruby -lFOX-1.4 -lstdc++ -ldl -lobjc /usr/bin/ld: Undefined symbols: FX::fxcheckJPG(FX::FXStream&) FX::fxcheckPNG(FX::FXStream&) FX::fxcheckTIF(FX::FXStream&) collect2: ld returned 1 exit status make: *** [fox14.bundle] Error 1 The link between the undefined symbols and the messages from the setup relating to png, jpg and tiff libraries has not escaped me however I do not know exactly what it means. libtiff, libjpeg and libtpng are all installed in /sw/lib I'm using the Apple XCode compiler and the X distribution that comes with Tiger. Clearly I'm missing something. Any help appreciated. Cheers, Russell From lyle at knology.net Sat Nov 19 12:10:08 2005 From: lyle at knology.net (Lyle Johnson) Date: Sat, 19 Nov 2005 11:10:08 -0600 Subject: [fxruby-users] Installing RubyFX on MacOS X 10.4.3 In-Reply-To: <437ED674.7030406@auckland.ac.nz> References: <437ED674.7030406@auckland.ac.nz> Message-ID: <4ab793c6d6f085b9b356e4e2c981363e@knology.net> On Nov 19, 2005, at 1:38 AM, Russell Fulton wrote: > The link between the undefined symbols and the messages from the setup > relating to png, jpg and tiff libraries has not escaped me however I do > not know exactly what it means. > > libtiff, libjpeg and libtpng are all installed in /sw/lib > > I'm using the Apple XCode compiler and the X distribution that comes > with Tiger. > > Clearly I'm missing something. Any help appreciated. It sounds as though the FOX library (which you built earlier) was compiled without JPEG, GIF and PNG support. Am I correct to assume that since you have libjpeg and friends installed in /sw/lib, that you're using Fink? If so, it should be that the include files for those libraries are present in /sw/include. Check to see if, for example, there's a /sw/include/jpeglib.h. If those include files are there, it's probably just that you didn't configure the FOX built to look in the /sw/include directory for include files. If it doesn't know to look there, it's not going to find jpeglib.h (and friends) and so it's going to assume that you don't have those libraries installed. To configure FOX to look there (in addition to the directories that it searches by default), try: cd fox-1.4.x setenv CPPFLAGS -I/sw/include setenv LDFLAGS "-L/sw/lib -L/usr/X11R6/lib" ./configure Watch the messages generated by "configure" for stuff relating to GIF, PNG and JPEG, and make sure that it's finding those libraries. Then you'll type: make to recompile FOX, this time with support for those libraries. You shouldn't need to re-compile FXRuby when it's done, just re-link it and it should be fine. Hope this helps, Lyle From jeroen at fox-toolkit.org Sat Nov 19 14:52:52 2005 From: jeroen at fox-toolkit.org (Jeroen van der Zijp) Date: Sat, 19 Nov 2005 13:52:52 -0600 Subject: [fxruby-users] Installing RubyFX on MacOS X 10.4.3 In-Reply-To: <4ab793c6d6f085b9b356e4e2c981363e@knology.net> References: <437ED674.7030406@auckland.ac.nz> <4ab793c6d6f085b9b356e4e2c981363e@knology.net> Message-ID: <200511191352.52996.jeroen@fox-toolkit.org> On Saturday 19 November 2005 10:50, Lyle Johnson wrote: > One of my users just discovered a problem with FXRuby that was > surprising to me and so I thought I'd mention it here. > > If your FOX application's source code has references to the > fxcheckJPG() function, it will always compile correctly against the FOX > header files; but if you link your application against a FOX library > that wasn't built with JPEG support, you're going to find that > fxcheckJPG() is an unresolved symbol. That is to say, there's no > "stubbed in" version of fxcheckJPG() for a FOX library that's built > without JPEG support. > > This is different from the pattern previously established in FOX for, > say, the FXJPGIcon class. If your source code has references to the > FXJPGIcon class, it will compile and link correctly against a FOX > library built without JPEG support. The resulting application will even > construct an FXJPGIcon object, and just display a placeholder icon in > place of the actual image. > > So... I'd like to request that future FOX libraries provide stubbed-in, > "do nothing" version of the fxcheckJPG(), fxcheckGIF() and fxcheckPNG() > functions. I understand that they won't do the right thing, but it > seems like that's OK given the precedents I've mentioned. Indeed, you are right. The idea with stubbing out if no image support is available is to allow programs to continue to compile [and function!]. I've looked things over and we have this problem in three different places:- for JPEG, PNG and TIFF support. The other image types are OK as they are always compiled in [no external libraries are required]. I've fixed these and one other minor problem and dropped the fixed sources at: ftp://fox-toolkit.org/pub/fox-1.4.25.tar.gz Hopefully, that takes care of the problem! Regards, Jeroen From r.fulton at auckland.ac.nz Sun Nov 20 21:44:56 2005 From: r.fulton at auckland.ac.nz (Russell Fulton) Date: Mon, 21 Nov 2005 15:44:56 +1300 Subject: [fxruby-users] Installing RubyFX on MacOS X 10.4.3 Message-ID: <438134A8.9040001@auckland.ac.nz> Thanks to Lyle I now have everything compiling and installing without obvious errors. For the archive (if there is one) the problem was that fink does not have dev versions (i.e. packages that includes the compiler header files) of the many of the libraries. What I did in the end was to get the source of the packages from their respective homes and install them from scratch. This should have fixed the problem but for reasons completely beyond me the new version of libjepg caused the build of some of the fox libraries to die with errors relating to the table of contents and suggestions that I should run ranlib on the library to rebuild the toc. Running ranlib did not fix the problem (surprise ;). So I then reinstalled libjpeg from fink over the version I build from source leaving the the headers files in place. This allowed fox to build and install without obvious errors. Now FXRuby setup died with an error saying it could not locate one libtiff.3.dymn (or something like that) I looked at the files in /sw/lib and put a link in for this file pointing to the library which had the full version number in its name. Now everything appears to load and install nicely. However (you guessed it ;) when I try and run the examples I get: rful011 at bluebottle FXRuby-1.4.3]$examples/browser.rb /sw/lib/ruby/site_ruby/1.8/powerpc-darwin/fox14.bundle: [BUG] Bus Error ruby 1.8.1 (2003-12-25) [powerpc-darwin] Abort trap Confession time: I did not disable GL in building fox as per instructions (reasoning: the instruction appeared to be quite old -- I know tiger supports GL so I decided to suck and see). I also came across stuff on the web suggesting that the apple supplied ruby was misconfigured and that one had to fiddle with rbconfig.rb. I have not done this (on the grounds that one should not fix things until you are sure they are broken ;) So are the bus errors consistent with either of these potential issues or should I be looking elsewhere. When I get his going I volunteer to update the instructions for building stuff on a tiger using apples Xcode and fink. Cheers, Russell From lyle at knology.net Sun Nov 20 22:05:10 2005 From: lyle at knology.net (Lyle Johnson) Date: Sun, 20 Nov 2005 21:05:10 -0600 Subject: [fxruby-users] Installing RubyFX on MacOS X 10.4.3 In-Reply-To: <438134A8.9040001@auckland.ac.nz> References: <438134A8.9040001@auckland.ac.nz> Message-ID: <01ecff48ca7388e3fd1f138f5e59b610@knology.net> On Nov 20, 2005, at 8:44 PM, Russell Fulton wrote: > Thanks to Lyle I now have everything compiling and installing without > obvious errors. For the archive (if there is one) the problem was that > fink does not have dev versions (i.e. packages that includes the > compiler header files) of the many of the libraries. What I did in the > end was to get the source of the packages from their respective homes > and install them from scratch. Very curious. I got all of the packages in question from fink and managed to get the needed header files. I am still running Mac OS 10.3 (haven't upgraded to Tiger) and so I don't know if they've changed things for the newer fink distributions. > Confession time: > I did not disable GL in building fox as per instructions (reasoning: > the > instruction appeared to be quite old -- I know tiger supports GL so I > decided to suck and see). Yes, OpenGL should work fine. Where did you find a suggestion to build FOX without OpenGL support? We need to get that advice out of circulation. > I also came across stuff on the web suggesting that the apple supplied > ruby was misconfigured and that one had to fiddle with rbconfig.rb. I > have not done this (on the grounds that one should not fix things until > you are sure they are broken ;) Yes, I have also heard this about the Ruby included with Tiger. The patch that's out there fixing a problem related to building C extensions (like FXRuby) and so I imagine it's worth investigating that. > When I get his going I volunteer to update the instructions for > building > stuff on a tiger using apples Xcode and fink. That would be great. I still haven't upgraded to Tiger and don't get a lot of feedback from Mac OS X users. From scott at butlerpress.com Mon Nov 21 10:23:11 2005 From: scott at butlerpress.com (Scott Willson) Date: Mon, 21 Nov 2005 07:23:11 -0800 Subject: [fxruby-users] Installing RubyFX on MacOS X 10.4.3 In-Reply-To: <01ecff48ca7388e3fd1f138f5e59b610@knology.net> References: <438134A8.9040001@auckland.ac.nz> <01ecff48ca7388e3fd1f138f5e59b610@knology.net> Message-ID: <601F37E6-4A99-49C3-BE2F-0A64B9926EDC@butlerpress.com> Here's my experience with Tiger (Mac OS X 10.4.3) on a couple of PowerBooks. My skill with C begins and ends with "./configure; make; sudo make install" so .... Fox 1.4.x compiles as-is from source from the command line if you have the Apple developer tools installed. The example programs work as they should -- if you remember to start your X server first. On OS X 10.4.2, FXRuby (source or gem) wouldn't compile for me without the fixrbconfig gem. I am not sure if this is still necessary with 10.4.3, but I suspect so. With the "fix," FXRuby compiles, but any attempt to use it dies with: Module() error Symbol not found in flat namespace __ZN2FX10fxcheckJPGERNS_8FXStreamE The DarwinPorts FXRuby port _does_ work, but it's at version 1.2. I made my own local port, changed all the "1.2"'s to "1.4"'s, and that worked, too. So, what's different in DarwinPorts? Obviously, the link error points toward a missing JPEG library, and the only dependencies listed in the Portfile are libtiff, libpng, libjpeg, and libX11 for Fox. And "otool -L libFOX-1.4.0.dylib" shows the images libs as the only difference between working builds. Long story short, I copied my DarwinPorts versions of libtiff, libpng, libjpeg into /usr/lib on another PowerBook that does not have DarwinPorts nor Fink; recompiled Fox and FXRuby from source; and it worked. I would bet that if OS X users download and compile the "Image Formats" libs on the Fox Download page first, we would be able to compile and run FXRuby, but I haven't put that to the test. Hope that helps, Scott On Nov 20, 2005, at 7:05 PM, Lyle Johnson wrote: > > On Nov 20, 2005, at 8:44 PM, Russell Fulton wrote: > >> Thanks to Lyle I now have everything compiling and installing without >> obvious errors. For the archive (if there is one) the problem was >> that >> fink does not have dev versions (i.e. packages that includes the >> compiler header files) of the many of the libraries. What I did >> in the >> end was to get the source of the packages from their respective homes >> and install them from scratch. > > Very curious. I got all of the packages in question from fink and > managed to get the needed header files. I am still running Mac OS 10.3 > (haven't upgraded to Tiger) and so I don't know if they've changed > things for the newer fink distributions. > >> Confession time: >> I did not disable GL in building fox as per instructions (reasoning: >> the >> instruction appeared to be quite old -- I know tiger supports GL so I >> decided to suck and see). > > Yes, OpenGL should work fine. Where did you find a suggestion to build > FOX without OpenGL support? We need to get that advice out of > circulation. > >> I also came across stuff on the web suggesting that the apple >> supplied >> ruby was misconfigured and that one had to fiddle with >> rbconfig.rb. I >> have not done this (on the grounds that one should not fix things >> until >> you are sure they are broken ;) > > Yes, I have also heard this about the Ruby included with Tiger. The > patch that's out there fixing a problem related to building C > extensions (like FXRuby) and so I imagine it's worth investigating > that. > >> When I get his going I volunteer to update the instructions for >> building >> stuff on a tiger using apples Xcode and fink. > > That would be great. I still haven't upgraded to Tiger and don't get a > lot of feedback from Mac OS X users. > > _______________________________________________ > fxruby-users mailing list > fxruby-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/fxruby-users From r.fulton at auckland.ac.nz Fri Nov 25 23:44:16 2005 From: r.fulton at auckland.ac.nz (Russell Fulton) Date: Sat, 26 Nov 2005 17:44:16 +1300 Subject: [fxruby-users] Installing RubyFX on MacOS X 10.4.3 In-Reply-To: <601F37E6-4A99-49C3-BE2F-0A64B9926EDC@butlerpress.com> References: <438134A8.9040001@auckland.ac.nz> <01ecff48ca7388e3fd1f138f5e59b610@knology.net> <601F37E6-4A99-49C3-BE2F-0A64B9926EDC@butlerpress.com> Message-ID: <4387E820.3020809@auckland.ac.nz> Hi Scott, Thanks for describing your experience and apologies for taking so long to get back to you. This is a back burner project for me and now that it's weekend I've got some time to have another go. I too ran into the image lib problems and 'solved' them by installing from source the libraries from source. I then ran into issues with libjpeg refusing to load and ended up copying the version from Fink back over the one I installed from source (after checking that they were built from the same version). I still don't know what was going on here. I tried rebuilding the libjpeg with the version from the fox distribution site but, so far as I can tell it was identical to the one I installed. I have a horrible feeling that something got left from one of my aborted install attempts and is now poisoning everything I try. My next strategy will be to go through /usr/local/ and /sw and remove all files created since I started play with fox and starting again from scratch. I'm also going to uninstall the image libs from fink. fingers firmly crossed:) Russell From r.fulton at auckland.ac.nz Sat Nov 26 14:16:51 2005 From: r.fulton at auckland.ac.nz (Russell Fulton) Date: Sun, 27 Nov 2005 08:16:51 +1300 Subject: [fxruby-users] Installing RubyFX on MacOS X 10.4.3 In-Reply-To: <601F37E6-4A99-49C3-BE2F-0A64B9926EDC@butlerpress.com> References: <438134A8.9040001@auckland.ac.nz> <01ecff48ca7388e3fd1f138f5e59b610@knology.net> <601F37E6-4A99-49C3-BE2F-0A64B9926EDC@butlerpress.com> Message-ID: <4388B4A3.6080205@auckland.ac.nz> OK, I just got hello world up on the screen! It only took about 20 hours :) It turns out that the install is reasonably straight forward so long as you don't first shoot yourself in both feet by having two Ruby installs on your machine ;) When I starter paying with ruby I had not realised that tiger installed ruby and so I had installed it from fink and by the time I came to play with FXRuby I had forgotten this. Once I used dselect to remove the fink version of Ruby thing started working much better. This also explained why I was able to compile extensions without running the the fix program. There are still issues with the graphics libraries and these can be very confusing and difficult to diagnose. The problem being that fox and builds quite happily without them but things come unstuck with FXRuby because it assumes they are in the links are in fox.bundle so you either get an error running install.rb setup or when you run any fxruby app (depending on the exact circumstance). It would be helpful if the fxruby config step could check for the existence of the routines in foxlib and give plain English statement of the problem. One other complication is that not only do you need the libraries you also need the include files to build foxlib properly. Fink does not have dev versions of any of the libraries (i.e. the fink packages do *not* include the header files). It is therefore best to install all the image libraries from source. There are convenient links to the necessary tar balls on the fox download page -- I also installed zlib and bz2. The last piece of the puzzle is that (for reasons unknown and possibly specific to my setup) the libjpeg.a file that I installed had something screwed with its table of contents and I had to run ranlib to fix this. So I ended up taking much longer than I should have to do what is really quite a straight forward job. One other thing that tripped me up was that I ended up with some libraries installed in /usr/local and some in /sw (why oh why does fink install stuff in /sw?? NO I really don't want to know ;) my powerbook is now covered in bloody footprints ;) My excuse is that this is the first time I have tried to install any substantial software from source under Mac OS. Oh yes, I'm also getting old and stupid :) So how does one go about installing fox/fxruby on MacOS 10.4? 1/ Install Apple Xcode tools (if not already installed) and copy the tarballs for fox and fxruby to somewhere convenient. 2/ You also need to download and run the fix script so that the Apple supplied ruby can build extensions. sudo gem install fixrbconfig sudo fixrbconfig 3/ check the prerequisite libraries (png, tiff and jpeg) *and* include files in both /usr/local and /sw (libraries in lib/ and include in include/ -- files in lib/ have lib prepended to the name e.g. libpng). If any are missing then rebuild that package from source (links on the the fox download page). All packages install in /usr/local by default so if you have installed the from fink but are missing the include files the use dselect to uninstall them first. I had to run ranlib on libjpeg.a: sudo ranlib /usr/local/lib/libjpeg.a now you should be able to install fox and fxruby following the usual instructions. The key to a successful install is to have the graphic libraries all present and correct *before* you start installing fox. Lyle: Please feel free to use this material to update the fxruby install web pages. One last note: When I did my final build of fox.bundle (which I did by descending into ext/fox, removing fox.bundle and running make) I got a whole bunch of duplicate symbol warning for various tiff routines which ld found in both libtiff and libfox. I'm not sure what that was about but the fox.bundle that resulted seems to work just fine. Cheers, Russell From scott at butlerpress.com Sat Nov 26 22:10:25 2005 From: scott at butlerpress.com (Scott Willson) Date: Sat, 26 Nov 2005 19:10:25 -0800 Subject: [fxruby-users] Installing RubyFX on MacOS X 10.4.3 In-Reply-To: <4388B4A3.6080205@auckland.ac.nz> References: <438134A8.9040001@auckland.ac.nz> <01ecff48ca7388e3fd1f138f5e59b610@knology.net> <601F37E6-4A99-49C3-BE2F-0A64B9926EDC@butlerpress.com> <4388B4A3.6080205@auckland.ac.nz> Message-ID: <5D9A532F-4205-476A-922A-D33C4ECCAA22@butlerpress.com> Thanks for the detailed write-up. I think you are right that previous broken installs can "pollute" your current install, even when you have everything right. Scott On Nov 26, 2005, at 11:16 AM, Russell Fulton wrote: > OK, I just got hello world up on the screen! It only took about 20 > hours :) > > It turns out that the install is reasonably straight forward so > long as > you don't first shoot yourself in both feet by having two Ruby > installs > on your machine ;) > > When I starter paying with ruby I had not realised that tiger > installed > ruby and so I had installed it from fink and by the time I came to > play > with FXRuby I had forgotten this. Once I used dselect to remove the > fink version of Ruby thing started working much better. This also > explained why I was able to compile extensions without running the the > fix program. > > There are still issues with the graphics libraries and these can be > very > confusing and difficult to diagnose. The problem being that fox and > builds quite happily without them but things come unstuck with FXRuby > because it assumes they are in the links are in fox.bundle so you > either > get an error running install.rb setup or when you run any fxruby app > (depending on the exact circumstance). > > It would be helpful if the fxruby config step could check for the > existence of the routines in foxlib and give plain English > statement of > the problem. > > One other complication is that not only do you need the libraries you > also need the include files to build foxlib properly. Fink does not > have dev versions of any of the libraries (i.e. the fink packages do > *not* include the header files). It is therefore best to install all > the image libraries from source. There are convenient links to the > necessary tar balls on the fox download page -- I also installed zlib > and bz2. > > The last piece of the puzzle is that (for reasons unknown and possibly > specific to my setup) the libjpeg.a file that I installed had > something > screwed with its table of contents and I had to run ranlib to fix > this. > > So I ended up taking much longer than I should have to do what is > really > quite a straight forward job. One other thing that tripped me up was > that I ended up with some libraries installed in /usr/local and > some in > /sw (why oh why does fink install stuff in /sw?? NO I really don't > want > to know ;) my powerbook is now covered in bloody footprints ;) My > excuse is that this is the first time I have tried to install any > substantial software from source under Mac OS. Oh yes, I'm also > getting > old and stupid :) > > So how does one go about installing fox/fxruby on MacOS 10.4? > > 1/ Install Apple Xcode tools (if not already installed) and copy the > tarballs for fox and fxruby to somewhere convenient. > > 2/ You also need to download and run the fix script so that the Apple > supplied ruby can build extensions. > > sudo gem install fixrbconfig > sudo fixrbconfig > > 3/ check the prerequisite libraries (png, tiff and jpeg) *and* include > files in both /usr/local and /sw (libraries in lib/ and include in > include/ -- files in lib/ have lib prepended to the name e.g. > libpng). > > If any are missing then rebuild that package from source (links on the > the fox download page). All packages install in /usr/local by default > so if you have installed the from fink but are missing the include > files > the use dselect to uninstall them first. > > I had to run ranlib on libjpeg.a: > > sudo ranlib /usr/local/lib/libjpeg.a > > now you should be able to install fox and fxruby following the usual > instructions. > > The key to a successful install is to have the graphic libraries all > present and correct *before* you start installing fox. > > Lyle: Please feel free to use this material to update the fxruby > install web pages. > > One last note: When I did my final build of fox.bundle (which I > did by > descending into ext/fox, removing fox.bundle and running make) I got a > whole bunch of duplicate symbol warning for various tiff routines > which > ld found in both libtiff and libfox. I'm not sure what that was about > but the fox.bundle that resulted seems to work just fine. > > Cheers, Russell > _______________________________________________ > fxruby-users mailing list > fxruby-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/fxruby-users From fkchang2000 at yahoo.com Mon Nov 28 02:39:27 2005 From: fkchang2000 at yahoo.com (Forrest Chang) Date: Sun, 27 Nov 2005 23:39:27 -0800 (PST) Subject: [fxruby-users] Large Forms Crash In-Reply-To: Message-ID: <20051128073927.1477.qmail@web82004.mail.mud.yahoo.com> > From: Joel VanderWerf > > Forrest Chang wrote: > > Hi All: > > > > I've got an fxruby app that creates large dialog > > forms -- mostly combinations of FXLabel, and > > FXTextField. It seems that after I've displayed > some > > finite number of them, it crashes the app. I've > > duplicated this with a simple app that you press a > > button to display a new dialog. The demo app > doesn't > > have the scrolling I've added to be able to see > all > > the entries, but seems to demonstrate the same > thing > > happening -- i.e. creating a certain number causes > the > > app to crash (4 for my laptop (windows XP), 6 on > > citrix session (windows 2000). I'm running from > the > > latest one click installer for windows. > > > > Any clues on either what I'm doing wrong or a > > workaround? Code follows. Thanks in advance > > > > Forrest > > > > ====================================== > > > > #!/usr/bin/env ruby > > > > require 'rubygems' > > require_gem 'fxruby' > > require 'fox12' > > No crash with fox14 (that's on linux though, so > there may be other > variables). > HI All: I installed the 1.4.3 gem on windows XP, and I get a crash after presenting it 6 times. Any ideas here? I'm gonna have to start to look at porting the whole app to another window toolkit real soon now, since I need to generate more than 5 large forms. THanks in advance. Forrest From vjoel at path.berkeley.edu Mon Nov 28 10:49:45 2005 From: vjoel at path.berkeley.edu (Joel VanderWerf) Date: Mon, 28 Nov 2005 07:49:45 -0800 Subject: [fxruby-users] Large Forms Crash In-Reply-To: <20051128073927.1477.qmail@web82004.mail.mud.yahoo.com> References: <20051128073927.1477.qmail@web82004.mail.mud.yahoo.com> Message-ID: <438B2719.7090107@path.berkeley.edu> Forrest Chang wrote: > HI All: > > I installed the 1.4.3 gem on windows XP, and I get a > crash after presenting it 6 times. Any ideas here? > I'm gonna have to start to look at porting the whole > app to another window toolkit real soon now, since I > need to generate more than 5 large forms. I forget, did someone suggest GC.disable? Doing that before open the forms would help diagnose the problem: if it doesn't crash any more, there's probably a dangling pointer somewhere in fxruby. The intermittent behavior of the problem does suggest a memory bug... -- vjoel : Joel VanderWerf : path berkeley edu : 510 665 3407 From fkchang2000 at yahoo.com Mon Nov 28 15:21:02 2005 From: fkchang2000 at yahoo.com (Forrest Chang) Date: Mon, 28 Nov 2005 12:21:02 -0800 (PST) Subject: [fxruby-users] Large Forms Crash In-Reply-To: Message-ID: <20051128202103.98167.qmail@web82005.mail.mud.yahoo.com> Joel Wrote: > I forget, did someone suggest GC.disable? Doing that before open the > forms would help diagnose the problem: if it doesn't crash any more, > there's probably a dangling pointer somewhere in fxruby. The > intermittent behavior of the problem does suggest a memory bug... Hi Joel: I put in a GC.disable. Now after 4 clicks, the forms stop appearing. No crash, just no forms. Before, I'd get 4 forms with 4 clicks, click 5 gave no form, click 6 crashed it. So it looks like some problem in fxruby Forrest From lyle at knology.net Mon Nov 28 16:13:28 2005 From: lyle at knology.net (lyle@knology.net) Date: 28 Nov 2005 21:13:28 -0000 Subject: [fxruby-users] Large Forms Crash In-Reply-To: <> References: <> Message-ID: <20051128211328.13434.qmail@webmail3.knology.net> On Mon, 28 Nov 2005 12:21:02 -0800 (PST), Forrest Chang wrote : > I put in a GC.disable. Now after 4 clicks, the > forms stop appearing. No crash, just no forms. > Before, I'd get 4 forms with 4 clicks, click 5 gave no > form, click 6 crashed it. > > So it looks like some problem in fxruby Forrest, Sorry for the delay in responding to this. I have been traveling some (especially last week) and haven't been able to get to a Windows box to take a look. I can reproduce the problem after five or six displays of the dialog. I have filed a bug report about this and will try to get it corrected ASAP. As a side note, what kind of application is this that is going to require the user to fill in on the order of 1800 text fields in a dialog box? I am concerned that even after I correct the bug that's causing it to crash, that you're going to have a unusable application on your hands. -- Lyle From fkchang2000 at yahoo.com Mon Nov 28 17:25:22 2005 From: fkchang2000 at yahoo.com (Forrest Chang) Date: Mon, 28 Nov 2005 14:25:22 -0800 (PST) Subject: [fxruby-users] Large Forms Crash In-Reply-To: <20051128211328.13434.qmail@webmail3.knology.net> Message-ID: <20051128222522.71650.qmail@web82008.mail.mud.yahoo.com> HI Lyle: --- "lyle at knology.net" wrote: > > Sorry for the delay in responding to this. I have > been traveling some > (especially last week) and haven't been able to get > to a Windows box to take > a look. I can reproduce the problem after five or > six displays of the > dialog. I have filed a bug report about this and > will try to get it > corrected ASAP. > Thanks, I appreciate it. > As a side note, what kind of application is this > that is going to require > the user to fill in on the order of 1800 text fields > in a dialog box? I am > concerned that even after I correct the bug that's > causing it to crash, that > you're going to have a unusable application on your > hands. > It ultimately to populate parameters for a substantial simulation model. THere are various "sites" which have subsystems that need modeling. Only one of these subsystems has the huge number of parameters which produced this problem. FOr the most part, these parameters are already in place, and they're just tweaking the values. I have a copy function that allows them to copy the sets across sites. FOrrest From vjoel at path.berkeley.edu Mon Nov 28 17:45:16 2005 From: vjoel at path.berkeley.edu (Joel VanderWerf) Date: Mon, 28 Nov 2005 14:45:16 -0800 Subject: [fxruby-users] Large Forms Crash In-Reply-To: <20051128222522.71650.qmail@web82008.mail.mud.yahoo.com> References: <20051128222522.71650.qmail@web82008.mail.mud.yahoo.com> Message-ID: <438B887C.4060403@path.berkeley.edu> Forrest Chang wrote: ... > It ultimately to populate parameters for a > substantial simulation model. THere are various > "sites" which have subsystems that need modeling. > Only one of these subsystems has the huge number of > parameters which produced this problem. FOr the most > part, these parameters are already in place, and > they're just tweaking the values. I have a copy > function that allows them to copy the sets across > sites. What about using a FXTable? Not as pretty, but 1800 text fields ain't exactly pretty either... -- vjoel : Joel VanderWerf : path berkeley edu : 510 665 3407 From fkchang2000 at yahoo.com Mon Nov 28 18:19:29 2005 From: fkchang2000 at yahoo.com (Forrest Chang) Date: Mon, 28 Nov 2005 15:19:29 -0800 (PST) Subject: [fxruby-users] Large Forms Crash In-Reply-To: <438B887C.4060403@path.berkeley.edu> Message-ID: <20051128231929.80979.qmail@web82011.mail.mud.yahoo.com> HI Joel: --- Joel VanderWerf wrote: > > What about using a FXTable? Not as pretty, but 1800 > text fields ain't > exactly pretty either... > Hmm, I could consider this, what I basically do is traverse these arbitrarily nested data structures and map it into titles, entries, and sub buttons to open up sub structures all on the fly (the data structure definititions are ever evolving). That being said, I don't off the bat have a good idea of how to map that to a table instead of just opening frames, and plopping entries into them, and have it look somewhat reasonable. I'm open to ideas though. FOrrest From boxofsoxx-goognews at yahoo.com Wed Nov 30 22:59:49 2005 From: boxofsoxx-goognews at yahoo.com (boxofsoxx-goognews@yahoo.com) Date: Wed, 30 Nov 2005 19:59:49 -0800 (PST) Subject: [fxruby-users] Can't add text to FXCanvas Message-ID: <20051201035949.48354.qmail@web51609.mail.yahoo.com> I have a ruby program that uses a FXCanvas, and I have attached a FXDCWindow to control it. It lets me draw lines, rectangles and ellipses, but not text. If I attempt to draw text, I get the following error This application has requested the Runtime to terminate it in an unusual way. Please contact the application's support team for more information. >Exit code: 3 I also get this error if I try to set the font of the FXCanvas or the FXDCWindow. I have a short sample program that shows this problem. Thanks for any help. class PlotterWindow < FXMainWindow def initialize(app) # Invoke base class initialize first super(app, "Plotter", nil, nil, DECOR_ALL, 0, 0, 500, 700) @color4 = FXColor::LightBlue1 @color5 = FXColor::Blue @font = FXFont.new(app,"times",14) dumpFontDesc("Initial Font", at font.getFontDesc) # @font.setFont("courier,140") # Dialogs for later use colorDialog = FXColorDialog.new(self, "Color Dialog") # Create a font dialog for later use @fontDialog = FXFontDialog.new(self, "Axis Font Dialog") # Create a tooltip so we get tool tips for things in this window FXToolTip.new(self.getApp()) statusbar = FXStatusBar.new(self, LAYOUT_SIDE_BOTTOM|LAYOUT_FILL_X|STATUSBAR_WITH_DRAGCORNER) #BUTTONS @rightFrame = FXVerticalFrame.new(self, LAYOUT_SIDE_TOP|LAYOUT_SIDE_RIGHT|LAYOUT_FILL_Y) FXVerticalSeparator.new(self, LAYOUT_SIDE_RIGHT|LAYOUT_FILL_Y|SEPARATOR_GROOVE) colorButton = FXButton.new(@rightFrame, "&Colors\tOpen Color Dialog\tOpen a dialog for selecting colors", nil, colorDialog, FXWindow::ID_SHOW, FRAME_RAISED|FRAME_THICK|LAYOUT_FIX_WIDTH|LAYOUT_FIX_HEIGHT, 0,0, 70, 30) fontButton = FXButton.new(@rightFrame, "&Axes\nFont\tChoose Axis Font\tSelect a font for the Axis Display", nil, @fontDialog, FXWindow::ID_SHOW, FRAME_RAISED|FRAME_THICK|LAYOUT_FIX_WIDTH|LAYOUT_FIX_HEIGHT,0, 0,70, 30) quitButton = FXButton.new(@rightFrame, "&Quit\tExit the Program\tTerminate Ruby Plot Program", nil, nil, 0, FRAME_RAISED|FRAME_THICK|LAYOUT_FIX_WIDTH|LAYOUT_FIX_HEIGHT,0, 0,70, 30) quitButton.connect(SEL_COMMAND) { getApp().exit(0) } #CANVAS FRAME canvasFrame = FXVerticalFrame.new(self, FRAME_RIDGE|LAYOUT_FILL_X|LAYOUT_FILL_Y|LAYOUT_TOP|LAYOUT_LEFT, 0, 0, 0, 0, 0,0,0,0) @canvas = FXCanvas.new(canvasFrame, nil, 0, FRAME_RAISED|LAYOUT_FILL_X|LAYOUT_FILL_Y|LAYOUT_TOP|LAYOUT_LEFT) @canvas.connect(SEL_PAINT) do |sender, sel, event| FXDCWindow.new(@canvas, event) do |dc| @canvas.backColor = @color4 dc.foreground = @canvas.backColor dc.fillRectangle(event.rect.x, event.rect.y, event.rect.w,event.rect.h) dc.foreground = @color5 dc.drawEllipse(100,100,100,200) #dc.setFont(@font) #this generates an error #dc.drawText(100,100,"test") #this generates an error end end end def dumpFontDesc(lab,fd) print "fontDesc #{lab} = #{fd.inspect}\n" print "#{fd.face}, #{fd.size},#{fd.weight}," print "#{fd.slant}, #{fd.setwidth},#{fd.encoding}," print "#{fd.flags}\n\n" STDOUT.flush end def create super show(PLACEMENT_SCREEN) end end if __FILE__ == $0 # Construct an application application = FXApp.new("Button", "FoxTest") # Construct the main window PlotterWindow.new(application) # Create the application application.create # Run it application.run end -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/fxruby-users/attachments/20051130/3a66b33d/attachment.htm