From Laurent.Julliard at xrce.xerox.com Wed Dec 1 11:52:59 2004 From: Laurent.Julliard at xrce.xerox.com (Laurent Julliard) Date: Wed Dec 1 11:52:06 2004 Subject: [fxruby-users] Input Messages not working with FXRuby 1.2.2? Message-ID: <41ADF6EB.5060102@xrce.xerox.com> I have just installed FXRuby 1.2.2 and FOX 1.2.11 to migrate our FreeRIDE project and I have troubles with input channels. I have tried to run the inputs.rb exmaple in the FXRuby code and as soon as I type a command and run it, inputs.rb starts eating all the CPU. (Running on Linux) I'd like to know if any of you managed to get FOX input messages working with FXRuby 1.2.x (Note: if you run the inputs.rb sample make sure you change SELTYPE with FXSELTYPE on line 56 Thanks -- Laurent JULLIARD Xerox Global Services Manager, Smart Document Engineering Tel: +33 (0)4 76 61 50 48 Fax: +33 (0)4 76 61 51 99 From bdezonia at wisc.edu Wed Dec 1 17:02:34 2004 From: bdezonia at wisc.edu (Barry DeZonia) Date: Wed Dec 1 17:01:55 2004 Subject: [fxruby-users] Status of older issue Message-ID: <004201c4d7f1$766112e0$b0c65c90@forecol.wisc.edu> Some time ago it was reported that UI performance (update of changed controls) of multithreaded applications in FXRuby 1.2 was poor (perhaps due to some FOX 1.2 issues). I haven't heard anything about it recently on this list and checking the Bugs and Feature Requests on the RubyForge Tracker did not show the issue entered as either. Is this still a problem? From lyle at knology.net Wed Dec 1 17:17:19 2004 From: lyle at knology.net (lyle@knology.net) Date: Wed Dec 1 17:18:58 2004 Subject: [fxruby-users] Status of older issue In-Reply-To: <> References: <> Message-ID: <20041201221719.15200.qmail@webmail2.knology.net> On Wed, 01 Dec 2004 16:02:34 -0600, Barry DeZonia wrote : > Some time ago it was reported that UI performance (update of changed > controls) of multithreaded applications in FXRuby 1.2 was poor (perhaps due > to some FOX 1.2 issues). I haven't heard anything about it recently on this > list and checking the Bugs and Feature Requests on the RubyForge Tracker did > not show the issue entered as either. Is this still a problem? I don't remember the specific report that you're referring to, but then again, I don't remember a lot of things. Since (as you noted) no one found it important enough to add to the bug list, it's definitely not something I've looked into. Is it that you've noted a performance *decrease* between FXRuby versions 1.0 and 1.2, or are you just noting generally poor performance in FXRuby 1.2? It is definitely true that, since Ruby doesn't use "native" threads, the overhead required for multithreaded FXRuby applications is sometimes distracting. One parameter that you can fiddle around with is the "sleepTime" attribute for the FXApp instance; this is the amount of time (in milliseconds) that the FOX event loop will yield to Ruby's thread scheduler whenever there's idle time in the GUI. It defaults (IIRC) to 100 milliseconds, but if you were to decrease this time (thus allocating *less* time to other Ruby threads) you should expect to see improved response for GUI updates. At least, that's the idea. ;) Hope this helps, Lyle From vjoel at PATH.Berkeley.EDU Sun Dec 5 18:36:44 2004 From: vjoel at PATH.Berkeley.EDU (Joel VanderWerf) Date: Sun Dec 5 18:35:55 2004 Subject: [fxruby-users] undefined symbol Message-ID: <41B39B8C.5020109@path.berkeley.edu> Ok, the latest snapshots of ruby have fixed the st.h prototypes so that FXRuby-1.2.2 builds. But now I've got a new (actaully, old) problem. $ ruby styledtext.rb /usr/local/lib/ruby/site_ruby/1.8/i686-linux/fox12.so: /usr/local/lib/ruby/site_ruby/1.8/i686-linux/fox12.so: undefined symbol: _ZN8FXWindow10stringTypeE - /usr/local/lib/ruby/site_ruby/1.8/i686-linux/fox12.so (LoadError) from styledtext.rb:3 These are fresh builds of FXRuby-1.2.2 and fox-1.2.11 on linux using gcc 3.2.2, ruby 1.8.2 (2004-11-18) [i686-linux]. I've had this problem before with new versions of Fox/FXRuby, but was never able to fix it. Here's some more information: $ ldd /usr/local/lib/ruby/site_ruby/1.8/i686-linux/fox12.so libFOX-1.2.so.0 => /usr/local/lib/libFOX-1.2.so.0 (0x4066d000) .... $ nm /usr/local/lib/libFOX-1.2.so.0 | grep stringType 0029eb94 R _ZN2FX8FXWindow10stringTypeE So it appears that maybe symbol mangling is working differently between fox and fxruby? _ZN8FXWindow10stringTypeE is what FXRuby is looking for. _ZN2FX8FXWindow10stringTypeE is what Fox has generated. I know little about C++ symbols but it looks like the latter symbol is in the FX namespace, but the former is not. Any suggestions? From jeroen at fox-toolkit.org Sun Dec 5 08:20:34 2004 From: jeroen at fox-toolkit.org (Jeroen van der Zijp) Date: Mon Dec 6 08:18:33 2004 Subject: [fxruby-users] undefined symbol In-Reply-To: <41B39B8C.5020109@path.berkeley.edu> References: <41B39B8C.5020109@path.berkeley.edu> Message-ID: <200412050720.34679.jeroen@fox-toolkit.org> On Sunday 05 December 2004 05:36 pm, Joel VanderWerf wrote: > > Ok, the latest snapshots of ruby have fixed the st.h prototypes so that > FXRuby-1.2.2 builds. But now I've got a new (actaully, old) problem. > > $ ruby styledtext.rb > /usr/local/lib/ruby/site_ruby/1.8/i686-linux/fox12.so: > /usr/local/lib/ruby/site_ruby/1.8/i686-linux/fox12.so: undefined symbol: > _ZN8FXWindow10stringTypeE - > /usr/local/lib/ruby/site_ruby/1.8/i686-linux/fox12.so (LoadError) > from styledtext.rb:3 > > These are fresh builds of FXRuby-1.2.2 and fox-1.2.11 on linux using gcc > 3.2.2, ruby 1.8.2 (2004-11-18) [i686-linux]. > > > I've had this problem before with new versions of Fox/FXRuby, but was > never able to fix it. Here's some more information: > > $ ldd /usr/local/lib/ruby/site_ruby/1.8/i686-linux/fox12.so > libFOX-1.2.so.0 => /usr/local/lib/libFOX-1.2.so.0 (0x4066d000) > .... > > $ nm /usr/local/lib/libFOX-1.2.so.0 | grep stringType > 0029eb94 R _ZN2FX8FXWindow10stringTypeE > > > So it appears that maybe symbol mangling is working differently between > fox and fxruby? > > _ZN8FXWindow10stringTypeE is what FXRuby is looking for. > > _ZN2FX8FXWindow10stringTypeE is what Fox has generated. > > I know little about C++ symbols but it looks like the latter symbol is > in the FX namespace, but the former is not. > > Any suggestions? I think Lyle may know more about FXRuby, but to me it looks like a namespace issue. FOX 1.0 didn't support namespaces, but in FOX 1.2, all symbols are in the FX namespace. Is it possible you have both the 1.0 and the 1.2 headers installed? - Jeroen From vjoel at PATH.Berkeley.EDU Mon Dec 6 13:27:07 2004 From: vjoel at PATH.Berkeley.EDU (Joel VanderWerf) Date: Mon Dec 6 13:26:44 2004 Subject: [fxruby-users] undefined symbol In-Reply-To: <200412050720.34679.jeroen@fox-toolkit.org> References: <41B39B8C.5020109@path.berkeley.edu> <200412050720.34679.jeroen@fox-toolkit.org> Message-ID: <41B4A47B.9040900@path.berkeley.edu> Jeroen van der Zijp wrote: > On Sunday 05 December 2004 05:36 pm, Joel VanderWerf wrote: > >>Ok, the latest snapshots of ruby have fixed the st.h prototypes so that >>FXRuby-1.2.2 builds. But now I've got a new (actaully, old) problem. >> >>$ ruby styledtext.rb >>/usr/local/lib/ruby/site_ruby/1.8/i686-linux/fox12.so: >>/usr/local/lib/ruby/site_ruby/1.8/i686-linux/fox12.so: undefined symbol: >>_ZN8FXWindow10stringTypeE - >>/usr/local/lib/ruby/site_ruby/1.8/i686-linux/fox12.so (LoadError) >> from styledtext.rb:3 >> >>These are fresh builds of FXRuby-1.2.2 and fox-1.2.11 on linux using gcc >>3.2.2, ruby 1.8.2 (2004-11-18) [i686-linux]. >> >> >>I've had this problem before with new versions of Fox/FXRuby, but was >>never able to fix it. Here's some more information: >> >>$ ldd /usr/local/lib/ruby/site_ruby/1.8/i686-linux/fox12.so >> libFOX-1.2.so.0 => /usr/local/lib/libFOX-1.2.so.0 (0x4066d000) >> .... >> >>$ nm /usr/local/lib/libFOX-1.2.so.0 | grep stringType >>0029eb94 R _ZN2FX8FXWindow10stringTypeE >> >> >>So it appears that maybe symbol mangling is working differently between >>fox and fxruby? >> >> _ZN8FXWindow10stringTypeE is what FXRuby is looking for. >> >> _ZN2FX8FXWindow10stringTypeE is what Fox has generated. >> >>I know little about C++ symbols but it looks like the latter symbol is >>in the FX namespace, but the former is not. >> >>Any suggestions? > > > I think Lyle may know more about FXRuby, but to me it looks like a namespace > issue. FOX 1.0 didn't support namespaces, but in FOX 1.2, all symbols are > in the FX namespace. > > Is it possible you have both the 1.0 and the 1.2 headers installed? I do have both sets of headers installed. (But why should this be a problem? FXRuby-1.2 should look in fox-1.2, right?) Anyway, the 1.0 headers were in /usr/local/include/fox. The 1.2 headers are in /usr/local/include/fox-1.2. They don't appear to be anywhere else. I tried renaming /usr/local/include/fox to /usr/local/include/fox-1.0. Then I started from scratch with FXRuby-1.2.2, and rebuilt and installed as usual. Same problem: $ ruby table.rb /usr/local/lib/ruby/site_ruby/1.8/i686-linux/fox12.so: /usr/local/lib/ruby/site_ruby/1.8/i686-linux/fox12.so: undefined symbol: _ZN8FXWindow10stringTypeE - /usr/local/lib/ruby/site_ruby/1.8/i686-linux/fox12.so (LoadError) from table.rb:3 Maybe I should just clean every fox-related file from my system and truly start from scratch. From jeroen at fox-toolkit.org Sun Dec 5 18:16:52 2004 From: jeroen at fox-toolkit.org (Jeroen van der Zijp) Date: Mon Dec 6 18:14:01 2004 Subject: [fxruby-users] undefined symbol In-Reply-To: <41B4A47B.9040900@path.berkeley.edu> References: <41B39B8C.5020109@path.berkeley.edu> <200412050720.34679.jeroen@fox-toolkit.org> <41B4A47B.9040900@path.berkeley.edu> Message-ID: <200412051716.52526.jeroen@fox-toolkit.org> On Monday 06 December 2004 12:27 pm, you wrote: > Jeroen van der Zijp wrote: > > On Sunday 05 December 2004 05:36 pm, Joel VanderWerf wrote: > > > >>Ok, the latest snapshots of ruby have fixed the st.h prototypes so that > >>FXRuby-1.2.2 builds. But now I've got a new (actaully, old) problem. > >> > >>$ ruby styledtext.rb > >>/usr/local/lib/ruby/site_ruby/1.8/i686-linux/fox12.so: > >>/usr/local/lib/ruby/site_ruby/1.8/i686-linux/fox12.so: undefined symbol: > >>_ZN8FXWindow10stringTypeE - > >>/usr/local/lib/ruby/site_ruby/1.8/i686-linux/fox12.so (LoadError) > >> from styledtext.rb:3 > >> > >>These are fresh builds of FXRuby-1.2.2 and fox-1.2.11 on linux using gcc > >>3.2.2, ruby 1.8.2 (2004-11-18) [i686-linux]. > >> > >> > >>I've had this problem before with new versions of Fox/FXRuby, but was > >>never able to fix it. Here's some more information: > >> > >>$ ldd /usr/local/lib/ruby/site_ruby/1.8/i686-linux/fox12.so > >> libFOX-1.2.so.0 => /usr/local/lib/libFOX-1.2.so.0 (0x4066d000) > >> .... > >> > >>$ nm /usr/local/lib/libFOX-1.2.so.0 | grep stringType > >>0029eb94 R _ZN2FX8FXWindow10stringTypeE > >> > >> > >>So it appears that maybe symbol mangling is working differently between > >>fox and fxruby? > >> > >> _ZN8FXWindow10stringTypeE is what FXRuby is looking for. > >> > >> _ZN2FX8FXWindow10stringTypeE is what Fox has generated. > >> > >>I know little about C++ symbols but it looks like the latter symbol is > >>in the FX namespace, but the former is not. > >> > >>Any suggestions? > > > > > > I think Lyle may know more about FXRuby, but to me it looks like a namespace > > issue. FOX 1.0 didn't support namespaces, but in FOX 1.2, all symbols are > > in the FX namespace. > > > > Is it possible you have both the 1.0 and the 1.2 headers installed? > > I do have both sets of headers installed. (But why should this be a > problem? FXRuby-1.2 should look in fox-1.2, right?) > > Anyway, the 1.0 headers were in /usr/local/include/fox. The 1.2 headers > are in /usr/local/include/fox-1.2. They don't appear to be anywhere else. > > I tried renaming /usr/local/include/fox to /usr/local/include/fox-1.0. > Then I started from scratch with FXRuby-1.2.2, and rebuilt and installed > as usual. Same problem: > > $ ruby table.rb > /usr/local/lib/ruby/site_ruby/1.8/i686-linux/fox12.so: > /usr/local/lib/ruby/site_ruby/1.8/i686-linux/fox12.so: undefined symbol: > _ZN8FXWindow10stringTypeE - > /usr/local/lib/ruby/site_ruby/1.8/i686-linux/fox12.so (LoadError) > from table.rb:3 > > Maybe I should just clean every fox-related file from my system and > truly start from scratch. Or at least make sure the 1.0 headers aren't found by accident, yes! - Jeroen From hal9000 at hypermetrics.com Mon Dec 6 19:31:22 2004 From: hal9000 at hypermetrics.com (Hal Fulton) Date: Mon Dec 6 19:30:28 2004 Subject: [fxruby-users] undefined symbol In-Reply-To: <41B4A47B.9040900@path.berkeley.edu> References: <41B39B8C.5020109@path.berkeley.edu> <200412050720.34679.jeroen@fox-toolkit.org> <41B4A47B.9040900@path.berkeley.edu> Message-ID: <41B4F9DA.2090500@hypermetrics.com> Joel VanderWerf wrote: >> >> Is it possible you have both the 1.0 and the 1.2 headers installed? > > > I do have both sets of headers installed. (But why should this be a > problem? FXRuby-1.2 should look in fox-1.2, right?) I think this has to do with FXScintilla -- I had to build it with a flag like --with-fox-1-2 or some such. Search back 2-3 weeks on this list. Hal From lyle at knology.net Mon Dec 6 20:36:09 2004 From: lyle at knology.net (Lyle Johnson) Date: Mon Dec 6 20:35:05 2004 Subject: [fxruby-users] undefined symbol In-Reply-To: <41B39B8C.5020109@path.berkeley.edu> References: <41B39B8C.5020109@path.berkeley.edu> Message-ID: <5EAC861A-47F0-11D9-840E-000A958408D2@knology.net> On Dec 5, 2004, at 5:36 PM, Joel VanderWerf wrote: > Ok, the latest snapshots of ruby have fixed the st.h prototypes so > that FXRuby-1.2.2 builds. But now I've got a new (actaully, old) > problem. We were out of town this weekend and so I'm just catching up, but I suspect Hal's on the right track. When FOX got bumped up to 1.2, the actual name of the library changed from "libFOX" to "libFOX-1.2", and as Martha would say, that was a good thing. Unfortunately, there's no standard way to distinguish between an FXScintilla library built against FOX 1.0 and one built against FOX 1.2: they both will be named "libfxscintilla". Yes, this is a problem. No, I haven't consulted with Gilles to see what we should do about it (other than rebuild FXScintilla against FOX 1.2). From hal9000 at hypermetrics.com Thu Dec 9 21:47:49 2004 From: hal9000 at hypermetrics.com (Hal Fulton) Date: Thu Dec 9 21:46:44 2004 Subject: [fxruby-users] 1.2 segfault Message-ID: <41B90E55.4050103@hypermetrics.com> Lyle... Don't forget that crash I'm seeing. Not trying to rush you, as I know fxruby is a labor of love and quite unpaid... Just want to make sure it's on your list somewhere. :) Cheers, Hal From lyle at knology.net Fri Dec 10 08:12:49 2004 From: lyle at knology.net (Lyle Johnson) Date: Fri Dec 10 08:11:31 2004 Subject: [fxruby-users] 1.2 segfault In-Reply-To: <41B90E55.4050103@hypermetrics.com> References: <41B90E55.4050103@hypermetrics.com> Message-ID: <30ADCD43-4AAD-11D9-9FD6-000A958408D2@knology.net> On Dec 9, 2004, at 8:47 PM, Hal Fulton wrote: > Don't forget that crash I'm seeing... OK, a preliminary question... I've downloaded the tycho-0.0.7 release from RubyForge and see that the very first line of the main program (tycho.rb) is: require 'fox' which is going to try to load your FXRuby 1.0 installation, not an FXRuby 1.2 installation. Is that what you intended? If not, and you're trying to "port" Tycho to the FXRuby 1.2 API, the first step is going to be to change that to: require 'fox12' but then there will be a number of other changes (i.e. to reflect the API changes between FXRuby 1.0 and FXRuby 1.2). That is to say, programs written for FXRuby 1.2 are not backwards-compatible with those written for FXRuby 1.2. From hal9000 at hypermetrics.com Sat Dec 11 00:45:14 2004 From: hal9000 at hypermetrics.com (Hal Fulton) Date: Sat Dec 11 00:44:06 2004 Subject: [fxruby-users] 1.2 segfault In-Reply-To: <30ADCD43-4AAD-11D9-9FD6-000A958408D2@knology.net> References: <41B90E55.4050103@hypermetrics.com> <30ADCD43-4AAD-11D9-9FD6-000A958408D2@knology.net> Message-ID: <41BA896A.10804@hypermetrics.com> Lyle Johnson wrote: > which is going to try to load your FXRuby 1.0 installation, not an > FXRuby 1.2 installation. Is that what you intended? If not, and you're > trying to "port" Tycho to the FXRuby 1.2 API, the first step is going to > be to change that to: > > require 'fox12' OK, in my own code, I did change that. It's just not changed on rubyforge. > but then there will be a number of other changes (i.e. to reflect the > API changes between FXRuby 1.0 and FXRuby 1.2). That is to say, programs > written for FXRuby 1.2 are not backwards-compatible with those written > for FXRuby 1.2. Obviously I need to RTFM, because I didn't know there was a backwards- compatibility issue. However, even so, doesn't it fail awfully quickly?? On the create of the main window? I'll do some reading... Thanks, Hal From lyle at knology.net Sat Dec 11 09:42:04 2004 From: lyle at knology.net (Lyle Johnson) Date: Sat Dec 11 09:40:44 2004 Subject: [fxruby-users] 1.2 segfault In-Reply-To: <41BA896A.10804@hypermetrics.com> References: <41B90E55.4050103@hypermetrics.com> <30ADCD43-4AAD-11D9-9FD6-000A958408D2@knology.net> <41BA896A.10804@hypermetrics.com> Message-ID: On Dec 10, 2004, at 11:45 PM, Hal Fulton wrote: > Obviously I need to RTFM, because I didn't know there was a backwards- > compatibility issue. Take a look at the release notes for the very first release (which was numbered 1.2a1), found here: http://www.fxruby.org/1.2/doc/changes.html and there's a link to a "What's New" document that covers most of the changes between FOX 1.0 and 1.2. > However, even so, doesn't it fail awfully quickly?? On the create of > the main window? Well, keep in mind that when you call create() on the main window it recursively works its way down through all of the main window's child windows, and their child windows, and so on, calling create(). So it's not (necessarily) something wrong the main window itself, but perhaps one of the widgets it contains. > I'll do some reading... OK. From laurent at moldus.org Sun Dec 12 13:16:49 2004 From: laurent at moldus.org (Laurent Julliard) Date: Sun Dec 12 13:15:35 2004 Subject: [fxruby-users] 1.2 segfault In-Reply-To: References: <41B90E55.4050103@hypermetrics.com> <30ADCD43-4AAD-11D9-9FD6-000A958408D2@knology.net> <41BA896A.10804@hypermetrics.com> Message-ID: <41BC8B11.1000600@moldus.org> Lyle, I just wanted to take advantage of Hal's mail to report that since I have migrated FreeRIDE to FOX/FXRuby 1.2.x I, from time to time, experience SEGFAULT as well in the create of the FreeRIDE main window. I haven't been able to track it down to the widget that is causing the problem, plus it happens only in some occasion... Shall I use gdb to trace the problem in the FOX code, any other advice to collect useful informationon to track the problem? Laurent -- Laurent JULLIARD http://www.moldus.org/~laurent From lyle at knology.net Sun Dec 12 15:10:05 2004 From: lyle at knology.net (Lyle Johnson) Date: Sun Dec 12 15:38:53 2004 Subject: [fxruby-users] 1.2 segfault In-Reply-To: <41BC8B11.1000600@moldus.org> References: <41B90E55.4050103@hypermetrics.com> <30ADCD43-4AAD-11D9-9FD6-000A958408D2@knology.net> <41BA896A.10804@hypermetrics.com> <41BC8B11.1000600@moldus.org> Message-ID: On Dec 12, 2004, at 12:16 PM, Laurent Julliard wrote: > Lyle, > > I just wanted to take advantage of Hal's mail to report that since I > have migrated FreeRIDE to FOX/FXRuby 1.2.x I, from time to time, > experience SEGFAULT as well in the create of the FreeRIDE main window. > I haven't been able to track it down to the widget that is causing the > problem, plus it happens only in some occasion... > > Shall I use gdb to trace the problem in the FOX code, any other advice > to collect useful informationon to track the problem? No, I imagine that using gdb is probably the most direct way to find out what's causing the crash. Let me know what you find... From vjoel at PATH.Berkeley.EDU Wed Dec 15 04:23:13 2004 From: vjoel at PATH.Berkeley.EDU (Joel VanderWerf) Date: Wed Dec 15 04:22:03 2004 Subject: [fxruby-users] non-modal dialogs Message-ID: <41C00281.6060902@path.berkeley.edu> I had to convert some modal dialogs to non-modal, and I abstracted out some of what I was doing. The result is a mixin that uses closures to make non-modal dialogs almost as easy to implement as modal ones. It's going into the next release of FoxTails, but since it stands alone and is quite simple, I'm submitting it here. Hope it helps someone. The key to using this mixin is in the initialization of the main window: nonModalButton.connect(SEL_COMMAND) do @dialog.execute_nonmodal do |accepted| @label.text = accepted ? "Dialog accepted" : "Dialog cancelled" end end The code block is saved away and called later when the dialog is exited. But since it's closure, you can operate on local vars, etc. to apply the result of the dialog. Normally, the way non-modal dialogs interact with their callers is much more awkward than in the modal case, AFAICT. -------------- next part -------------- require 'fox' require 'fox/responder' include Fox module FoxTails # Module to include in FXDialogBox to provide an easy nonmodal version # of execute. module FTNonModal include Responder def initialize(*args) super if defined?(super) FXMAPFUNC(SEL_COMMAND, FXDialogBox::ID_CANCEL, :onCmdCancel) FXMAPFUNC(SEL_COMMAND, FXDialogBox::ID_ACCEPT, :onCmdAccept) end # Creates and shows the dialog, and registers the associated block to be # called when the dialog is closed. The block is passed a boolean argument # which is true if and only if the dialog was accepted. def execute_nonmodal(placement = PLACEMENT_CURSOR, &block) @__FTNonModal_block = block create show placement end def onCmdCancel(*args) # :nodoc: on_nonmodal_close(false) end def onCmdAccept(*args) # :nodoc: on_nonmodal_close(true) end # Called when dialog is closed, with _accepted_ equal to true if and only if # the user accepted the dialog. def on_nonmodal_close(accepted) @__FTNonModal_block[accepted] ##return 0 -- why isn't this enough to close window? ## oh well, let's immitate FXTopWindow: getApp().stopModal(self, accepted ? 1 : 0) hide() end end end class TestDialog < FXDialogBox include FoxTails::FTNonModal def initialize(*args) super buttons = FXHorizontalFrame.new(self, LAYOUT_SIDE_BOTTOM|FRAME_NONE|LAYOUT_FILL_X|PACK_UNIFORM_WIDTH) FXButton.new(buttons, "&Accept", nil, self, ID_ACCEPT, FRAME_RAISED|FRAME_THICK|LAYOUT_RIGHT|LAYOUT_CENTER_Y) FXButton.new(buttons, "&Cancel", nil, self, ID_CANCEL, FRAME_RAISED|FRAME_THICK|LAYOUT_RIGHT|LAYOUT_CENTER_Y) end end class MainWindow < FXMainWindow def initialize(app) super(app, "NonModal test", nil, nil, DECOR_ALL) frame = FXHorizontalFrame.new(self) nonModalButton = FXButton.new(frame, "&Non-Modal Dialog...", nil, nil, 0, FRAME_RAISED|FRAME_THICK|LAYOUT_CENTER_X|LAYOUT_CENTER_Y) nonModalButton.connect(SEL_COMMAND) do @dialog.execute_nonmodal do |accepted| @label.text = accepted ? "Dialog accepted" : "Dialog cancelled" end end @label = FXLabel.new(frame, "Dialog not invoked yet") @dialog = TestDialog.new(getApp(), "NonModal Dialog", DECOR_TITLE|DECOR_BORDER) show end end if __FILE__ == $0 application = FXApp.new("NonModal", "FoxTailsTest") window = MainWindow.new(application) application.create application.run end From lyle at knology.net Wed Dec 15 10:22:15 2004 From: lyle at knology.net (lyle@knology.net) Date: Wed Dec 15 10:20:55 2004 Subject: [fxruby-users] non-modal dialogs In-Reply-To: <> References: <> Message-ID: <20041215152215.30594.qmail@webmail3.knology.net> On Wed, 15 Dec 2004 01:23:13 -0800, Joel VanderWerf wrote : > I had to convert some modal dialogs to non-modal, and I abstracted out > some of what I was doing. The result is a mixin that uses closures to > make non-modal dialogs almost as easy to implement as modal ones... Joel, I haven't even looked at the code but I think I understand what you're describing, and it's a great idea. Are you OK with me incorporating this in the next release of FXRuby, with of course attribution to you? Thanks, Lyle From MartinAusChemnitz at gmx.net Wed Dec 15 12:15:55 2004 From: MartinAusChemnitz at gmx.net (Martin aus Chemnitz) Date: Wed Dec 15 12:14:15 2004 Subject: [fxruby-users] Why does FXScrollArea not scroll? Message-ID: <41C0714B.5010807@gmx.net> Hi! I am new to Ruby and Fox and at the moment am stuck at a problem where I cannot find an answer (I tried the examples and surfed the net for ages). I created an (almost) minimal example. Can anyone tell my, why the following FXScrollArea does not scroll? Thanks a lot! Martin require 'fox' include Fox class MyWindow < FXMainWindow def initialize(app) super(app, "ScrollTest", nil, nil, DECOR_ALL, 0, 0, 400, 300) @scrollarea = FXScrollArea.new(self, SCROLLERS_NORMAL|LAYOUT_FILL_X|LAYOUT_FILL_Y) FXButton.new(@scrollarea, "text", nil, nil, 0, LAYOUT_FIX_WIDTH|LAYOUT_FIX_HEIGHT, 10, 10, 600, 600) puts @scrollarea.contentHeight end def create super show(PLACEMENT_SCREEN) end end if __FILE__ == $0 $application = FXApp.new("ScrollTest", "ScrollTest") MyWindow.new($application) $application.create $application.run end From lyle at knology.net Wed Dec 15 13:55:09 2004 From: lyle at knology.net (lyle@knology.net) Date: Wed Dec 15 13:56:52 2004 Subject: [fxruby-users] Why does FXScrollArea not scroll? In-Reply-To: <> References: <> Message-ID: <20041215185509.10079.qmail@webmail2.knology.net> On Wed, 15 Dec 2004 18:15:55 +0100, Martin aus Chemnitz wrote : > I created an (almost) minimal example. Can anyone tell my, why the > following FXScrollArea does not scroll? Thanks a lot! I'm pretty sure that, for what you're trying to accomplish, you want to use an FXScrollWindow instead of the basic FXScrollArea. From vjoel at PATH.Berkeley.EDU Wed Dec 15 14:28:02 2004 From: vjoel at PATH.Berkeley.EDU (Joel VanderWerf) Date: Wed Dec 15 14:26:58 2004 Subject: [fxruby-users] non-modal dialogs In-Reply-To: <20041215152215.30594.qmail@webmail3.knology.net> References: <> <20041215152215.30594.qmail@webmail3.knology.net> Message-ID: <41C09042.5000100@path.berkeley.edu> lyle@knology.net wrote: > On Wed, 15 Dec 2004 01:23:13 -0800, Joel VanderWerf > wrote : > > >>I had to convert some modal dialogs to non-modal, and I abstracted out >>some of what I was doing. The result is a mixin that uses closures to >>make non-modal dialogs almost as easy to implement as modal ones... > > > Joel, > > I haven't even looked at the code but I think I understand what you're > describing, and it's a great idea. Are you OK with me incorporating this in > the next release of FXRuby, with of course attribution to you? > > Thanks, > > Lyle Lyle, I'd be honored. Feel free to change the name from #execute_nonmodal, if you can think of anything better. For paralellism with modal dialogs, maybe #execute could also take a block, with roughly the same semantics as #execute_nonmodal: the block is passed an _accepted_ value (true or false) when the dialog closes. This could be added to my code in the form of an #execute_modal method: def execute_modal(placement = PLACEMENT_CURSOR, &block) @__FTNonModal_block = block execute(placement) end This would make it really easy to convert code from modal to nonmodal (of course there may be other implications you have to worry about, but that's not FXDialogBox's concern). If you use the block form, you avoid having to check for the numeric result (0 or 1), which I sometimes forget to do. BTW, I didn't see your message on fxruby-users, and I'm guessing the reason is that the address was in the cc field. I think I've seen this before. From MartinAusChemnitz at gmx.net Thu Dec 16 16:36:49 2004 From: MartinAusChemnitz at gmx.net (Martin aus Chemnitz) Date: Thu Dec 16 16:35:35 2004 Subject: [fxruby-users] Why does FXScrollArea not scroll? In-Reply-To: <20041215185509.10079.qmail@webmail2.knology.net> References: <> <20041215185509.10079.qmail@webmail2.knology.net> Message-ID: <41C1FFF1.6090607@gmx.net> >> I created an (almost) minimal example. Can anyone tell my, why the >> following FXScrollArea does not scroll? Thanks a lot! > I'm pretty sure that, for what you're trying to accomplish, you want to use > an FXScrollWindow instead of the basic FXScrollArea. Okay. But, when I replace FXScrollArea with FXScrollWindow, I still do not get any scroll bars... Thanks for your patience with me Martin From kevin at ouelong.com Thu Dec 16 19:46:21 2004 From: kevin at ouelong.com (Kevin Pratt) Date: Thu Dec 16 18:44:37 2004 Subject: [fxruby-users] WYSIWYG design tools. Message-ID: <41C22C5D.6090607@ouelong.com> Hi, Does anyone know about if there is a tool out there that can be used to design dialogs and maybe even your main window for FXRuby? Thanks, kevin From dragoncity at impulse.net.au Sat Dec 18 15:14:40 2004 From: dragoncity at impulse.net.au (dragoncity) Date: Fri Dec 17 20:13:09 2004 Subject: [fxruby-users] WYSIWYG design tools. In-Reply-To: <41C22C5D.6090607@ouelong.com> References: <41C22C5D.6090607@ouelong.com> Message-ID: <200412181214.40575.dragoncity@impulse.net.au> Hi Kevin, I know of two actually !, Both written by me and /old/ versions (source) are available at http://users.impulse.net.au/dragoncity and from rubyforge One QT2FXRuby translates QT forms into FXRuby, the other RubyFXGen used a special 'markup' language FFDL (Fox Form Definition Language) that also create FXRuby programs but from a simple script. QT is of course a real GUI interface, FFDL is not , but the end result is of course a FXRuby GUI program. I don't work on this program anymore I think that there was a small project to write a 'real' FOX GUI Builder in Ruby, but I don't know its status. I'm currently revising FFDL & RubyFXGen to be more flexable with even greater placement control of widgets and using FXRuby 1.2 ( not 1.0) Thsi has not been posted as yet. On Thursday 16 December 2004 16:46, Kevin Pratt wrote: > Hi, > > Does anyone know about if there is a tool out there that can be used to > design dialogs and maybe even your main window for FXRuby? > > Thanks, > kevin > _______________________________________________ > fxruby-users mailing list > fxruby-users@rubyforge.org > http://rubyforge.org/mailman/listinfo/fxruby-users -- Cheers, Brett S Hallett From magiclouds at hotmail.com Tue Dec 21 06:16:58 2004 From: magiclouds at hotmail.com (Magiclouds Magicloud) Date: Tue Dec 21 06:16:33 2004 Subject: [fxruby-users] Will there be a reference or even a guide for fxruby 1.2.*? Message-ID: I think it is the time.... _________________________________________________________________ 与联机的朋友进行交流,请使用 MSN Messenger: http://messenger.msn.com/cn From lyle at knology.net Tue Dec 21 07:23:26 2004 From: lyle at knology.net (Lyle Johnson) Date: Tue Dec 21 07:21:58 2004 Subject: [fxruby-users] Will there be a reference or even a guide for fxruby 1.2.*? In-Reply-To: References: Message-ID: <1D49866B-534B-11D9-A938-000A958408D2@knology.net> On Dec 21, 2004, at 5:16 AM, Magiclouds Magicloud wrote: > I think it is the time.... Are you talking about these? http://www.fxruby.org/1.2/doc/book.html http://www.fxruby.org/1.2/doc/api/ Lyle From lyle at knology.net Tue Dec 21 07:23:53 2004 From: lyle at knology.net (Lyle Johnson) Date: Tue Dec 21 07:22:20 2004 Subject: Fwd: [fxruby-users] Will there be a reference or even a guide for fxruby 1.2.*? Message-ID: <2DC83326-534B-11D9-A938-000A958408D2@knology.net> Begin forwarded message: > From: Lyle Johnson > Date: December 21, 2004 6:23:26 AM CST > To: Magiclouds Magicloud > Cc: fxruby-users@rubyforge.org > Subject: Re: [fxruby-users] Will there be a reference or even a guide > for fxruby 1.2.*? > > > On Dec 21, 2004, at 5:16 AM, Magiclouds Magicloud wrote: > >> I think it is the time.... > > Are you talking about these? > > http://www.fxruby.org/1.2/doc/book.html > http://www.fxruby.org/1.2/doc/api/ > > Lyle > -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: text/enriched Size: 816 bytes Desc: not available Url : http://rubyforge.org/pipermail/fxruby-users/attachments/20041221/245342e7/attachment-0001.bin From bdezonia at wisc.edu Tue Dec 21 11:09:54 2004 From: bdezonia at wisc.edu (Barry DeZonia) Date: Tue Dec 21 11:08:23 2004 Subject: [fxruby-users] File selection questions and more In-Reply-To: <1D49866B-534B-11D9-A938-000A958408D2@knology.net> Message-ID: <009101c4e777$824e23a0$b0c65c90@forecol.wisc.edu> I'm using FxRuby that ships with Ruby 1.8.1 (version 1.0.28 I believe). I'd like to be able to select multiple files at a time in a file dialog. I'm using FxFileDialog. The 1.0 api docs say that there is a "filenames" attribute that represents a list of all files selected so far. In my version of FxRuby accessing that attribute results in a method not found error. Also the api says FxFileDialog has a selectmode attribute but no docs on what to set it to so that I might be able to select multiple files at once. I've seen FxFileSelector but I couldn't get it working in the past (filenames again resulting in a no such method error). Is it what I want to be working with anyway? Or will none of this work until FxRuby 1.2 is used? Or was this fixed post 1.0.28? Any help appreciated. On another topic when should I port my app to FxRuby 1.2? I want to use the FxRuby installation that is shipped in the standard ruby distribution to make installation of my program as easy as possible. Will FxRuby 1.2 become THE preferred development path and perhaps make it into the distribution soon? From vjoel at PATH.Berkeley.EDU Tue Dec 21 13:43:09 2004 From: vjoel at PATH.Berkeley.EDU (Joel VanderWerf) Date: Tue Dec 21 13:41:50 2004 Subject: [fxruby-users] Will there be a reference or even a guide for fxruby 1.2.*? In-Reply-To: <1D49866B-534B-11D9-A938-000A958408D2@knology.net> References: <1D49866B-534B-11D9-A938-000A958408D2@knology.net> Message-ID: <41C86EBD.4060400@path.berkeley.edu> Lyle Johnson wrote: > http://www.fxruby.org/1.2/doc/api/ This still has some 1.0 remnants in at least one place: FXTable#leadingRows. From vjoel at PATH.Berkeley.EDU Tue Dec 21 13:54:14 2004 From: vjoel at PATH.Berkeley.EDU (Joel VanderWerf) Date: Tue Dec 21 13:52:48 2004 Subject: [fxruby-users] FXTable in 1.2 Message-ID: <41C87156.3060902@path.berkeley.edu> I've been meaning to ask: how can I detect a double click on a header, now that they are no longer part of the table proper? Is the only way to watch the time between left button release and press? The obvious code doesn't work: @table.rowHeader.connect(SEL_DOUBLECLICKED) {...} From lyle at knology.net Tue Dec 21 14:09:07 2004 From: lyle at knology.net (lyle@knology.net) Date: Tue Dec 21 18:12:44 2004 Subject: [fxruby-users] Will there be a reference or even a guide for fxruby 1.2.*? In-Reply-To: <> References: <> Message-ID: <20041221190907.20334.qmail@webmail1.knology.net> On Tue, 21 Dec 2004 10:43:09 -0800, Joel VanderWerf wrote : > This still has some 1.0 remnants in at least one place: FXTable#leadingRows. Yes; there's an open bug report on the FXTable documentation (see http://rubyforge.org/tracker/index.php?func=detail&aid=989&group_id=300&atid=1223). If you notice errors in classes other than FXTable (which was very, very inaccurate) please let me know (or perhaps add to that bug report).