From philippe.lang at attiksystem.ch Wed Jul 2 05:33:19 2008 From: philippe.lang at attiksystem.ch (Philippe Lang) Date: Wed, 2 Jul 2008 11:33:19 +0200 Subject: [fxruby-users] FXTextField and text alignment Message-ID: Hi, When the text inside an FXTextField is larger that the available space, the FXTextField apparently "switches" from left alignment to right aligment: you only see the end of the text. When the text is smaller than the available space, text is aligned on the left. Is there a way to change that, and have left alignment all the time? I've been trying a few things, like LAYOUT_SIDE_LEFT or LAYOUT_LEFT, but without success. Thanks! Philippe Lang From jeroen at fox-toolkit.org Wed Jul 2 10:41:28 2008 From: jeroen at fox-toolkit.org (Jeroen van der Zijp) Date: Wed, 2 Jul 2008 09:41:28 -0500 Subject: [fxruby-users] FXTextField and text alignment In-Reply-To: References: Message-ID: <200807020941.28868.jeroen@fox-toolkit.org> On Wednesday 02 July 2008, Philippe Lang wrote: > Hi, > > When the text inside an FXTextField is larger that the available space, > the FXTextField apparently "switches" from left alignment to right > aligment: you only see the end of the text. When the text is smaller > than the available space, text is aligned on the left. > > Is there a way to change that, and have left alignment all the time? > I've been trying a few things, like LAYOUT_SIDE_LEFT or LAYOUT_LEFT, but > without success. It does not switch; however, when putting text in the field, the cursor is placed at the end inside the field, which may cause a scroll to make this position visible. So, simply call textfield->moveCursor(0) to jump the cursor back; or call textfield->makePositionVisible(0) to scroll but leave the cursor position at the original place... Hope this helps, - Jeroen From philippe.lang at attiksystem.ch Wed Jul 2 11:32:32 2008 From: philippe.lang at attiksystem.ch (Philippe Lang) Date: Wed, 2 Jul 2008 17:32:32 +0200 Subject: [fxruby-users] FXTextField and text alignment References: <200807020941.28868.jeroen@fox-toolkit.org> Message-ID: Jeroen van der Zijp wrote: > On Wednesday 02 July 2008, Philippe Lang wrote: >> Hi, >> >> When the text inside an FXTextField is larger that the available >> space, the FXTextField apparently "switches" from left alignment to >> right aligment: you only see the end of the text. When the text is >> smaller than the available space, text is aligned on the left. >> >> Is there a way to change that, and have left alignment all the time? >> I've been trying a few things, like LAYOUT_SIDE_LEFT or LAYOUT_LEFT, >> but without success. > > It does not switch; however, when putting text in the field, the > cursor is placed at the end inside the field, which may cause a > scroll to make this position visible. > > So, simply call textfield->moveCursor(0) to jump the cursor back; or > call > textfield->makePositionVisible(0) to scroll but leave the cursor > textfield->position > at the original place... Thanks a lot Jeroen. I'm calling textfield->makePositionVisible(0) each time I assign something to the textfield, and everything is fine now. The text is aligned to the left. Regards, Philippe From angico at angico.org Thu Jul 3 21:11:27 2008 From: angico at angico.org (angico) Date: Thu, 03 Jul 2008 22:11:27 -0300 Subject: [fxruby-users] FXText widget and localization Message-ID: <1215133887.25096.9.camel@caipora> Hi, list. Does anybody know about using accented letters in FXText? Any tutorial? Any hint? Thanks in advance, -- 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 philippe.lang at attiksystem.ch Fri Jul 4 01:54:21 2008 From: philippe.lang at attiksystem.ch (Philippe Lang) Date: Fri, 4 Jul 2008 07:54:21 +0200 Subject: [fxruby-users] FXText widget and localization References: <1215133887.25096.9.camel@caipora> Message-ID: fxruby-users-bounces at rubyforge.org wrote: > Hi, list. > > Does anybody know about using accented letters in FXText? Any > tutorial? Any hint? > > Thanks in advance, What about adding -------------------------------- # UTF 8 support ENV["OUTPUT_CHARSET"]="UTF-8" $KCODE = 'UTF8' require 'jcode' -------------------------------- ... At the top of your program? Philippe From lyle at lylejohnson.name Fri Jul 4 11:45:33 2008 From: lyle at lylejohnson.name (Lyle Johnson) Date: Fri, 4 Jul 2008 10:45:33 -0500 Subject: [fxruby-users] FXText widget and localization In-Reply-To: <1215133887.25096.9.camel@caipora> References: <1215133887.25096.9.camel@caipora> Message-ID: On Jul 3, 2008, at 8:11 PM, angico wrote: > Does anybody know about using accented letters in FXText? Any > tutorial? > Any hint? Just pass in UTF-8 encoded strings. Here's a quick little introduction: http://www.fxruby.org/doc/unicode.html 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 angico at angico.org Fri Jul 4 18:25:54 2008 From: angico at angico.org (angico) Date: Fri, 04 Jul 2008 19:25:54 -0300 Subject: [fxruby-users] FXText widget and localization Message-ID: <1215210354.6041.42.camel@caipora> Hi, guys. Thank you for your hints, but it didn't solve my problem. Maybe I haven't been much clear. The problem is that I have an FXText widget in which I may edit some text. It already displays accented portuguese letters nicely. But when I try to type any accented letters in it, it behaves like the keys with the accents were just ignored. For example, when type the key for the tilde followed by an A, I expect to see the letter "?" in FXText, but all I got is a normal "A". Does FXText have any support for solving this problem? Thank you, -- 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 angico at angico.org Fri Jul 4 20:29:37 2008 From: angico at angico.org (angico) Date: Fri, 04 Jul 2008 21:29:37 -0300 Subject: [fxruby-users] FXText widget and localization In-Reply-To: <1215210354.6041.42.camel@caipora> References: <1215210354.6041.42.camel@caipora> Message-ID: <1215217777.6041.64.camel@caipora> Hi, guys. Just wandering about the issue, I run xev and I got this sequence of events used to generate an "e acute": KeyPress event, serial 30, synthetic NO, window 0x5c00001, root 0x64, subw 0x0, time 31559119, (725,599), root:(730,648), state 0x0, keycode 34 (keysym 0xfe51, dead_acute), same_screen YES, XLookupString gives 1 bytes: (b4) "?" XmbLookupString gives 0 bytes: XFilterEvent returns: True KeyRelease event, serial 30, synthetic NO, window 0x5c00001, root 0x64, subw 0x0, time 31559224, (725,599), root:(730,648), state 0x0, keycode 34 (keysym 0xfe51, dead_acute), same_screen YES, XLookupString gives 1 bytes: (b4) "?" XFilterEvent returns: False KeyPress event, serial 30, synthetic NO, window 0x5c00001, root 0x64, subw 0x0, time 31567005, (725,599), root:(730,648), state 0x0, keycode 26 (keysym 0x65, e), same_screen YES, XLookupString gives 1 bytes: (65) "e" XmbLookupString gives 1 bytes: (65) "e" XFilterEvent returns: True KeyPress event, serial 30, synthetic NO, window 0x5c00001, root 0x64, subw 0x0, time 31567005, (725,599), root:(730,648), state 0x0, keycode 0 (keysym 0xe9, eacute), same_screen YES, XLookupString gives 0 bytes: XmbLookupString gives 1 bytes: (e9) " XFilterEvent returns: False KeyRelease event, serial 30, synthetic NO, window 0x5c00001, root 0x64, subw 0x0, time 31567069, (725,599), root:(730,648), state 0x0, keycode 26 (keysym 0x65, e), same_screen YES, XLookupString gives 1 bytes: (65) "e" XFilterEvent returns: False Handling the SEL_KEYPRESS message from FXText I can see both the *keysym 0xfe51* and then the *keysym 0x65*, but while other programs combine these keysyms to display a correct e acute, my FXRuby program does not. I guess it should be a ruby issue, but I'm not sure, cause I'm really new to this wonderful world of Ruby and FXRuby (actually I've just finished translating Lyle's "FXRuby - create lean and mean guis with Ruby" to the brazilian edition of the book, and that's how I got into it). Well, if you could send me any hints on the subject, I'd really appreciate. Many 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 fthorton at gmail.com Sat Jul 12 11:23:15 2008 From: fthorton at gmail.com (Fred Horton) Date: Sat, 12 Jul 2008 11:23:15 -0400 Subject: [fxruby-users] problem Message-ID: <2a22d1e70807120823x5e070ab9jc5045263aec93b4c@mail.gmail.com> Hi -- I just got your book FXRuby and am trying to get it working on Leopard -- I had no problems getting it to work on Vista or Ubuntu but when I tried to follow the post on your blog for Leopard I got the following error -- I don't know enough about Leopard or Ruby for that matter to troubleshoot this myself so I was hoping someone may have run into this before and can offer a solution. Here is a printout of what I see: >> require 'rubygems' => false >> require 'fox16' LoadError: dlopen(/Library/Ruby/Gems/1.8/gems/fxruby-1.6.16-universal-darwin-9/ext/fox16/fox16.bundle, 9): Library not loaded: /usr/local/lib/libFOX-1.6.0.dylib Referenced from: /Library/Ruby/Gems/1.8/gems/fxruby-1.6.16-universal-darwin-9/ext/fox16/fox16.bundle Reason: image not found - /Library/Ruby/Gems/1.8/gems/fxruby-1.6.16-universal-darwin-9/ext/fox16/fox16.bundle from /Library/Ruby/Gems/1.8/gems/fxruby-1.6.16-universal-darwin-9/ext/fox16/fox16.bundle from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:32:in `require' from (irb):2 Thanks in advance for any help you can offer. -- Regards, Fred Horton -------------- next part -------------- An HTML attachment was scrubbed... URL: From tgolden at ball.com Sat Jul 12 16:36:24 2008 From: tgolden at ball.com (tomg313) Date: Sat, 12 Jul 2008 13:36:24 -0700 (PDT) Subject: [fxruby-users] Autorefresh of FXGLViewer Message-ID: <18410371.post@talk.nabble.com> I'm using an FXGLViewer and I want to manually control when it updates. Right now, it updates a number of times a second - which uses a lot of my CPU processor time just to redraw the same image over and over. Does anyone know how to stop this from occurring? Thanks in advance!! -- View this message in context: http://www.nabble.com/Autorefresh-of-FXGLViewer-tp18410371p18410371.html Sent from the FXRuby Users mailing list archive at Nabble.com. From angico at angico.org Sat Jul 12 17:31:35 2008 From: angico at angico.org (angico) Date: Sat, 12 Jul 2008 18:31:35 -0300 Subject: [fxruby-users] Autorefresh of FXGLViewer In-Reply-To: <18410371.post@talk.nabble.com> References: <18410371.post@talk.nabble.com> Message-ID: <1215898295.6122.28.camel@caipora> Em S?b, 2008-07-12 ?s 13:36 -0700, tomg313 escreveu: > I'm using an FXGLViewer and I want to manually control when it updates. > Right now, it updates a number of times a second - which uses a lot of my > CPU processor time just to redraw the same image over and over. Does anyone > know how to stop this from occurring? Thanks in advance!! Have you already tried to handle their SEL_PAINT message? Try to dump message data to the console. type and code may help you to find the origins of repaintings. Hope this help. Regards, -- 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 Mon Jul 14 10:20:20 2008 From: lyle at lylejohnson.name (Lyle Johnson) Date: Mon, 14 Jul 2008 09:20:20 -0500 Subject: [fxruby-users] problem In-Reply-To: <2a22d1e70807120823x5e070ab9jc5045263aec93b4c@mail.gmail.com> References: <2a22d1e70807120823x5e070ab9jc5045263aec93b4c@mail.gmail.com> Message-ID: <36060A90-AD99-49AC-B73C-53F5082FF2AD@lylejohnson.name> On Jul 12, 2008, at 10:23 AM, Fred Horton wrote: > Hi -- I just got your book FXRuby and am trying to get it working on > Leopard -- I had no problems getting it to work on Vista or Ubuntu > but when I tried to follow the post on your blog for Leopard I got > the following error -- I don't know enough about Leopard or Ruby for > that matter to troubleshoot this myself so I was hoping someone may > have run into this before and can offer a solution. Here is a > printout of what I see: Whoops. Looks like I've made a mistake in building the OS X gem for FXRuby 1.6.16. I will take a look at this tonight and try to get an updated gem out ASAP. Basically, it has linked to the shared library for FOX (which you don't have) when it should have been linked to the static library for FOX. --- "FXRuby: Create Lean and Mean GUIs with Ruby" Now available from the Pragmatic Bookshelf! http://www.pragprog.com/titles/fxruby From jhadders at ball.com Mon Jul 14 17:43:04 2008 From: jhadders at ball.com (RkyMtnEng) Date: Mon, 14 Jul 2008 14:43:04 -0700 (PDT) Subject: [fxruby-users] Drawing a rotated ellipse Message-ID: <18452090.post@talk.nabble.com> Hi - I'm trying to draw an ellipse using a device context on an FXCanvas. I need to be able to rotate the ellipse however (i.e. rotate the ellipse by 45 degrees) and haven't found any rotation settings for the device context drawing objects. Is there a way to do this? If so, how would I accomplish that? If not, are there any other ways to accomplish this besides using a device context? Thanks! Jonathan -- View this message in context: http://www.nabble.com/Drawing-a-rotated-ellipse-tp18452090p18452090.html Sent from the FXRuby Users mailing list archive at Nabble.com. From lyle at lylejohnson.name Mon Jul 14 18:05:21 2008 From: lyle at lylejohnson.name (Lyle Johnson) Date: Mon, 14 Jul 2008 17:05:21 -0500 Subject: [fxruby-users] Autorefresh of FXGLViewer In-Reply-To: <18410371.post@talk.nabble.com> References: <18410371.post@talk.nabble.com> Message-ID: <57cf8f720807141505n68ab510fsbea8ea4e6ab1b84@mail.gmail.com> On Sat, Jul 12, 2008 at 3:36 PM, tomg313 wrote: > I'm using an FXGLViewer and I want to manually control when it updates. > Right now, it updates a number of times a second - which uses a lot of my > CPU processor time just to redraw the same image over and over. Does anyone > know how to stop this from occurring? The FXGLViewer shouldn't be automatically updating itself like you're describing. Do you see the same behavior with the glviewer.rb example program that comes with FXRuby? If not, are you maybe doing something in your application code (perhaps with a chore or timer) that might be causing it to repeatedly update? From lyle at lylejohnson.name Mon Jul 14 18:09:49 2008 From: lyle at lylejohnson.name (Lyle Johnson) Date: Mon, 14 Jul 2008 17:09:49 -0500 Subject: [fxruby-users] Drawing a rotated ellipse In-Reply-To: <18452090.post@talk.nabble.com> References: <18452090.post@talk.nabble.com> Message-ID: <57cf8f720807141509v784859ddj725293d6b0da1da1@mail.gmail.com> On Mon, Jul 14, 2008 at 4:43 PM, RkyMtnEng wrote: > I'm trying to draw an ellipse using a device context on an FXCanvas. I need > to be able to rotate the ellipse however (i.e. rotate the ellipse by 45 > degrees) and haven't found any rotation settings for the device context > drawing objects. Is there a way to do this? If so, how would I accomplish > that? If not, are there any other ways to accomplish this besides using a > device context? There's nothing built in to FXCanvas (or the FXDC class) to arbitrarily rotate objects like ellipses; you'd need to write your own ellipse-drawing routine that's able to do those transformations. You might be able to do this more easily with FXGLCanvas (i.e. using the GLCanvas as a 2D canvas and ignoring the third dimension). You'd still need to come up with ellipse-drawing code, but you should be able to take advantage of OpenGL's support for transformation matrices. (Of course that's not of much help if you don't know OpenGL...) From lyle at lylejohnson.name Mon Jul 14 22:12:26 2008 From: lyle at lylejohnson.name (Lyle Johnson) Date: Mon, 14 Jul 2008 21:12:26 -0500 Subject: [fxruby-users] problem In-Reply-To: <36060A90-AD99-49AC-B73C-53F5082FF2AD@lylejohnson.name> References: <2a22d1e70807120823x5e070ab9jc5045263aec93b4c@mail.gmail.com> <36060A90-AD99-49AC-B73C-53F5082FF2AD@lylejohnson.name> Message-ID: <7712E7D2-AC0F-4CE4-803E-4179186172C2@lylejohnson.name> On Jul 14, 2008, at 9:20 AM, Lyle Johnson wrote: > Whoops. Looks like I've made a mistake in building the OS X gem for > FXRuby 1.6.16. I will take a look at this tonight and try to get an > updated gem out ASAP. Basically, it has linked to the shared library > for FOX (which you don't have) when it should have been linked to > the static library for FOX. OK. I've re-uploaded the gem for FXRuby 1.6.16 on OS X and it should (I guess?) propagate out to the mirrors over the next few hours. You'll presumably need to do a "gem uninstall fxruby", then try the install again (not sure whether RubyGems will try to cache the old version or not). --- "FXRuby: Create Lean and Mean GUIs with Ruby" Now available from the Pragmatic Bookshelf! http://www.pragprog.com/titles/fxruby From fthorton at gmail.com Tue Jul 15 07:59:04 2008 From: fthorton at gmail.com (Fred Horton) Date: Tue, 15 Jul 2008 07:59:04 -0400 Subject: [fxruby-users] problem In-Reply-To: <36060A90-AD99-49AC-B73C-53F5082FF2AD@lylejohnson.name> References: <2a22d1e70807120823x5e070ab9jc5045263aec93b4c@mail.gmail.com> <36060A90-AD99-49AC-B73C-53F5082FF2AD@lylejohnson.name> Message-ID: <2a22d1e70807150459w652c38a5ja8bbb3a32110d88d@mail.gmail.com> Hi - I discovered my mistake -- when I first got errors, I tried doing a custom install of ruby etc. using the tutorial at Hivelogic but I still got errors -- at that point I went back to your tutorial and noticed what I failed to notice the first time I read it, namely that it works for the default installation so I cleaned out the custom install ruby etc. and was left with the default -- but I still got errors until I used the following for one of your other tutorials as referenced in David Rupp's Blog: export LDFLAGS="-dylib_file \ /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib:\ /System/Library/Frameworks/OpenGL.framework/Versions/A/L Even with the default install of ruby I got errors until I used the following to install: sudo env ARCHFLAGS="-arch i386" gem install fxruby Thanks for your response and I hope round about way of explaining my experience was not too confusing. Anyway, it works for me now on my Mac and I look forward to working through the rest of the book. Regards, Fred On Mon, Jul 14, 2008 at 10:20 AM, Lyle Johnson wrote: > > On Jul 12, 2008, at 10:23 AM, Fred Horton wrote: > > Hi -- I just got your book FXRuby and am trying to get it working on >> Leopard -- I had no problems getting it to work on Vista or Ubuntu but when >> I tried to follow the post on your blog for Leopard I got the following >> error -- I don't know enough about Leopard or Ruby for that matter to >> troubleshoot this myself so I was hoping someone may have run into this >> before and can offer a solution. Here is a printout of what I see: >> > > > > Whoops. Looks like I've made a mistake in building the OS X gem for FXRuby > 1.6.16. I will take a look at this tonight and try to get an updated gem > out ASAP. Basically, it has linked to the shared library for FOX (which you > don't have) when it should have been linked to the static library for FOX. > > --- > "FXRuby: Create Lean and Mean GUIs with Ruby" > Now available from the Pragmatic Bookshelf! > http://www.pragprog.com/titles/fxruby > > > > > > _______________________________________________ > fxruby-users mailing list > fxruby-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/fxruby-users > -- Regards, Fred Horton -------------- next part -------------- An HTML attachment was scrubbed... URL: From tgolden at ball.com Tue Jul 15 10:45:27 2008 From: tgolden at ball.com (tomg313) Date: Tue, 15 Jul 2008 07:45:27 -0700 (PDT) Subject: [fxruby-users] Autorefresh of FXGLViewer In-Reply-To: <57cf8f720807141505n68ab510fsbea8ea4e6ab1b84@mail.gmail.com> References: <18410371.post@talk.nabble.com> <57cf8f720807141505n68ab510fsbea8ea4e6ab1b84@mail.gmail.com> Message-ID: <18467039.post@talk.nabble.com> I found my issue - I'm an idiot :) Well, besides that, I was updating the glviewer light within one of my objects. So when update() is called, the light for the viewer changes, which causes update to be called again... and so on... Thanks for the help! Lyle Johnson-4 wrote: > > On Sat, Jul 12, 2008 at 3:36 PM, tomg313 wrote: > >> I'm using an FXGLViewer and I want to manually control when it updates. >> Right now, it updates a number of times a second - which uses a lot of my >> CPU processor time just to redraw the same image over and over. Does >> anyone >> know how to stop this from occurring? > > The FXGLViewer shouldn't be automatically updating itself like you're > describing. Do you see the same behavior with the glviewer.rb example > program that comes with FXRuby? If not, are you maybe doing something > in your application code (perhaps with a chore or timer) that might be > causing it to repeatedly update? > _______________________________________________ > fxruby-users mailing list > fxruby-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/fxruby-users > > -- View this message in context: http://www.nabble.com/Autorefresh-of-FXGLViewer-tp18410371p18467039.html Sent from the FXRuby Users mailing list archive at Nabble.com. From lyle at lylejohnson.name Tue Jul 15 11:21:19 2008 From: lyle at lylejohnson.name (Lyle Johnson) Date: Tue, 15 Jul 2008 10:21:19 -0500 Subject: [fxruby-users] Autorefresh of FXGLViewer In-Reply-To: <18467039.post@talk.nabble.com> References: <18410371.post@talk.nabble.com> <57cf8f720807141505n68ab510fsbea8ea4e6ab1b84@mail.gmail.com> <18467039.post@talk.nabble.com> Message-ID: <57cf8f720807150821s432389fbsa0486ead181e947b@mail.gmail.com> On Tue, Jul 15, 2008 at 9:45 AM, tomg313 wrote: > I found my issue - I'm an idiot :) Well, besides that, I was updating the > glviewer light within one of my objects. So when update() is called, the > light for the viewer changes, which causes update to be called again... and > so on... Thanks for the help! Glad you got that figured out! Let us know if you run into any more snags. From MAwiniarski at gmail.com Mon Jul 21 04:39:17 2008 From: MAwiniarski at gmail.com (MAwiniarski) Date: Mon, 21 Jul 2008 01:39:17 -0700 (PDT) Subject: [fxruby-users] FXMainWindow Message-ID: <13796bcd-00dc-4e0c-aa53-835a0284708e@x35g2000hsb.googlegroups.com> Greetings, I want to add icon to window using: mainWindow = FXMainWindow.new(app, "Window Title", "icon.ico", nil, DECOR_ALL, mainWindowX, mainWindowY, mainWindowWidth, mainWindowHeight) and get error: wrong argument type String (expected Data) (TypeError) if I put nil instead everything works fine, so so it's about "icon.ico" what is a proper way of initializing icons? thx From lyle at lylejohnson.name Mon Jul 21 09:10:49 2008 From: lyle at lylejohnson.name (Lyle Johnson) Date: Mon, 21 Jul 2008 08:10:49 -0500 Subject: [fxruby-users] FXMainWindow In-Reply-To: <13796bcd-00dc-4e0c-aa53-835a0284708e@x35g2000hsb.googlegroups.com> References: <13796bcd-00dc-4e0c-aa53-835a0284708e@x35g2000hsb.googlegroups.com> Message-ID: <57cf8f720807210610k48163488l3541136eba8c5f47@mail.gmail.com> On Mon, Jul 21, 2008 at 3:39 AM, MAwiniarski wrote: > Greetings, > > I want to add icon to window using: > > mainWindow = FXMainWindow.new(app, "Window Title", > "icon.ico", nil, DECOR_ALL, > mainWindowX, mainWindowY, > mainWindowWidth, mainWindowHeight) > > and get error: > > wrong argument type String (expected Data) (TypeError) > > if I put nil instead everything works fine, so > so it's about "icon.ico" > > what is a proper way of initializing icons? The small icon and large icon arguments need to be references to FXIcon objects. Try this instead: icon = FXICOIcon.new(app, File.open("icon.ico", "rb").read) mainWindow = FXMainWindow.new(app, "Window Title", icon, ...) Hope this helps, Lyle From angico at angico.org Wed Jul 30 20:32:17 2008 From: angico at angico.org (angico) Date: Wed, 30 Jul 2008 21:32:17 -0300 Subject: [fxruby-users] problem with fox instalation Message-ID: <1217464337.5954.16.camel@pirilampo.jlm> Hi, all! I've succesfully installed FXRuby on my desktop, just following the instructions in Lyle's "FXRuby - create lean and mean GUIs with Ruby", and it's really wonderful. Now that I've bought a notebook (nearly the same config as my desktop: both are Intel Pentium Core 2 Duo running Ubuntu 8.04), I'm trying to get FXRuby installed on it, too, but I just can't achieve this and can't realize why. Here are some excerpts of the installation process: ----------- Instalando libfox-1.6-0 (1.6.25-1) ... Instalando libfox-1.6-dev (1.6.25-1) ... Processing triggers for libc6 ... ldconfig deferred processing now taking place angico at pirilampo:~/testes/ruby/operabd$ ruby operabd.rb /usr/lib/ruby/1.8/rubygems/custom_require.rb:32:in `gem_original_require': no such file to load -- fox16 (LoadError) from /usr/lib/ruby/1.8/rubygems/custom_require.rb:32:in `require' from operabd.rb:8 angico at pirilampo:~/testes/ruby/operabd$ sudo gem list --local *** LOCAL GEMS *** fxruby (1.6.16, 1.6.15) FXRuby is the Ruby binding to the FOX GUI toolkit. mysql (2.7.3) A win32-native build of the MySQL API module for Ruby. ri18n (0.0.3) Ruby application internationalization and localization library sources (0.0.1) This package provides download sources for remote gem installation ----------------------- Can anybody point me out what's going wrong? How can I put it to work? Many 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 ------ -------------- next part -------------- An HTML attachment was scrubbed... URL: From lcl at tarazed.demon.co.uk Thu Jul 31 04:06:51 2008 From: lcl at tarazed.demon.co.uk (Len Lawrence) Date: Thu, 31 Jul 2008 09:06:51 +0100 Subject: [fxruby-users] problem with fox instalation In-Reply-To: <1217464337.5954.16.camel@pirilampo.jlm> References: <1217464337.5954.16.camel@pirilampo.jlm> Message-ID: <4891729B.7080001@tarazed.demon.co.uk> angico wrote: > Hi, all! > > I've succesfully installed FXRuby on my desktop, just following the > instructions in Lyle's "FXRuby - create lean and mean GUIs with Ruby", > and it's really wonderful. > > Now that I've bought a notebook (nearly the same config as my desktop: > both are Intel Pentium Core 2 Duo running Ubuntu 8.04), I'm trying to > get FXRuby installed on it, too, but I just can't achieve this and > can't realize why. > > Here are some excerpts of the installation process: > > ----------- > > Instalando libfox-1.6-0 (1.6.25-1) ... > > Instalando libfox-1.6-dev (1.6.25-1) ... > > Processing triggers for libc6 ... > ldconfig deferred processing now taking place > angico at pirilampo:~/testes/ruby/operabd$ ruby operabd.rb > /usr/lib/ruby/1.8/rubygems/custom_require.rb:32:in > `gem_original_require': no such file to load -- fox16 (LoadError) > from /usr/lib/ruby/1.8/rubygems/custom_require.rb:32:in `require' > from operabd.rb:8 > angico at pirilampo:~/testes/ruby/operabd$ sudo gem list --local > > *** LOCAL GEMS *** > > fxruby (1.6.16, 1.6.15) > FXRuby is the Ruby binding to the FOX GUI toolkit. > > mysql (2.7.3) > A win32-native build of the MySQL API module for Ruby. > > ri18n (0.0.3) > Ruby application internationalization and localization library > > sources (0.0.1) > This package provides download sources for remote gem installation > > ----------------------- > > Can anybody point me out what's going wrong? How can I put it to work? > > Many thanks, I had a similar problem some time back. Lyle explained that it was caused by a bug in an early version of gems. Once the fox16 object file had been built it was immediately deleted as part of the cleanup process. The problem went away when I installed a later version of rubygems, > 1.0 I think. Your problem may be unrelated though. I also had to endure that the version numbers of the FOX library and fxruby matched, i.e. FOX16 and fxruby1.6. Len From angico at angico.org Thu Jul 31 05:27:44 2008 From: angico at angico.org (angico) Date: Thu, 31 Jul 2008 06:27:44 -0300 Subject: [fxruby-users] problem with fox instalation In-Reply-To: <4891729B.7080001@tarazed.demon.co.uk> References: <1217464337.5954.16.camel@pirilampo.jlm> <4891729B.7080001@tarazed.demon.co.uk> Message-ID: <1217496464.6141.16.camel@caipora> Em Qui, 2008-07-31 ?s 09:06 +0100, Len Lawrence escreveu: > I had a similar problem some time back. Lyle explained that it was > caused by a bug in an early version of gems. Once the fox16 object file > had been built it was immediately deleted as part of the cleanup > process. The problem went away when I installed a later version of > rubygems, > 1.0 I think. Your problem may be unrelated though. I also > had to endure that the version numbers of the FOX library and fxruby > matched, i.e. FOX16 and fxruby1.6. > > Len > Hi, Len. Thank you for the hint, but I think that's not the way to go, since I'm using just the same versions of the packages both in my desktop system and in my notebook: $ gem --version 0.9.4 -- 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 angico at angico.org Thu Jul 31 05:52:25 2008 From: angico at angico.org (angico) Date: Thu, 31 Jul 2008 06:52:25 -0300 Subject: [fxruby-users] problem with fox instalation In-Reply-To: <1217496464.6141.16.camel@caipora> References: <1217464337.5954.16.camel@pirilampo.jlm> <4891729B.7080001@tarazed.demon.co.uk> <1217496464.6141.16.camel@caipora> Message-ID: <1217497945.6141.28.camel@caipora> Em Qui, 2008-07-31 ?s 06:27 -0300, angico escreveu: > Em Qui, 2008-07-31 ?s 09:06 +0100, Len Lawrence escreveu: > > I had a similar problem some time back. Lyle explained that it was > > caused by a bug in an early version of gems. Once the fox16 object file > > had been built it was immediately deleted as part of the cleanup > > process. The problem went away when I installed a later version of > > rubygems, > 1.0 I think. Your problem may be unrelated though. I also > > had to endure that the version numbers of the FOX library and fxruby > > matched, i.e. FOX16 and fxruby1.6. > > > > Len > > > Hi, Len. > > Thank you for the hint, but I think that's not the way to go, since I'm > using just the same versions of the packages both in my desktop system > and in my notebook: > > $ gem --version > 0.9.4 Hi! I guess I found the problem. It was a matter of conflicting versions of installed gems. As I initially stated I had fxruby-1.6.16-universal-darwin-9 and fxruby-1.6.15-universal-darwin-9 installed on the laptop. So I just removed both, and ran sudo gem install fxruby again, this time selecting 'fxruby 1.6.16 (ruby)' from the installation options, and now it works just fine. -- 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 Thu Jul 31 09:27:11 2008 From: lyle at lylejohnson.name (Lyle Johnson) Date: Thu, 31 Jul 2008 08:27:11 -0500 Subject: [fxruby-users] problem with fox instalation In-Reply-To: <1217497945.6141.28.camel@caipora> References: <1217464337.5954.16.camel@pirilampo.jlm> <4891729B.7080001@tarazed.demon.co.uk> <1217496464.6141.16.camel@caipora> <1217497945.6141.28.camel@caipora> Message-ID: <2615722A-2E8E-4E13-ACDE-2C8868BF4AC5@lylejohnson.name> On Jul 31, 2008, at 4:52 AM, angico wrote: > I guess I found the problem. It was a matter of conflicting versions > of > installed gems. As I initially stated I had > fxruby-1.6.16-universal-darwin-9 and fxruby-1.6.15-universal-darwin-9 > installed on the laptop... Those gems are for OS X, not Ubuntu. They definitely shouldn't work on your Linux notebook! > So I just removed both, and ran sudo gem > install fxruby again, this time selecting 'fxruby 1.6.16 (ruby)' from > the installation options, and now it works just fine. Great! From angico at angico.org Thu Jul 31 10:56:11 2008 From: angico at angico.org (angico) Date: Thu, 31 Jul 2008 11:56:11 -0300 Subject: [fxruby-users] problem with fox instalation In-Reply-To: <2615722A-2E8E-4E13-ACDE-2C8868BF4AC5@lylejohnson.name> References: <1217464337.5954.16.camel@pirilampo.jlm> <4891729B.7080001@tarazed.demon.co.uk> <1217496464.6141.16.camel@caipora> <1217497945.6141.28.camel@caipora> <2615722A-2E8E-4E13-ACDE-2C8868BF4AC5@lylejohnson.name> Message-ID: <1217516171.14257.7.camel@caipora> Em Qui, 2008-07-31 ?s 08:27 -0500, Lyle Johnson escreveu: > On Jul 31, 2008, at 4:52 AM, angico wrote: > > > I guess I found the problem. It was a matter of conflicting versions > > of > > installed gems. As I initially stated I had > > fxruby-1.6.16-universal-darwin-9 and fxruby-1.6.15-universal-darwin-9 > > installed on the laptop... > > Those gems are for OS X, not Ubuntu. They definitely shouldn't work on > your Linux notebook! > > > So I just removed both, and ran sudo gem > > install fxruby again, this time selecting 'fxruby 1.6.16 (ruby)' from > > the installation options, and now it works just fine. > > Great! > _______________________________________________ > fxruby-users mailing list > fxruby-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/fxruby-users Thanks, Lyle. Anyway, I think it's a little hard for newbies like me to find out what those options really mean, since they don't say much about it. For instance: $ sudo gem install mysql Need to update 1 gems from http://gems.rubyforge.org . complete Select which gem to install for your platform (x86_64-linux) 1. mysql 2.7.3 (mswin32) 2. mysql 2.7.1 (mswin32) 3. mysql 2.7 (ruby) 4. mysql 2.6 (ruby) 5. Skip this gem 6. Cancel installation > Which option should I choose? I bet it's 3, but it's really not clear at all. Regards, -- 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 jonathan.stott at gmail.com Thu Jul 31 10:59:53 2008 From: jonathan.stott at gmail.com (Jonathan Stott) Date: Thu, 31 Jul 2008 15:59:53 +0100 Subject: [fxruby-users] problem with fox instalation In-Reply-To: <1217516171.14257.7.camel@caipora> References: <1217464337.5954.16.camel@pirilampo.jlm> <4891729B.7080001@tarazed.demon.co.uk> <1217496464.6141.16.camel@caipora> <1217497945.6141.28.camel@caipora> <2615722A-2E8E-4E13-ACDE-2C8868BF4AC5@lylejohnson.name> <1217516171.14257.7.camel@caipora> Message-ID: <14cf210a0807310759p6022c159p763284e8f2280fbc@mail.gmail.com> angico wrote: > Thanks, Lyle. Anyway, I think it's a little hard for newbies like me to > find out what those options really mean, since they don't say much about > it. For instance: > > $ sudo gem install mysql > Need to update 1 gems from http://gems.rubyforge.org > . > complete > Select which gem to install for your platform (x86_64-linux) > 1. mysql 2.7.3 (mswin32) > 2. mysql 2.7.1 (mswin32) > 3. mysql 2.7 (ruby) > 4. mysql 2.6 (ruby) > 5. Skip this gem > 6. Cancel installation >> > Yeah, it's 3. What I would actually recommend you do is upgrade ruby gems (external to the ubuntu package if nessessary) to version 1.2, which takes care of these questions automatically (amongst some other improvements) > Which option should I choose? I bet it's 3, but it's really not clear at > all. > > Regards, > > -- > angico