From lyle at knology.net Wed Jul 5 13:48:22 2006 From: lyle at knology.net (Lyle Johnson) Date: Wed, 5 Jul 2006 12:48:22 -0500 Subject: [fxruby-users] RubyGems 0.9.0 introduces a bug for FXRuby gem installation Message-ID: All, I've recently been alerted to a bug introduced in RubyGems 0.9.0 that breaks the installation of FXRuby from a source gem. As far as I know this bug doesn't affect the installation of FXRuby from the binary gems for Windows. Anyways, I've reported the bug to the RubyGems developers and hopefully they'll address that problem in the next release. Thanks, Lyle From AEtzold at gmx.de Sat Jul 8 18:10:05 2006 From: AEtzold at gmx.de (Axel Etzold) Date: Sun, 09 Jul 2006 00:10:05 +0200 Subject: [fxruby-users] FXComboBox - read out currrent Item Message-ID: <20060708221005.46930@gmx.net> Dear Lyle, thank you for your response. SEL_COMMAND works for me. Sorry to ask so many questions. What intrigues me further is that in the online documentation of class Fox::FXComboBox, there is no 'connect' among the methods list ... this was responsible for my post - I thought that for some reason one could not connect to FXCombobox, as the SEL_CHANGED command didn't work. Thank you, Axel -- Echte DSL-Flatrate dauerhaft f?r 0,- Euro*! "Feel free" mit GMX DSL! http://www.gmx.net/de/go/dsl From AEtzold at gmx.de Sat Jul 8 18:16:27 2006 From: AEtzold at gmx.de (Axel Etzold) Date: Sun, 09 Jul 2006 00:16:27 +0200 Subject: [fxruby-users] FXCombobox -set background color Message-ID: <20060708221627.46950@gmx.net> Dear Lyle, thank you also for your reply to my background color question. I have tried various color constants , but I don't think that the problem is correctly identified yet. What I don't understand is, why is the color of the pane set to white, say, if that's the prescribed color of the FXTextField child of FXCombobox, but the one option that's visible, if you don't click on the item is still in the other color. If it had to do with Henon's recursive function call, I'd expect the one call to a white background for the FXTextfield to be overwritten as the next element is introduced. Maybe i didn't make my question sufficiently clear - that was actually the reason for my bug report request. Thank you very much for your help! Best regards, Axel -- "Feel free" ? 10 GB Mailbox, 100 FreeSMS/Monat ... Jetzt GMX TopMail testen: http://www.gmx.net/de/go/topmail From lyle at knology.net Sat Jul 8 19:01:46 2006 From: lyle at knology.net (Lyle Johnson) Date: Sat, 8 Jul 2006 18:01:46 -0500 Subject: [fxruby-users] FXComboBox - read out currrent Item In-Reply-To: <20060708221005.46930@gmx.net> References: <20060708221005.46930@gmx.net> Message-ID: <335E4FCB-9588-4024-A8B4-BA08FAA57AB4@knology.net> On Jul 8, 2006, at 5:10 PM, Axel Etzold wrote: > thank you for your response. SEL_COMMAND works for me. Good. Actually, I discovered that the SEL_CHANGED message for an FXComboBox only gets sent when you're making changes to the text in an editable combo-box. If you have a COMBOBOX_STATIC (which can't be edited) you're never going to get SEL_CHANGED. > Sorry to ask so many questions. What intrigues me further > is that in the online documentation of class Fox::FXComboBox, > there is no 'connect' among the methods list ... The connect() method is defined in the Responder2 module, which is mixed in to the FXWindow class (an ancestor class of FXComboBox). From lyle at knology.net Sat Jul 8 22:34:54 2006 From: lyle at knology.net (Lyle Johnson) Date: Sat, 8 Jul 2006 21:34:54 -0500 Subject: [fxruby-users] FXCombobox -set background color In-Reply-To: <20060708221627.46950@gmx.net> References: <20060708221627.46950@gmx.net> Message-ID: On Jul 8, 2006, at 5:16 PM, Axel Etzold wrote: > thank you also for your reply to my background color > question. I have tried various color constants , but > I don't think that the problem is correctly identified > yet. What I don't understand is, why is the color > of the pane set to white, say, if that's the prescribed > color of the FXTextField child of FXCombobox, but the > one option that's visible, if you don't click on the > item is still in the other color. Because I still don't understand the question, I've written a short and to the point little program that displays a combo box (attached). Make minor modifications to it, if you need to, to reproduce the problem you're describing. Once you've done that, please tell me (1) what it is that you were expecting to see, and (2) what it is that you're actually (unexpectedly) seeing. -------------- next part -------------- A non-text attachment was scrubbed... Name: combobox.rb Type: text/x-ruby-script Size: 383 bytes Desc: not available Url : http://rubyforge.org/pipermail/fxruby-users/attachments/20060708/6800c7ec/attachment-0001.bin From AEtzold at gmx.de Sun Jul 9 10:50:02 2006 From: AEtzold at gmx.de (Axel Etzold) Date: Sun, 09 Jul 2006 16:50:02 +0200 Subject: [fxruby-users] FXCombobox -set background color In-Reply-To: References: <20060708221627.46950@gmx.net> Message-ID: <20060709145002.136630@gmx.net> Dear Lyle, thank you for your response. Your code works fine. My problem is shown in the attached screenshot of my application. There's a Combobox open, the pane is in white color, but the first option in it is gray, like the background. This seems to be because recursively, labels, textfields, comboboxes get added, and I set their background color in each iteration step. Now, it seems that the background is everything but the newly added textfield,combobox or whatever. I can work around this problem now, by setting colors more selectively, as in the lines commented out below. p.recursive{|w| next if w.kind_of? TextField next if w.backColor==HEADER_COLOR if /ComboBox/.match(w.type.to_s) w.baseColor=WHITE_BACK_COLOR w.backColor=WHITE_BACK_COLOR w.children.each{|x| x.backColor=WHITE_BACK_COLOR x.baseColor=WHITE_BACK_COLOR } else #elsif /Label/.match(w.type.to_s) w.backColor=STD_BACK_COLOR # this causes a problem #elsif /Button/.match(w.type.to_s) # w.backColor=STD_BACK_COLOR end } So even though I don't understand why this program behaves like this, it works , thank you! Best regards, Axel -------- Original-Nachricht -------- Datum: Sat, 8 Jul 2006 21:34:54 -0500 Von: Lyle Johnson An: Axel Etzold Betreff: Re: [fxruby-users] FXCombobox -set background color > > On Jul 8, 2006, at 5:16 PM, Axel Etzold wrote: > > > thank you also for your reply to my background color > > question. I have tried various color constants , but > > I don't think that the problem is correctly identified > > yet. What I don't understand is, why is the color > > of the pane set to white, say, if that's the prescribed > > color of the FXTextField child of FXCombobox, but the > > one option that's visible, if you don't click on the > > item is still in the other color. > > Because I still don't understand the question, I've written a short > and to the point little program that displays a combo box (attached). > Make minor modifications to it, if you need to, to reproduce the > problem you're describing. Once you've done that, please tell me (1) > what it is that you were expecting to see, and (2) what it is that > you're actually (unexpectedly) seeing. > -- Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen! Ideal f?r Modem und ISDN: http://www.gmx.net/de/go/smartsurfer -------------- next part -------------- A non-text attachment was scrubbed... Name: combobox.zip Type: application/x-zip-compressed Size: 21028 bytes Desc: not available Url : http://rubyforge.org/pipermail/fxruby-users/attachments/20060709/eb53030b/attachment-0001.bin From AEtzold at gmx.de Sun Jul 9 11:02:26 2006 From: AEtzold at gmx.de (Axel Etzold) Date: Sun, 09 Jul 2006 17:02:26 +0200 Subject: [fxruby-users] FXDirlist display problem Message-ID: <20060709150226.136670@gmx.net> Dear Lyle, Dear all, all of a sudden, there is no display of my directory file list anymore. There is no error output from the runtime. :( @filelist = FXFileList.new(@fileframe, nil, 0, (FILELIST_SHOWDIRS|FILELIST_SHOWFILES|FRAME_SUNKEN|FRAME_THICK| LAYOUT_FILL_X|LAYOUT_FILL_Y), 0, 0, 0, 0) @filelist.connect(SEL_DOUBLECLICKED, method(:onCmdFileList)) I didn't change anything in the code at that point though. What could be the reason for this behaviour ? Thank you! Best regards, Axel -- "Feel free" ? 10 GB Mailbox, 100 FreeSMS/Monat ... Jetzt GMX TopMail testen: http://www.gmx.net/de/go/topmail From lyle at knology.net Sun Jul 9 17:12:00 2006 From: lyle at knology.net (Lyle Johnson) Date: Sun, 9 Jul 2006 16:12:00 -0500 Subject: [fxruby-users] FXDirlist display problem In-Reply-To: <20060709150226.136670@gmx.net> References: <20060709150226.136670@gmx.net> Message-ID: <01E82FE2-D98B-4D41-92AB-6AB08798CE12@knology.net> On Jul 9, 2006, at 10:02 AM, Axel Etzold wrote: > all of a sudden, there is no display of my directory file list > anymore. The imageviewer.rb and tabbook.rb example programs from the FXRuby distribution both use the FXFileList widget, and both seem to be working properly. From AEtzold at gmx.de Mon Jul 10 16:35:06 2006 From: AEtzold at gmx.de (Axel Etzold) Date: Mon, 10 Jul 2006 22:35:06 +0200 Subject: [fxruby-users] FXDirlist display problem In-Reply-To: <01E82FE2-D98B-4D41-92AB-6AB08798CE12@knology.net> References: <20060709150226.136670@gmx.net> <01E82FE2-D98B-4D41-92AB-6AB08798CE12@knology.net> Message-ID: <20060710203506.315170@gmx.net> Dear Lyle, thanks for responding so patiently and so nicely. The two programs you mentioned work well on my computer, and the line of code defining FXfilelist im myapp is exactly the same as in imageviewer.rb, except that in my app, fxdirlist depends on a @fileframe, rather than a frame, but that one's definition is again the same as in imageviewer. Nevertheless, I don't see anything clickable. This intrigues me, because I already had that part working, so icons etc are there, and I don't remember that I changed anything in this part of the code. I searched through all my code yesterday and today and I am really lost :( Is there anything that could cause a FXFilelist not to be displayed, that's outside its defining line of code ? Thank you very much, Axel -------- Original-Nachricht -------- Datum: Sun, 9 Jul 2006 16:12:00 -0500 Von: Lyle Johnson An: Axel Etzold Betreff: Re: [fxruby-users] FXDirlist display problem > > On Jul 9, 2006, at 10:02 AM, Axel Etzold wrote: > > > all of a sudden, there is no display of my directory file list > > anymore. > > The imageviewer.rb and tabbook.rb example programs from the FXRuby > distribution both use the FXFileList widget, and both seem to be > working properly. -- "Feel free" ? 10 GB Mailbox, 100 FreeSMS/Monat ... Jetzt GMX TopMail testen: http://www.gmx.net/de/go/topmail From vjoel at path.berkeley.edu Mon Jul 10 16:42:10 2006 From: vjoel at path.berkeley.edu (Joel VanderWerf) Date: Mon, 10 Jul 2006 13:42:10 -0700 Subject: [fxruby-users] FXComboBox with no currentItem Message-ID: <44B2BBA2.70506@path.berkeley.edu> It used to be the case that -1 represented the state of having no current item, but that doesn't seem to be the case now in 1.6. If I modify groupbox.rb like so: combobox = FXComboBox.new(group3, 5, nil, 0, COMBOBOX_INSERT_LAST|FRAME_SUNKEN|FRAME_THICK|LAYOUT_SIDE_TOP) combobox.appendItem("Very Wide Item") for i in 0...3 combobox.appendItem("%04d" % i) end combobox.currentItem = -1 Then I get an IndexError. It also fails with setCurrentItem(-1). And it fails using nil in place of -1. The rdoc for FXComboBox says: currentItem [RW] Index of current item, or -1 if no current item [Integer] Is there any way to say "no current item"? -- vjoel : Joel VanderWerf : path berkeley edu : 510 665 3407 From jeroen at fox-toolkit.org Mon Jul 10 17:26:14 2006 From: jeroen at fox-toolkit.org (Jeroen van der Zijp) Date: Mon, 10 Jul 2006 16:26:14 -0500 Subject: [fxruby-users] FXComboBox with no currentItem In-Reply-To: <44B2BBA2.70506@path.berkeley.edu> References: <44B2BBA2.70506@path.berkeley.edu> Message-ID: <200607101626.14553.jeroen@fox-toolkit.org> On Monday 10 July 2006 15:42, Joel VanderWerf wrote: > It used to be the case that -1 represented the state of having no > current item, but that doesn't seem to be the case now in 1.6. If I > modify groupbox.rb like so: > > combobox = FXComboBox.new(group3, 5, nil, 0, > COMBOBOX_INSERT_LAST|FRAME_SUNKEN|FRAME_THICK|LAYOUT_SIDE_TOP) > combobox.appendItem("Very Wide Item") > for i in 0...3 > combobox.appendItem("%04d" % i) > end > combobox.currentItem = -1 > > Then I get an IndexError. It also fails with setCurrentItem(-1). And it > fails using nil in place of -1. > > The rdoc for FXComboBox says: > > currentItem [RW] Index of current item, or -1 if no current item > [Integer] > > Is there any way to say "no current item"? > As far as I can tell from here, setting -1 should be possible; it could be in the FXRuby binding itself. No to be honest, the FXComboBox uses the FXList in browse-select mode, which means as long as there is at least ONE item, the current item should be >=0... - Jeroen -- +----------------------------------------------------------------------------+ | Copyright (C) 23:30 03/30/2006 Jeroen van der Zijp. All Rights Reserved. | +----------------------------------------------------------------------------+ From lyle at knology.net Mon Jul 10 17:01:31 2006 From: lyle at knology.net (Lyle Johnson) Date: Mon, 10 Jul 2006 16:01:31 -0500 Subject: [fxruby-users] FXComboBox with no currentItem In-Reply-To: <44B2BBA2.70506@path.berkeley.edu> References: <44B2BBA2.70506@path.berkeley.edu> Message-ID: On Jul 10, 2006, at 3:42 PM, Joel VanderWerf wrote: > It used to be the case that -1 represented the state of having no > current item, but that doesn't seem to be the case now in 1.6... This is a bug. I've filed a bug report about it, and will get it fixed in the next release. From lyle at knology.net Mon Jul 10 18:32:11 2006 From: lyle at knology.net (Lyle Johnson) Date: Mon, 10 Jul 2006 17:32:11 -0500 Subject: [fxruby-users] FXComboBox with no currentItem In-Reply-To: <200607101626.14553.jeroen@fox-toolkit.org> References: <44B2BBA2.70506@path.berkeley.edu> <200607101626.14553.jeroen@fox-toolkit.org> Message-ID: On Jul 10, 2006, at 4:26 PM, Jeroen van der Zijp wrote: > As far as I can tell from here, setting -1 should be possible; it > could > be in the FXRuby binding itself. Yes, it's an FXRuby bug. > No to be honest, the FXComboBox uses the FXList in browse-select mode, > which means as long as there is at least ONE item, the current item > should be >=0... Hmmm... Maybe I was right all along and just didn't know it. ;) Anyways. After the bug fix, FXRuby will at least be consistent with FOX in terms of setting the current item index to -1. From gerard.menochet at wanadoo.fr Tue Jul 11 19:31:49 2006 From: gerard.menochet at wanadoo.fr (=?iso-8859-1?Q?G=E9rard_M=E9nochet?=) Date: Wed, 12 Jul 2006 01:31:49 +0200 Subject: [fxruby-users] reparent in the FXWindow documentaton Message-ID: <000f01c6a542$2f3f9b00$6a3aca53@gnwpcpf2pugnix> Hi, The definition of reparent in the FXWindow documentation seems odd to me: << reparent(father, other) Reparent this window under new father window, after other sibling.. >> I wonder if I should understand .... before other sibling from core.rb # Relink this window before sibling window _other_, in the parent's window list. def linkBefore(other) reparent(self.parent, other) end # Relink this window after sibling window _other_, in the parent's window list. def linkAfter(other) reparent(self.parent, other.next) end Is there a problem ??? Regards G?rard M?nochet -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/fxruby-users/attachments/20060712/0e9362a5/attachment.html From lyle at knology.net Tue Jul 11 20:38:27 2006 From: lyle at knology.net (Lyle Johnson) Date: Tue, 11 Jul 2006 19:38:27 -0500 Subject: [fxruby-users] reparent in the FXWindow documentaton In-Reply-To: <000f01c6a542$2f3f9b00$6a3aca53@gnwpcpf2pugnix> References: <000f01c6a542$2f3f9b00$6a3aca53@gnwpcpf2pugnix> Message-ID: <1D4E1364-41DF-4646-8E05-634AD66B39E8@knology.net> On Jul 11, 2006, at 6:31 PM, G?rard M?nochet wrote: > The definition of reparent in the FXWindow documentation seems odd > to me: > > << reparent(father, other) > Reparent this window under new father window, after other > sibling.. >> > > I wonder if I should understand .... before other sibling You're right, the documentation for FXWindow#reparent is incorrect (it should say "before"). Will you please file a bug report on this? -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/fxruby-users/attachments/20060711/2da56388/attachment.html From hal9000 at hypermetrics.com Tue Jul 11 20:58:35 2006 From: hal9000 at hypermetrics.com (Hal Fulton) Date: Tue, 11 Jul 2006 19:58:35 -0500 Subject: [fxruby-users] fxruby install problem? Message-ID: <44B4493B.6080205@hypermetrics.com> I'm running the Ruby stable snapshot. It reports 1.8.5. I dl'd fox 1.6.6 and did: ./configure --with-scintilla make make install Then I did gem install fxruby and picked 1.6 (ruby) It finally said: make install make: Nothing to be done for `install'. make clean Successfully installed fxruby-1.6.0 Installing ri documentation for fxruby-1.6.0... Installing RDoc documentation for fxruby-1.6.0... Everything looked OK until the suspicious-looking "Nothing to be done." Now I can't do a require of fox16. It gives me an error: [hal at localhost ch19]$ irb irb(main):001:0> require 'fox16' LoadError: no such file to load -- fox16 from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require' from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require' from (irb):1 Where do I start debugging this? Thanks, Hal From lyle at knology.net Wed Jul 12 08:47:42 2006 From: lyle at knology.net (Lyle Johnson) Date: Wed, 12 Jul 2006 07:47:42 -0500 Subject: [fxruby-users] fxruby install problem? In-Reply-To: <44B4493B.6080205@hypermetrics.com> References: <44B4493B.6080205@hypermetrics.com> Message-ID: On Jul 11, 2006, at 7:58 PM, Hal Fulton wrote: > I'm running the Ruby stable snapshot. It reports > 1.8.5. > > I dl'd fox 1.6.6 and did: > > ./configure --with-scintilla > make > make install Quick side note: The "--with-scintilla" option doesn't mean anything to FOX. He doesn't know anything about FXScintilla. You can safely leave that bit off in the future. > Then I did > > gem install fxruby > > and picked 1.6 (ruby) > > It finally said: > > make install > make: Nothing to be done for `install'. > > make clean > Successfully installed fxruby-1.6.0 > Installing ri documentation for fxruby-1.6.0... > Installing RDoc documentation for fxruby-1.6.0... > > Everything looked OK until the suspicious-looking > "Nothing to be done." > > Now I can't do a require of fox16... This is a known bug in RubyGems 0.9.0; see: http://rubyforge.org/tracker/index.php? func=detail&aid=4948&group_id=126&atid=575 a workaround is to use the "gem env" command to identify your Gems installation directory (usually something like /usr/local/lib/ruby/ gems/1.8) and switch to the "gems/fxruby-1.6.0/ext/fox16" directory underneath that: cd /usr/local/lib/ruby/gems/1.8/gems/fxruby-1.6.0/ext/fox16 and then type: make Note that depending on permissions, you may need to be logged in as root to do that. It will recompile the extension module and after that you should be in good shape. From lyle at knology.net Wed Jul 12 22:09:48 2006 From: lyle at knology.net (Lyle Johnson) Date: Wed, 12 Jul 2006 21:09:48 -0500 Subject: [fxruby-users] fxruby install problem? In-Reply-To: <44B58CC6.9030401@hypermetrics.com> References: <44B4493B.6080205@hypermetrics.com> <44B58CC6.9030401@hypermetrics.com> Message-ID: On Jul 12, 2006, at 6:59 PM, Hal Fulton wrote: > OK, that worked. But apparently FreeRIDE needs fox 1.2? That may be true... > Here's the tail end of my "gem install fxruby" where I > tried to get a 1.2 -- what now? (That make.out is empty, > by the way.) > > 26. fxruby 1.2.1 (ruby) > 27. fxruby 1.2.1 (mswin32) > 28. Cancel installation > > 26 > Building native extensions. This could take a while... Do you have FOX 1.2 installed (as well as a version of FXScintilla built against that build of FOX 1.2)? Also, note that the latest version of FXRuby 1.2 is version 1.2.6; when I tried to install it via RubyGems, it came up as option #17 (but I'm not sure how stable that ordering is). As a side note: While I'm sympathetic to the fact that FreeRIDE (and perhaps other apps) are still based on FXRuby 1.2, the fact is that that version's a couple of "generations" old now. I'm definitely not making bug fixes or otherwise developing that series anymore. I'm not sure what it would take to get the FreeRIDErs to upgrade to the latest FXRuby; I'm guessing that they have just about as much free time as I do. ;) From pijnacker at dse.nl Thu Jul 13 08:55:08 2006 From: pijnacker at dse.nl (Ronald Pijnacker) Date: Thu, 13 Jul 2006 14:55:08 +0200 Subject: [fxruby-users] Questions on cursors Message-ID: <20060713125508.GB373@best.ms.philips.com> Hi all, Recently I started using FXRuby (on windows) for a prototype visualization package. 'Til everything went nice and smooth. Thanks for a nice toolkit. One of the things I am trying to do is to map different mousebutton combinations to different interactions. To give feedback, I would like to update the cursor to indicate the interaction triggered. My approach was to enable the wait cursor when the mouse button was pressed, and switch wait cursors for different combinations of mouse buttons. To see which combination of mouse buttons is pressed, I use the event.state property. Could you please answer some questions: 1. When I press left & middle inside the canvas, move the mouse outside the fx-window and release both buttons, I get only one callback for the RELEASE, eventhough I keep the canvas grabbed. Is this expected? 2. Is the beginWaitCursor / endWaitCursor / setWaitCursor the right strategy? I've been playing around with setting the cursors, but I get quite some crashes. 3. I've created a different default cursor, which I assign to the DEF_ARROW_CURSOR. When I assign it to DEF_RARROW_CURSOR too, I get a crash during exiting. Am I doing something wrong? 4. It seems defaultCursor= is an alias to setDefaultCursor. However, this takes two parameters, which is kindof unexpected for a set-property. Did I misunderstand the meaning of defaultCursor= ? Thanks for taking the time to answer my questions. Groeten/Regards, Ronald. From jeroen at fox-toolkit.org Thu Jul 13 09:15:07 2006 From: jeroen at fox-toolkit.org (Jeroen van der Zijp) Date: Thu, 13 Jul 2006 08:15:07 -0500 Subject: [fxruby-users] Questions on cursors In-Reply-To: <20060713125508.GB373@best.ms.philips.com> References: <20060713125508.GB373@best.ms.philips.com> Message-ID: <200607130815.07802.jeroen@fox-toolkit.org> On Thursday 13 July 2006 07:55, Ronald Pijnacker wrote: > Hi all, > > Recently I started using FXRuby (on windows) for a prototype > visualization package. > 'Til everything went nice and smooth. Thanks for a nice toolkit. > > One of the things I am trying to do is to map different mousebutton > combinations to different interactions. To give feedback, I would like > to update the cursor to indicate the interaction triggered. > > My approach was to enable the wait cursor when the mouse button was > pressed, and switch wait cursors for different combinations of mouse > buttons. To see which combination of mouse buttons is pressed, I use the > event.state property. > > Could you please answer some questions: > > 1. When I press left & middle inside the canvas, move the mouse outside > the fx-window and release both buttons, I get only one callback for > the RELEASE, eventhough I keep the canvas grabbed. Is this expected? > > 2. Is the beginWaitCursor / endWaitCursor / setWaitCursor the right > strategy? I've been playing around with setting the cursors, but I > get quite some crashes. > > 3. I've created a different default cursor, which I assign to the > DEF_ARROW_CURSOR. When I assign it to DEF_RARROW_CURSOR too, I get a > crash during exiting. Am I doing something wrong? > > 4. It seems defaultCursor= is an alias to setDefaultCursor. However, > this takes two parameters, which is kindof unexpected for a > set-property. Did I misunderstand the meaning of defaultCursor= ? > > Thanks for taking the time to answer my questions. > > Groeten/Regards, 1) If the first RELEASE causes the widget to ungrab(), the second RELEASE will go to the widget under the cursor. 2) I'd reserve beginWaitCursor()/endWaitCursor() for situations where the GUI is "busy" for a long while, e.g. when reading files. If you just want to change the cursor duing a grab, change the grab cursor using setDragCursor(), and it will be automatically used while the grab is in effect. 3) These are really "stock cursors" and they can be changed only BEFORE creating any widgets; when a widget is created, it gets its cursor from FXApp; you can use this to install your own custom cursor-theme if you need. It affects ALL widgets. Rather than changing FXApp's cursors, I recommend changing the cursor of a specific widget only, using setDefaultCursor() and setDragCursor(). 4) This is an FXRuby question for Lyle I think; I can only say that in FOX itself there's only 1 parameter, the cursor... Groeten, Jeroen -- +----------------------------------------------------------------------------+ | Copyright (C) 23:30 03/30/2006 Jeroen van der Zijp. All Rights Reserved. | +----------------------------------------------------------------------------+ From jeroen at fox-toolkit.org Thu Jul 13 10:44:40 2006 From: jeroen at fox-toolkit.org (Jeroen van der Zijp) Date: Thu, 13 Jul 2006 09:44:40 -0500 Subject: [fxruby-users] Questions on cursors In-Reply-To: <20060713135311.GC373@best.ms.philips.com> References: <20060713125508.GB373@best.ms.philips.com> <200607130815.07802.jeroen@fox-toolkit.org> <20060713135311.GC373@best.ms.philips.com> Message-ID: <200607130944.40378.jeroen@fox-toolkit.org> On Thursday 13 July 2006 08:53, Ronald Pijnacker wrote: > > On Thursday 13 July 2006 07:55, Ronald Pijnacker wrote: > > > Hi all, > > > > > > Recently I started using FXRuby (on windows) for a prototype > > > visualization package. > > > 'Til everything went nice and smooth. Thanks for a nice toolkit. > > > > > > One of the things I am trying to do is to map different mousebutton > > > combinations to different interactions. To give feedback, I would like > > > to update the cursor to indicate the interaction triggered. > > > > > > My approach was to enable the wait cursor when the mouse button was > > > pressed, and switch wait cursors for different combinations of mouse > > > buttons. To see which combination of mouse buttons is pressed, I use the > > > event.state property. > > > > > > Could you please answer some questions: > > > > > > 1. When I press left & middle inside the canvas, move the mouse outside > > > the fx-window and release both buttons, I get only one callback for > > > the RELEASE, eventhough I keep the canvas grabbed. Is this expected? > > > > > > 2. Is the beginWaitCursor / endWaitCursor / setWaitCursor the right > > > strategy? I've been playing around with setting the cursors, but I > > > get quite some crashes. > > > > > > 3. I've created a different default cursor, which I assign to the > > > DEF_ARROW_CURSOR. When I assign it to DEF_RARROW_CURSOR too, I get a > > > crash during exiting. Am I doing something wrong? > > > > > > 4. It seems defaultCursor= is an alias to setDefaultCursor. However, > > > this takes two parameters, which is kindof unexpected for a > > > set-property. Did I misunderstand the meaning of defaultCursor= ? > > > > > > Thanks for taking the time to answer my questions. > > > > > > Groeten/Regards, > > > > 1) If the first RELEASE causes the widget to ungrab(), the second > > RELEASE will go to the widget under the cursor. > > As stated, I do not ungrab until all mouse buttons are released. It > seems as if the ungrab does happen, though. > > > 2) I'd reserve beginWaitCursor()/endWaitCursor() for situations where > > the GUI is "busy" for a long while, e.g. when reading files. > > If you just want to change the cursor duing a grab, change the > > grab cursor using setDragCursor(), and it will be automatically > > used while the grab is in effect. > > I've tried this approach, however setting the default cursor or the drag > cursor on a FXGLCanvas consistently crashes the application. Probably, with the message: "Cursor has not been created yet." It is necessary to explicitly call create() on resources which didn't yet exist as part of the widget hierarchy at the time that create() was called on FXApp. > > 3) These are really "stock cursors" and they can be changed only BEFORE > > creating any widgets; when a widget is created, it gets its cursor > > from FXApp; you can use this to install your own custom cursor-theme > > if you need. It affects ALL widgets. > > That is what I intend to do: override the defaults for all the widgets. > I do this directly after creating the application and before creating > the main window (or any other widgets). In itself, it works fine, it is > just crashing the program on program exit. That only happens when I set > the same cursor for two different defaults, so my guess would be that > there is a double free/release executed somewhere. That would be my guess, yes. You'd need two instances of the same cursor in the case you want two originally different cursors to display the same glyph. > > Rather than changing FXApp's cursors, I recommend changing the cursor > > of a specific widget only, using setDefaultCursor() and setDragCursor(). > > > > 4) This is an FXRuby question for Lyle I think; I can only say that in FOX > > itself there's only 1 parameter, the cursor... > > You are right. I was looking at the setDefaultCursor for FXApp, which > has two parameters. > > Still do not know where all the crashes come from, though. Did you have > much success with setting non-stock cursors? It should work fine; just keep in mind that FXApp thinks it "owns" them and thus will try to manage the lifetime of these resources. They're normally not changed by applications, unless for the purpose of theming cursor collections, perhaps. Groeten, - Jeroen -- +----------------------------------------------------------------------------+ | Copyright (C) 23:30 03/30/2006 Jeroen van der Zijp. All Rights Reserved. | +----------------------------------------------------------------------------+ From AEtzold at gmx.de Fri Jul 14 04:43:38 2006 From: AEtzold at gmx.de (Axel Etzold) Date: Fri, 14 Jul 2006 10:43:38 +0200 Subject: [fxruby-users] Selected text background color in a combobox question Message-ID: <20060714084338.123430@gmx.net> Dear all, when I select an item from a combobox (and release it and 'leave' the combobox), the text in it gets marked by a background color. I would like to set this color to FXRGB(255,255,255). How do I do this ? Thank you very much for your help. Best regards, Axel Etzold -- "Feel free" ? 10 GB Mailbox, 100 FreeSMS/Monat ... Jetzt GMX TopMail testen: http://www.gmx.net/de/go/topmail From jeroen at fox-toolkit.org Fri Jul 14 09:08:35 2006 From: jeroen at fox-toolkit.org (Jeroen van der Zijp) Date: Fri, 14 Jul 2006 08:08:35 -0500 Subject: [fxruby-users] Selected text background color in a combobox question In-Reply-To: <20060714084338.123430@gmx.net> References: <20060714084338.123430@gmx.net> Message-ID: <200607140808.35345.jeroen@fox-toolkit.org> On Friday 14 July 2006 03:43, Axel Etzold wrote: > Dear all, > > when I select an item from a combobox (and release it and 'leave' the combobox), the text in it gets marked by a background color. > I would like to set this color to FXRGB(255,255,255). > How do I do this ? Don't use a FXComboBox if what you really need is a FXListBox. FXComboBox is in principle a widget that gives you a text string from a list of strings, with possible text-entry [non-static mode]. It shows the selected text because it actually has an embedded text field, and the text that you select is, well..., selected!! FXListBox is a widget that gives you a choice [0...N] from a list of labeled choices. It is often a better idea to use FXListBox since picking from a list of choices is far more common. Hope this helps, - Jeroen -- +----------------------------------------------------------------------------+ | Copyright (C) 23:30 03/30/2006 Jeroen van der Zijp. All Rights Reserved. | +----------------------------------------------------------------------------+ From AEtzold at gmx.de Fri Jul 14 11:33:08 2006 From: AEtzold at gmx.de (Axel Etzold) Date: Fri, 14 Jul 2006 17:33:08 +0200 Subject: [fxruby-users] Selected text background color in a combobox question In-Reply-To: <200607140808.35345.jeroen@fox-toolkit.org> References: <20060714084338.123430@gmx.net> <200607140808.35345.jeroen@fox-toolkit.org> Message-ID: <20060714153308.173410@gmx.net> Dear Jeroen, thank you for responding. Unfortunately, you did not answer to my question at all :( I know of both FXComboBox and FXlistBox. I am quite happy with FXComboBox now, and I would not be happier with an FXListBox with the problem I have. If you select an entry in an FXCombobox, and then leave that box, the text of the entry gets a greyish background color. As one then moves on to another FXcombobox (if there is one), and changes that one as well, this greyish background color of the text of the selection of the first FXCombobox disappears. Now I would like to have it disappear right away, because it looks ugly to have one greyish background color behind a text all the time, if you change something on the original configuration. I have tried to use setSetBackColor, setHiliteColor, setShadowColor on the FXTextField children of FXCombobox, but none worked. I suggest that it should be a standard behavior of FXListbox and FXCombobox that there is no background color of the text of the selected item, at least this color should disappear after the user "leaves" this widget. How do I achieve this behavior ? Thank you very much, Best regards, Axel Etzold -------- Original-Nachricht -------- Datum: Fri, 14 Jul 2006 08:08:35 -0500 Von: Jeroen van der Zijp An: fxruby-users at rubyforge.org Betreff: Re: [fxruby-users] Selected text background color in a combobox question > On Friday 14 July 2006 03:43, Axel Etzold wrote: > > Dear all, > > > > when I select an item from a combobox (and release it and 'leave' the > combobox), the text in it gets marked by a background color. > > I would like to set this color to FXRGB(255,255,255). > > How do I do this ? > > Don't use a FXComboBox if what you really need is a FXListBox. FXComboBox > is in principle a widget that gives you a text string from a list of > strings, > with possible text-entry [non-static mode]. It shows the selected text > because it actually has an embedded text field, and the text that you > select > is, well..., selected!! > > FXListBox is a widget that gives you a choice [0...N] from a list of > labeled > choices. It is often a better idea to use FXListBox since picking from a > list of choices is far more common. > > > Hope this helps, > > > - Jeroen > > -- > +----------------------------------------------------------------------------+ > | Copyright (C) 23:30 03/30/2006 Jeroen van der Zijp. All Rights > Reserved. | > +----------------------------------------------------------------------------+ > _______________________________________________ > fxruby-users mailing list > fxruby-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/fxruby-users -- "Feel free" ? 10 GB Mailbox, 100 FreeSMS/Monat ... Jetzt GMX TopMail testen: http://www.gmx.net/de/go/topmail From jeroen at fox-toolkit.org Fri Jul 14 12:00:37 2006 From: jeroen at fox-toolkit.org (Jeroen van der Zijp) Date: Fri, 14 Jul 2006 11:00:37 -0500 Subject: [fxruby-users] =?utf-8?q?Selected_text_background_color_in_a_comb?= =?utf-8?q?obox=09question?= In-Reply-To: <20060714153308.173410@gmx.net> References: <20060714084338.123430@gmx.net> <200607140808.35345.jeroen@fox-toolkit.org> <20060714153308.173410@gmx.net> Message-ID: <200607141100.37270.jeroen@fox-toolkit.org> On Friday 14 July 2006 10:33, Axel Etzold wrote: > Dear Jeroen, > > thank you for responding. Unfortunately, you did not > answer to my question at all :( Well, I was basically explaing that that's how I think the combobox should behave... > I know of both FXComboBox and FXlistBox. > I am quite happy with FXComboBox now, and I would not > be happier with an FXListBox with the problem I have. > > If you select an entry in an FXCombobox, and then leave > that box, the text of the entry gets a greyish background > color. > As one then moves on to another FXcombobox (if there > is one), and changes that one as well, this greyish background > color of the text of the selection of the first FXCombobox disappears. > > Now I would like to have it disappear right away, because it > looks ugly to have one greyish background color behind a text > all the time, if you change something on the original configuration. > > I have tried to use setSetBackColor, setHiliteColor, setShadowColor > on the FXTextField children of FXCombobox, but none worked. > > > > I suggest that it should be a standard behavior of FXListbox and > FXCombobox that there is no background color of the text of the > selected item, at least this color should disappear after the user > "leaves" this widget. > > How do I achieve this behavior ? The simplest way is to set the text: combo->setText(combo->getText()); I believe that should do it. Of course, if anything else gets selected, the text field will lose the selection as well. - Jeroen -- +----------------------------------------------------------------------------+ | Copyright (C) 23:30 03/30/2006 Jeroen van der Zijp. All Rights Reserved. | +----------------------------------------------------------------------------+ From pijnacker at dse.nl Fri Jul 14 14:18:35 2006 From: pijnacker at dse.nl (Ronald Pijnacker) Date: Fri, 14 Jul 2006 20:18:35 +0200 Subject: [fxruby-users] Questions on cursors In-Reply-To: <200607130944.40378.jeroen@fox-toolkit.org> References: <20060713125508.GB373@best.ms.philips.com> <200607130815.07802.jeroen@fox-toolkit.org> <20060713135311.GC373@best.ms.philips.com> <200607130944.40378.jeroen@fox-toolkit.org> Message-ID: <20060714181835.GA3228@dse.nl> > > I've tried this approach, however setting the default cursor or the drag > > cursor on a FXGLCanvas consistently crashes the application. > > Probably, with the message: > > "Cursor has not been created yet." > > It is necessary to explicitly call create() on resources which didn't > yet exist as part of the widget hierarchy at the time that create() was > called on FXApp. You're right on the spot! Great. I did not see that message, though. > > > 3) These are really "stock cursors" and they can be changed only BEFORE > > > creating any widgets; when a widget is created, it gets its cursor > > > from FXApp; you can use this to install your own custom cursor-theme > > > if you need. It affects ALL widgets. > > > > That is what I intend to do: override the defaults for all the widgets. > > I do this directly after creating the application and before creating > > the main window (or any other widgets). In itself, it works fine, it is > > just crashing the program on program exit. That only happens when I set > > the same cursor for two different defaults, so my guess would be that > > there is a double free/release executed somewhere. > > That would be my guess, yes. You'd need two instances of the same cursor > in the case you want two originally different cursors to display the same > glyph. Somehow, FXCursor.dup does not seem to work. Can I copy the cursor somehow (except for the perfectly obvious choice). > > > Rather than changing FXApp's cursors, I recommend changing the cursor > > > of a specific widget only, using setDefaultCursor() and setDragCursor(). > > > > > > 4) This is an FXRuby question for Lyle I think; I can only say that in FOX > > > itself there's only 1 parameter, the cursor... > > > > You are right. I was looking at the setDefaultCursor for FXApp, which > > has two parameters. > > > > Still do not know where all the crashes come from, though. Did you have > > much success with setting non-stock cursors? > > It should work fine; just keep in mind that FXApp thinks it "owns" them > and thus will try to manage the lifetime of these resources. They're > normally not changed by applications, unless for the purpose of theming > cursor collections, perhaps. That is sort-of what I am trying to do. With the .create() in place it works like a charm. Thanks for the tip. The only problem left is that of the missing mouse-up events. But I think I can work around that. Groeten, Ronald From alexjede at gmx.de Sat Jul 15 12:15:41 2006 From: alexjede at gmx.de (Alexander Jede) Date: Sat, 15 Jul 2006 18:15:41 +0200 Subject: [fxruby-users] Destroing an FXWindow ? Message-ID: <44B914AD.5060202@gmx.de> Hi list I have build a small application, like it is shown in the header.rb example. But I want do change the amount of the child of the FXHorizontalFrame. This child are FXList's. I want to remove some of this list while the program is running. That for I iterate through the FXHorizontalFrame and calls .destroy for each one. Look at the function : clearAll But it seems not working. Can any one of you say me the best way of solving my problem? Alexander code: ---- class HeaderList < FXScrollWindow attr_reader :colors, :lists, :header def initialize(parent, opts=0, x=0, y=0, width=0, height=0)#, padLeft=DEFAULT_SPACING, padRight=DEFAULT_SPACING, padTop=DEFAULT_SPACING, padBottom=DEFAULT_SPACING, hSpacing=DEFAULT_SPACING, vSpacing=DEFAULT_SPACING) super(parent,opts|SCROLLERS_NORMAL,x,y,width,height)#,padLeft,padRight,padTop,padBottom,hSpacing,vSpacing) @lists = [] @packer=FXPacker.new(self,LAYOUT_FILL_X|LAYOUT_FILL_Y,0,0,0,0, 0,0,0,0, 0,0) @header = FXHeader.new(@packer,nil,0,HEADER_RESIZE) @header.connect(SEL_CHANGED) { |sender, sel, which| @lists[which].width = @header.getItemSize(which) } @content = FXHorizontalFrame.new(@packer, LAYOUT_FILL_X|LAYOUT_FILL_Y,0,0,0,0, 0,0,0,0, 0,0) @colors=[FXRGB(255,240,240),FXRGB(240,255,240),FXRGB(240, 240, 255)] @actC = 0 end def addRow(text,icon=nil,size=0,data=nil,notify=false) item = FXHeaderItem.new(text,icon,size,data) @header.appendItem(item,notify) (size == 0)? (siz = item.getWidth(@header)) : (siz = size) list = FXList.new(@content,nil,0, LAYOUT_FILL_Y|LAYOUT_FIX_WIDTH,0,0,siz,0) list.backColor = @colors[@actC] @actC = (@actC+1)%@colors.length() @lists.push(list) end def appendItemTo(index,text,icon=nil,data=nil,notify=false) @lists[index].appendItem(text,icon,data,notify) end def clearAll() @header.clearItems() @lists.clear() @content.each_child{|list| list.destroy } #@content.destroy puts @content.numChildren end end From lyle at knology.net Fri Jul 21 23:05:04 2006 From: lyle at knology.net (Lyle Johnson) Date: Fri, 21 Jul 2006 22:05:04 -0500 Subject: [fxruby-users] [ANN] FXRuby 1.6.1 Now Available Message-ID: -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 All, FXRuby version 1.6.1 is now available for download from this page: http://rubyforge.org/frs/?group_id=300&release_id=6135 Note that you should be using FOX 1.6.5 or later due to some important changes made in that release of FOX. Also note that due to a bug in RubyGems 0.9.0, building from the source gem isn't advised unless you're able to download to an earlier version of RubyGems. (This bug doesn't affect binary gems.) For a summary of the changes in this release of FXRuby, please see this page: http://www.fxruby.org/doc/changes.html As usual, the code is provided as a Win32 installer or a binary Gem (both compatible with the latest One-Click Installer for Ruby 1.8.4), 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 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.3 (Darwin) iD8DBQFEwZXhFXV/hD6oMd0RAuz3AJ9th77p/b+x1aZDkmFGkTgV3OiqFACgoHBO dLVuC4v23NKTk5RJRllkh4M= =hsR7 -----END PGP SIGNATURE----- From dylanb at digitalvalence.com Sat Jul 22 16:26:31 2006 From: dylanb at digitalvalence.com (Dylan Bruzenak) Date: Sat, 22 Jul 2006 15:26:31 -0500 Subject: [fxruby-users] [ANN] FXRuby 1.6.1 Now Available In-Reply-To: References: Message-ID: <44C289F7.6080100@digitalvalence.com> Lyle, It doesn't look like the change list has been updated. > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > All, > > FXRuby version 1.6.1 is now available for download from this page: > > http://rubyforge.org/frs/?group_id=300&release_id=6135 > > Note that you should be using FOX 1.6.5 or later due to some > important changes made in that release of FOX. Also note that due to > a bug in RubyGems 0.9.0, building from the source gem isn't advised > unless you're able to download to an earlier version of RubyGems. > (This bug doesn't affect binary gems.) > > For a summary of the changes in this release of FXRuby, please see > this page: > > http://www.fxruby.org/doc/changes.html > > As usual, the code is provided as a Win32 installer or a binary Gem > (both compatible with the latest One-Click Installer for Ruby 1.8.4), > 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 > > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.4.3 (Darwin) > > iD8DBQFEwZXhFXV/hD6oMd0RAuz3AJ9th77p/b+x1aZDkmFGkTgV3OiqFACgoHBO > dLVuC4v23NKTk5RJRllkh4M= > =hsR7 > -----END PGP SIGNATURE----- > _______________________________________________ > fxruby-users mailing list > fxruby-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/fxruby-users > > From lyle at knology.net Mon Jul 24 11:49:28 2006 From: lyle at knology.net (Lyle Johnson) Date: Mon, 24 Jul 2006 10:49:28 -0500 Subject: [fxruby-users] [ANN] FXRuby 1.6.1 Now Available In-Reply-To: <44C289F7.6080100@digitalvalence.com> References: <44C289F7.6080100@digitalvalence.com> Message-ID: <96E7E3AF-D5A0-4927-A102-B3243297214A@knology.net> On Jul 22, 2006, at 3:26 PM, Dylan Bruzenak wrote: > It doesn't look like the change list has been updated. Whoops. Thanks, it's been fixed now (for the online version, anyways).