From alexander.panich at intel.com Tue Jul 5 10:10:01 2005 From: alexander.panich at intel.com (Panich, Alexander) Date: Tue Jul 5 10:05:06 2005 Subject: [fxruby-users] Changing colors Message-ID: Hi, all! I there a way to dynamically change back and base colors of FXMainWindow objects? I have tried methods like recalc, repaint, forceRefresh and update. Anything of the listed worked. Any ideas? Regards, Alex -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/fxruby-users/attachments/20050705/fea022b4/attachment.htm From fkchang2000 at yahoo.com Thu Jul 7 18:39:13 2005 From: fkchang2000 at yahoo.com (Forrest Chang) Date: Thu Jul 7 18:34:09 2005 Subject: [fxruby-users] Solaris relocation error Message-ID: <20050707223913.77568.qmail@web80508.mail.yahoo.com> Hi All: I'm having a problem that seems similar to what others have had, but I was unable to find a solution. Using: - Solaris 8 - fox 1.2.13 - fxruby 1.2.1 and 1.2.2, same happens for both - fox compiles ok under sun's CC (wouldn't link under g++, is a closed system, and don't have gnu ld), sample c++ fox apps work fine I'm able to bet fxruby (both versions to compile) under sun CC, but I get a similar relocation error to what others have found involiving an undefined name mangled symbol. I did an nm on the library and indeed it seems like the symbol in question is UNDEF in the fox.so. How are the C++ test apps able to run? Thanks for any help Forrest From roys at mindspring.com Fri Jul 8 00:56:01 2005 From: roys at mindspring.com (Roy Sutton) Date: Fri Jul 8 00:51:07 2005 Subject: [fxruby-users] Menu behavior on Windows Message-ID: <42CE0761.80902@mindspring.com> I'm wondering if the menu behavior exhibited by FXRuby under Windows XP is a problem/shortcoming/feature with Fox, FXRuby or somehing else altogether. Using the scintilla-test.rb sample application if you press the menu shortcut key (ALT-F) you cannot access the underlined menu options using the underlined character -unless- you have not released the ALT key. Standard Windows menu behavior is that you can release the ALT key and then press the underlined character to select the menu option. Thoughts? Also, I noticed Fox is up to 1.4, what's the general lag time to an FXRuby release? Thanks! Roy From lyle at knology.net Tue Jul 26 17:16:02 2005 From: lyle at knology.net (lyle@knology.net) Date: Tue Jul 26 17:10:25 2005 Subject: [fxruby-users] Re: FOX Issue In-Reply-To: <> References: <> Message-ID: <20050726211602.20462.qmail@webmail3.knology.net> On Tue, 26 Jul 2005 15:32:41 -0400, Bill Atkins wrote : > With fxruby gem 1.2.6 and ruby 1.8.2 Windows, running this code: > > -- > > require_gem 'fxruby' > include Fox > > app = FXApp.new > win = FXMainWindow.new app, "Test" > > FXTreeList.new win, 0 > > app.create > app.run > > -- > > produces > > C:\development\simulation>ruby bug_report.rb > bug_report.rb:7:in `initialize': wrong argument type Fixnum (expected Data) > (Typ > eError) > from bug_report.rb:7:in `new' > from bug_report.rb:7 > > Why does this happen? The second argument should be an integer representing > the number of visible items. In the example code on > fxruby.org, > FXTreeList.new is called with an integer for its second parameter. > > Is this a bug or am I doing something wrong? The documentation is wrong; the "nvis" argument (which used to be the second argument) is no longer there. I've just added a bug report about this. From roys at mindspring.com Tue Jul 26 18:36:14 2005 From: roys at mindspring.com (Roy Sutton) Date: Tue Jul 26 18:30:45 2005 Subject: [fxruby-users] Issue with callback In-Reply-To: <20050726211602.20462.qmail@webmail3.knology.net> References: <> <20050726211602.20462.qmail@webmail3.knology.net> Message-ID: <42E6BADE.5020008@mindspring.com> I'm experiencing an interesting issue with FXRuby 1.2.6 on Windows. I have the following code: self.accelTable.addAccel(fxparseAccel("Ctrl-F4"), self, FXSEL(SEL_COMMAND, FXApp::ID_LAST+124)) FXMAPFUNC(SEL_COMMAND, FXApp::ID_LAST+124, :do_close_file) Then later: def do_close_file(sender, sel, ptr) puts(sender); puts(sel); puts(ptr); end This code always crashes with a segementation fault at puts(ptr); I believe ptr should contain the ID of the message (FXApp::ID_LAST+124). Also, as long as I'm here... Is there a 'quicker' or cleaner way to map a function to the accelerator table than what I did above? I couldn't any examples on how to do it and really just cobbled that together from a hint a saw on a blog somewhere. Roy From jcribbs at twmi.rr.com Tue Jul 26 21:55:11 2005 From: jcribbs at twmi.rr.com (Jamey Cribbs) Date: Tue Jul 26 21:49:37 2005 Subject: [fxruby-users] Issue with callback In-Reply-To: <42E6BADE.5020008@mindspring.com> References: <20050726211602.20462.qmail@webmail3.knology.net> <42E6BADE.5020008@mindspring.com> Message-ID: <42E6E97F.4010706@twmi.rr.com> Roy Sutton wrote: > I'm experiencing an interesting issue with FXRuby 1.2.6 on Windows. I > have the following code: > > self.accelTable.addAccel(fxparseAccel("Ctrl-F4"), self, > FXSEL(SEL_COMMAND, FXApp::ID_LAST+124)) > FXMAPFUNC(SEL_COMMAND, FXApp::ID_LAST+124, > :do_close_file) > > Then later: > > def do_close_file(sender, sel, ptr) > puts(sender); > puts(sel); > puts(ptr); > end > > This code always crashes with a segementation fault at puts(ptr); I > believe ptr should contain the ID of the message (FXApp::ID_LAST+124). > Roy, this won't help much, but I had a very similar problem using addAccel. I don't remember the details, but a few months ago I was working on a fairly complex app. I had a lot of the menu items mapped to the accelTable using addAccel. Well, I remember that my app started crashing with a seg fault. I was able to trace it to the accelTable. I tried everything I could to track down the problem. I finally narrowed it down to, I think, a problem where Ruby's garbage collector was prematurely collecting one of my references. I can't really remember more than that. I ended up removing all of the addAccel code and figured out a different way to add hotkey support (I think I ended up trapping for the actual key codes). Sorry for the vagueness, the old memory cells go fast at my age. :-) Jamey Cribbs From roys at mindspring.com Tue Jul 26 23:17:25 2005 From: roys at mindspring.com (Roy Sutton) Date: Tue Jul 26 23:11:50 2005 Subject: [fxruby-users] Issue with callback In-Reply-To: <42E6E97F.4010706@twmi.rr.com> References: <20050726211602.20462.qmail@webmail3.knology.net> <42E6BADE.5020008@mindspring.com> <42E6E97F.4010706@twmi.rr.com> Message-ID: <42E6FCC5.70608@mindspring.com> Jamey, Thanks for the info. Any chance you can remember how you trapped the key codes? Roy Jamey Cribbs wrote: > I ended up removing all of the addAccel code and figured out a > different way to add hotkey support (I think I ended up trapping for > the actual key codes). From alexander.panich at intel.com Wed Jul 27 03:49:26 2005 From: alexander.panich at intel.com (Panich, Alexander) Date: Wed Jul 27 03:43:51 2005 Subject: [fxruby-users] Issue with callback Message-ID: Hi, Roy. To trap keyboard you can to c-tor (initialize) mapping: FXMAPFUNC(SEL_KEYPRESS, 0,"handleKeyPressed") And the implementation can be something like this: def handleKeyPressed keyvalue = 97 # a keystate = 8 # Alt if ( ptr.code == keyvalue and ptr.state == keystate ) #handle event elsif (ptr.code == ... ... end end Regards, Alex. -----Original Message----- From: fxruby-users-bounces@rubyforge.org [mailto:fxruby-users-bounces@rubyforge.org] On Behalf Of Roy Sutton Sent: Wednesday, July 27, 2005 6:17 AM To: fxruby-users@rubyforge.org Subject: Re: [fxruby-users] Issue with callback Jamey, Thanks for the info. Any chance you can remember how you trapped the key codes? Roy Jamey Cribbs wrote: > I ended up removing all of the addAccel code and figured out a > different way to add hotkey support (I think I ended up trapping for > the actual key codes). _______________________________________________ fxruby-users mailing list fxruby-users@rubyforge.org http://rubyforge.org/mailman/listinfo/fxruby-users From roys at mindspring.com Wed Jul 27 07:19:43 2005 From: roys at mindspring.com (Roy Sutton) Date: Wed Jul 27 07:14:06 2005 Subject: [fxruby-users] Issue with callback In-Reply-To: References: Message-ID: <42E76DCF.5010601@mindspring.com> Thank you! This will be a better solution anyhow. Panich, Alexander wrote: >Hi, Roy. > >To trap keyboard you can to c-tor (initialize) mapping: > FXMAPFUNC(SEL_KEYPRESS, 0,"handleKeyPressed") > >And the implementation can be something like this: > >def handleKeyPressed > keyvalue = 97 # a > keystate = 8 # Alt > if ( ptr.code == keyvalue and ptr.state == keystate ) > #handle event > elsif (ptr.code == ... > ... > end >end > >Regards, >Alex. > > >-----Original Message----- >From: fxruby-users-bounces@rubyforge.org >[mailto:fxruby-users-bounces@rubyforge.org] On Behalf Of Roy Sutton >Sent: Wednesday, July 27, 2005 6:17 AM >To: fxruby-users@rubyforge.org >Subject: Re: [fxruby-users] Issue with callback > >Jamey, > >Thanks for the info. Any chance you can remember how you trapped the >key codes? > >Roy > >Jamey Cribbs wrote: > > > >>I ended up removing all of the addAccel code and figured out a >>different way to add hotkey support (I think I ended up trapping for >>the actual key codes). >> >> > > >_______________________________________________ >fxruby-users mailing list >fxruby-users@rubyforge.org >http://rubyforge.org/mailman/listinfo/fxruby-users > >_______________________________________________ >fxruby-users mailing list >fxruby-users@rubyforge.org >http://rubyforge.org/mailman/listinfo/fxruby-users > > > > > From lyle at knology.net Sun Jul 31 20:07:26 2005 From: lyle at knology.net (Lyle Johnson) Date: Sun Jul 31 20:01:41 2005 Subject: [fxruby-users] Re: FXRuby on OpenBSD In-Reply-To: <200508010921.53677.dragoncity@impulse.net.au> References: <200508010921.53677.dragoncity@impulse.net.au> Message-ID: <80acf3bf01819cf1f004de14e6e13d34@knology.net> On Aug 1, 2005, at 4:21 AM, brett s hallett wrote: > I'm having some problems installing FXRuby on OpenBSD 3.7 > > -- Note : OpenBSD supplied Ruby 1.8.1 and fox > version /mnt/cdrom/3.7/packages/i386/fox-1.1.41.tgz > > If I try to install any FXRuby against these I get the error message > " fox version is expiremental" ( something like that !) , so > I removed the above and installed. Right. Currently, FXRuby is only supported for FOX versions 1.0.x and 1.2.x, and no others. > - Ruby 1.8.2 > - fox-1.2.16 > - FXRuby-1.2.6 or 1.2.3 or 1.2.2 ( so I've tried a few versions !! ) > > All appears to go well, some warning messages from fox re: "unsigned > integer > variable used" and suggests that some other procedures would be better > than > the one(s) used. But no actual abort of compile. OK. > However after installing everything the ruby irb test fails in a > unusual way > > eg: > > $ irb > irb(main):001:0> require 'fox12' > $ > > IE: program just drops out, no error messages, if I try require 'fox' > I get > the expected "can't find file". So I assume that the fox12.so does > exist > (which it does) and is found by irb but ruby does not like "something" > about > the file. Right, there's something wrong when it tries to load fox12.so. I don't know how to tell you to debug this, but for starters, are you able to run any of the FOX example programs (i.e. those executables from your fox-1.2.16 build)? The answer to that question will at least tell us if it's something specific to FXRuby, or if it was a FOX-specific issue. From vjoel at path.berkeley.edu Sun Jul 31 20:28:15 2005 From: vjoel at path.berkeley.edu (Joel VanderWerf) Date: Sun Jul 31 20:22:32 2005 Subject: [fxruby-users] Re: FXRuby on OpenBSD In-Reply-To: <80acf3bf01819cf1f004de14e6e13d34@knology.net> References: <200508010921.53677.dragoncity@impulse.net.au> <80acf3bf01819cf1f004de14e6e13d34@knology.net> Message-ID: <42ED6C9F.4040702@path.berkeley.edu> Lyle Johnson wrote: > > On Aug 1, 2005, at 4:21 AM, brett s hallett wrote: ... >> $ irb >> irb(main):001:0> require 'fox12' >> $ >> >> IE: program just drops out, no error messages, if I try require 'fox' >> I get >> the expected "can't find file". So I assume that the fox12.so does exist >> (which it does) and is found by irb but ruby does not like "something" >> about >> the file. Do you have gdb? Can you send the output like this: $ gdb ruby GNU gdb 6.3-debian Copyright 2004 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "i386-linux"...Using host libthread_db library "/lib/tls/i686/cmov/libthread_db.so.1". (gdb) r -e 'require "fox12"; p Fox' Starting program: /usr/local/bin/ruby -e 'require "fox12"; p Fox' [Thread debugging using libthread_db enabled] [New Thread -1208460864 (LWP 10981)] Fox Program exited normally. -- vjoel : Joel VanderWerf : path berkeley edu : 510 665 3407 From jacdx at jacobhanson.com Sun Jul 31 21:37:15 2005 From: jacdx at jacobhanson.com (Jacob Hanson) Date: Sun Jul 31 21:31:58 2005 Subject: [fxruby-users] Hot keys working? Message-ID: <1271903338.20050731193715@jacobhanson.com> Hello list, I'm using fxruby12 and I'm having trouble getting hotkeys to work. I've spent some time digging through the examples, the manual, and even the FOX source, but to no avail. Are hot keys working in fxruby? Does anyone have a working example? Thanks, Jacob -- _/ _/ _/ Jacob Hanson _/ _/_/_/ mailto:jacdx@jacobhanson.com _/_/_/ _/ _/ http://www.jacobhanson.com From roys at mindspring.com Sun Jul 31 23:32:03 2005 From: roys at mindspring.com (Roy Sutton) Date: Sun Jul 31 23:26:30 2005 Subject: [fxruby-users] Hot keys working? In-Reply-To: <1271903338.20050731193715@jacobhanson.com> References: <1271903338.20050731193715@jacobhanson.com> Message-ID: <42ED97B3.9040601@mindspring.com> Yes, hotkeys work... mostly. (And I assume you mean accelerators) Here are two examples from my source code: self.accelTable.addAccel(fxparseAccel("Ctrl-F4"), self, FXSEL(SEL_COMMAND, FXApp::ID_LAST+124)) FXMAPFUNC(SEL_COMMAND, FXApp::ID_LAST+124, :do_close_file) (Map a hotkey to a function. Note: You should probably use an enumeration for the ID number instead of the hack I was doing here. This was just from a spike attempt, not production code) plugin['/system/ui/fox/FXMainWindow'].data.accelTable.addAccel(fxparseAccel("Alt-F4"), plugin['/system/ui/fox/FXApp'].data, FXSEL(SEL_COMMAND, FXApp::ID_QUIT)) (Map an accelerator to an existing command ID. Another example from my spike.) The 'mostly' part of my statement was from the fact that the third parameter passed to the function in the first example cannot be accessed without causing a segmentation fault. Another list member said he gave up on doing them that way. Check the archives, it was within the last week or so we had that discussion. Jacob Hanson wrote: >Hello list, > >I'm using fxruby12 and I'm having trouble getting hotkeys to work. >I've spent some time digging through the examples, the manual, and >even the FOX source, but to no avail. Are hot keys working in fxruby? >Does anyone have a working example? > >Thanks, >Jacob >-- > _/ _/ _/ Jacob Hanson > _/ _/_/_/ mailto:jacdx@jacobhanson.com > _/_/_/ _/ _/ http://www.jacobhanson.com > > >_______________________________________________ >fxruby-users mailing list >fxruby-users@rubyforge.org >http://rubyforge.org/mailman/listinfo/fxruby-users > > > > >