From philippe.lang at attiksystem.ch Fri Jul 6 01:50:08 2007 From: philippe.lang at attiksystem.ch (Philippe Lang) Date: Fri, 6 Jul 2007 07:50:08 +0200 Subject: [fxruby-users] SEL_REPLACED event in FXTable Message-ID: <6C0CF58A187DA5479245E0830AF84F4218CEB8@poweredge.attiksystem.ch> Hi, I have noticed the SEL_REPLACED event, in an FXTable, is fired even is the cell value is replaced with the same value. I'd like to avoid that, and I wonder if there is anything in the Fox library I can use to compare the new cell value to the old one, without having to code some kind of "cell memory" externally. Regards, Philippe Lang From lyle.johnson at gmail.com Fri Jul 6 08:20:36 2007 From: lyle.johnson at gmail.com (Lyle Johnson) Date: Fri, 6 Jul 2007 07:20:36 -0500 Subject: [fxruby-users] SEL_REPLACED event in FXTable In-Reply-To: <6C0CF58A187DA5479245E0830AF84F4218CEB8@poweredge.attiksystem.ch> References: <6C0CF58A187DA5479245E0830AF84F4218CEB8@poweredge.attiksystem.ch> Message-ID: <90CBD2D7-EE5B-47CD-A586-4347E713906B@gmail.com> On Jul 6, 2007, at 12:50 AM, Philippe Lang wrote: > I have noticed the SEL_REPLACED event, in an FXTable, is fired even is > the cell value is replaced with the same value. I'd like to avoid > that, > and I wonder if there is anything in the Fox library I can use to > compare the new cell value to the old one, without having to code some > kind of "cell memory" externally. Looking at the FOX source code, I don't see a way to do that. I think you'd need to save a copy of the cell's content when they first click into it, and then compare the value after SEL_REPLACED to that. From jeroen at fox-toolkit.org Fri Jul 6 08:57:35 2007 From: jeroen at fox-toolkit.org (Jeroen van der Zijp) Date: Fri, 6 Jul 2007 07:57:35 -0500 Subject: [fxruby-users] SEL_REPLACED event in FXTable In-Reply-To: <6C0CF58A187DA5479245E0830AF84F4218CEB8@poweredge.attiksystem.ch> References: <6C0CF58A187DA5479245E0830AF84F4218CEB8@poweredge.attiksystem.ch> Message-ID: <200707060757.35164.jeroen@fox-toolkit.org> On Friday 06 July 2007 00:50, Philippe Lang wrote: > Hi, > > I have noticed the SEL_REPLACED event, in an FXTable, is fired even is > the cell value is replaced with the same value. I'd like to avoid that, > and I wonder if there is anything in the Fox library I can use to > compare the new cell value to the old one, without having to code some > kind of "cell memory" externally. That is correct. It allows the handler for that event to squirrel away the old data for the purposes of e.g. an Undo system. I have in mind to change this a bit, however. In the next release of FOX, we'll likely send TWO messages. One on behalf of the undo system, before the data changes, and one after. The current workaround would be to grab the new value after the message returns; perhaps by setting a chore to generate a second message after the SEL_REPLACED returns. Hope this explains, - Jeroen From philippe.lang at attiksystem.ch Mon Jul 9 05:36:22 2007 From: philippe.lang at attiksystem.ch (Philippe Lang) Date: Mon, 9 Jul 2007 11:36:22 +0200 Subject: [fxruby-users] SEL_REPLACED event in FXTable References: <6C0CF58A187DA5479245E0830AF84F4218CEB8@poweredge.attiksystem.ch> <90CBD2D7-EE5B-47CD-A586-4347E713906B@gmail.com> Message-ID: <6C0CF58A187DA5479245E0830AF84F4218CEBF@poweredge.attiksystem.ch> fxruby-users-bounces at rubyforge.org wrote: > On Jul 6, 2007, at 12:50 AM, Philippe Lang wrote: > >> I have noticed the SEL_REPLACED event, in an FXTable, is fired even >> is the cell value is replaced with the same value. I'd like to avoid >> that, and I wonder if there is anything in the Fox library I can use >> to compare the new cell value to the old one, without having to code >> some kind of "cell memory" externally. > > Looking at the FOX source code, I don't see a way to do that. I think > you'd need to save a copy of the cell's content when they first click > into it, and then compare the value after SEL_REPLACED to that. Hi Lyle, hi Jeroen, Thanks for the ideas. I simply had to save the current cell text at each click and keystroke, and compare this value with the current cell value in the SEL_REPLACED message handler, as Lyle suggested. If values are identical, this is no update at all... Regards, Philippe From lyle.johnson at gmail.com Sun Jul 15 09:01:00 2007 From: lyle.johnson at gmail.com (Lyle Johnson) Date: Sun, 15 Jul 2007 08:01:00 -0500 Subject: [fxruby-users] Help installing fxruby on osx In-Reply-To: References: Message-ID: On Jul 15, 2007, at 6:29 AM, Sharon Phillips wrote: > A few weeks ago I tried to install fxruby, went grey, ended up > installing fink and darwinports, lost more hair and ended up > completely trashing Ruby on my (wife's) system here. > Thanks to some good advice on this list (yes, I brought 'Learning > unix on OSX Tiger - good book btw), I was able to get ruby up again. Congratulations! > Which brings us to today, when I decided to try fxruby again. > Agghhh... still no joy, but this time, before I mess thing up I > though I'd ask for some advice. > > All I've tried this far is installing via gem. Here's the result: > make > gcc -I. -I. -I/usr/local/lib/ruby/1.8/universal-darwin8.0 -I. - > DHAVE_SYS_TIME_H -DHAVE_SIGNAL_H -I/usr/local/include/fxscintilla - > I/usr/local/include/fox-1.6 -I/opt/local/include/fox-1.6 -I/opt/ > local/include/fxscintilla -fno-common -g -O2 -fno-common -pipe - > fno-common -O0 -Iinclude -DWITH_FXSCINTILLA -DHAVE_FOX_1_6 -arch > i386 -c librb.c > > > > cc -dynamic -bundle -undefined suppress -flat_namespace -arch i386 - > L"/usr/local/lib" -L"/usr/local/lib" -L"/usr/X11R6/lib" -o > fox16.bundle librb.o core_wrap.o dc_wrap.o dialogs_wrap.o > frames_wrap.o fx3d_wrap.o FXRbApp.o FXRbDataTarget.o FXRbGLViewer.o > FXRuby.o iconlist_wrap.o icons_wrap.o image_wrap.o impl.o > label_wrap.o layout_wrap.o list_wrap.o markfuncs.o mdi_wrap.o > menu_wrap.o scintilla_wrap.o table_wrap.o text_wrap.o > treelist_wrap.o ui_wrap.o unregisterOwnedObjects.o -lruby - > lfxscintilla -lFOX-1.6 -lGLU -lGL -lX11 -lXext -ljpeg -lz -lpng - > lstdc++ -lpthread -ldl -lobjc > /usr/bin/ld: can't locate file for: -lfxscintilla > collect2: ld returned 1 exit status > make: *** [fox16.bundle] Error 1 Before I launch into the explanation of this problem, and a way to fix it, let me put in a plug for MacPorts. I know that you (apparently) had a bad experience with Fink. So did I. MacPorts, in my opinion, is better. I am also, personally, the maintainer of the FOX, FXScintilla and FXRuby ports in MacPorts and am pretty confident in saying that that's the easiest, lowest-hassle way to install FXRuby at this point. OK. The build is failing because it can't find the library for FXScintilla, which is an optional component that FXRuby can use when it's present: http://www.fxruby.org/doc/scintilla.html So, for some reason, the FXRuby installation script thought that FXScintilla was installed on your computer and it configured the build that way. The way that FXRuby "decides" whether or not you have FXScintilla is installed is by looking for the FXScintilla include files; it looks for any of the following: /usr/include/fxscintilla/fxscintilla.h /usr/local/include/fxscintilla/fxscintilla.h /sw/include/fxscintilla/fxscintilla.h (this is where Fink installs it) /opt/local/include/fxscintilla/fxscintilla.h (this is where MacPorts installs it) Since you mentioned that you've experimented with Fink before, I have a suspicion that a copy of fxscintilla.h is still hanging around in the /sw/include/fxscintilla directory (but you should check all four locations to be sure). Remove that, and then start over: sudo rm -rf /sw/include/fxscintilla sudo gem install fxruby Hope this helps, Lyle From lyle.johnson at gmail.com Fri Jul 20 14:03:48 2007 From: lyle.johnson at gmail.com (Lyle Johnson) Date: Fri, 20 Jul 2007 13:03:48 -0500 Subject: [fxruby-users] help In-Reply-To: References: Message-ID: <994ED1E8-129E-4DC7-AC36-BD58D2E78384@gmail.com> On Jul 20, 2007, at 12:18 PM, Ben wrote: > how does one instal fxirb in ruby i understand its a gem file.. I guess it's just: gem install fxirb If that doesn't work, you should probably ask the person in charge of that project: http://rubyforge.org/projects/fxirb/ Hope this helps, Lyle From l.peduto at gmail.com Sat Jul 28 10:00:04 2007 From: l.peduto at gmail.com (Luca Peduto) Date: Sat, 28 Jul 2007 16:00:04 +0200 Subject: [fxruby-users] Fxruby 1.6.11 installation error Message-ID: <90d720340707280700u641b14fdw863aecdf366a8c1b@mail.gmail.com> Hi all, I'm trying to install fxruby 1.6.11 on my machine, but I obtain this error: [luca at mobilebox ~]$ sudo gem install fxruby Building native extensions. This could take a while... ERROR: While executing gem ... (RuntimeError) Error instaling fxruby: ERROR: Failed to build gem native extension. ruby extconf.rb install fxruby checking for sys/time.h... yes checking for signal.h... yes checking for png_create_read_struct() in -lpng... yes checking for deflate() in -lz... yes checking for jpeg_mem_init() in -ljpeg... yes checking for TIFFSetErrorHandler() in -ltiff... yes checking for XShmQueryVersion() in -lXext... yes checking for XFindContext() in -lX11... yes checking for glXCreateContext() in -lGL... yes checking for gluNewQuadric() in -lGLU... yes creating Makefile make gcc -I. -I. -I/usr/lib/ruby/1.8/i686-linux -I. -DHAVE_SYS_TIME_H -DHAVE_SIGNAL_H -I/usr/local/include/fxscintilla -I/usr/local/include/fox-1.6 -I/usr/include/fox-1.6 -fPIC -march=i686 -mtune=generic -O2 -pipe -fPIC -O0 -Iinclude -c librb.c g++ -I. -I. -I/usr/lib/ruby/1.8/i686-linux -I. -DHAVE_SYS_TIME_H -DHAVE_SIGNAL_H -I/usr/local/include/fxscintilla -I/usr/local/include/fox-1.6 -I/usr/include/fox-1.6 -fPIC -march=i686 -mtune=generic -O2 -pipe -fPIC -O0 -Iinclude -c ui_wrap.cpp In file included from /usr/lib/ruby/1.8/i686-linux/ruby.h:719, from ui_wrap.cpp:33: /usr/lib/ruby/1.8/i686-linux/intern.h:207: error: use of enum 'rb_thread_status' without previous declaration /usr/lib/ruby/1.8/i686-linux/intern.h:207: error: invalid type in declaration before ';' token In file included from include/FXRuby.h:825, from include/FXRbCommon.h:93, from ui_wrap.cpp:584: include/inlinestubs.h: In function 'void FXApp_init(FX::FXApp*, VALUE, bool)': include/inlinestubs.h:20: warning: deprecated conversion from string constant to 'char*' make: *** [ui_wrap.o] Error 1 Gem files will remain installed in /usr/lib/ruby/gems/1.8/gems/fxruby-1.6.11 for inspection. Results logged to /usr/lib/ruby/gems/1.8/gems/fxruby-1.6.11/ext/fox16/gem_make.out I also tried with source package but with no luck. Some info: ruby 1.8.6 (2007-06-07 patchlevel 36) [i686-linux] gem 0.9.4 fox 1.6.27 gcc 4.2.1 Any ideas? From lyle.johnson at gmail.com Sat Jul 28 15:57:42 2007 From: lyle.johnson at gmail.com (Lyle Johnson) Date: Sat, 28 Jul 2007 14:57:42 -0500 Subject: [fxruby-users] Fxruby 1.6.11 installation error In-Reply-To: <90d720340707280700u641b14fdw863aecdf366a8c1b@mail.gmail.com> References: <90d720340707280700u641b14fdw863aecdf366a8c1b@mail.gmail.com> Message-ID: <1E616A37-D701-48E7-8276-6993EB2D2558@gmail.com> On Jul 28, 2007, at 9:00 AM, Luca Peduto wrote: > I'm trying to install fxruby 1.6.11 on my machine, but I obtain > this error: > In file included from /usr/lib/ruby/1.8/i686-linux/ruby.h:719, > from ui_wrap.cpp:33: > /usr/lib/ruby/1.8/i686-linux/intern.h:207: error: use of enum > 'rb_thread_status' without previous declaration > /usr/lib/ruby/1.8/i686-linux/intern.h:207: error: invalid type in > declaration before ';' token > In file included from include/FXRuby.h:825, > from include/FXRbCommon.h:93, > from ui_wrap.cpp:584: > include/inlinestubs.h: In function 'void FXApp_init(FX::FXApp*, > VALUE, bool)': > include/inlinestubs.h:20: warning: deprecated conversion from string > constant to 'char*' > make: *** [ui_wrap.o] Error 1 This is a known bug in Ruby 1.8.6-p36; see the ruby-core thread that begins here: http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-core/11499 The bug is allegedly fixed in the Subversion repository for 1.8.6, so you can either downgrade to 1.8.6 (the original release, a.k.a. patch level 0) or check out the latest code from the 1.8.6 branch and use that.