From angico at angico.org Mon Aug 4 08:16:37 2008 From: angico at angico.org (angico) Date: Mon, 04 Aug 2008 09:16:37 -0300 Subject: [fxruby-users] close application event handling Message-ID: <1217852197.6162.19.camel@caipora> Hi, all! I'm trying to handle the event associated with a user clicking on the [X] icon of the main window of an application in order to make such decisions as asking the user to save a file or cancel quiting, but I just can't find any information about it in RDoc documentation for any classes in the hierarchy. Can anybody give me any hint? TIA, -- angico ------ home page: www.angico.org Gnu/Linux, FLOSS, Espiritismo, e eu por mim mesmo 8^I ------ contatos: email: angico at angico.org skype: angico00 ------ From lyle at lylejohnson.name Mon Aug 4 20:17:57 2008 From: lyle at lylejohnson.name (Lyle Johnson) Date: Mon, 4 Aug 2008 19:17:57 -0500 Subject: [fxruby-users] close application event handling In-Reply-To: <1217852197.6162.19.camel@caipora> References: <1217852197.6162.19.camel@caipora> Message-ID: On Aug 4, 2008, at 7:16 AM, angico wrote: > Hi, all! > > I'm trying to handle the event associated with a user clicking on the > [X] icon of the main window of an application in order to make such > decisions as asking the user to save a file or cancel quiting, but I > just can't find any information about it in RDoc documentation for any > classes in the hierarchy. Can anybody give me any hint? Googling for "SEL_CLOSE" revealed numerous answers to this question, e.g. http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/39539 Hope this helps, Lyle From rmelton at ball.com Fri Aug 8 12:46:39 2008 From: rmelton at ball.com (Melton, Ryan) Date: Fri, 8 Aug 2008 10:46:39 -0600 Subject: [fxruby-users] "object allocation during garbage collection phase" on Ruby 1.8.7 Message-ID: <2EC28B773AF39E47850AC45765483C2C0A4ED1FA@AEROMSG2.AERO.BALL.COM> Lyle, I am running into this issue using FXRuby 1.6.16 with Ruby 1.8.7-p22 on Solaris 10. Programs are dying with the message "object allocation during garbage collection phase" Here is a similar discussion from other libraries: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=487204 For now it looks like I will be downgrading to Ruby 1.8.6. Here is the backtrace from ddd: #0 0xff245bf0 in _lwp_kill () from /lib/libc.so.1 #1 0xff1e4bfc in raise () from /lib/libc.so.1 #2 0xff1c1100 in abort () from /lib/libc.so.1 #3 0x000a774c in rb_bug (fmt=0xac908 "object allocation during garbage collection phase") at error.c:213 #4 0x00039654 in rb_newobj () at gc.c:422 #5 0x00025540 in rb_call0 (klass=7931952, recv=17548608, id=24785, oid=24785, argc=6, argv=0xffbfb998, body=0x78f0a8, flags=0) at eval.c:5945 #6 0x000266bc in rb_call (klass=7931952, recv=17548608, mid=24785, argc=6, argv=0xffbfb998, scope=1, self=6) at eval.c:6146 #7 0x0002725c in vafuncall (recv=17548608, mid=24785, n=6, ar=0xffbfba24) at ruby.h:696 #8 0x00027390 in rb_funcall (recv=17548608, mid=24785, n=6) at eval.c:6240 #9 0xfec1ed24 in FXRbCallVoidMethod (recv=0xae4ee8, func=24785, arg1=0x184c890, arg2=@0xffbfd2b0, arg3=10, arg4=10, arg5=106, arg6=20) at include/FXRuby.h:396 #10 0xfe98f5ec in FXRbTableItem::drawContent (this=0xae4ee8, table=0x184c890, dc=@0xffbfd2b0, x=10, y=10, w=106, h=20) at impl.cpp:1011 #11 0xfe29c450 in FX::FXTableItem::draw (this=0xae4ee8, table=0x184c890, dc=@0xffbfd2b0, x=10, y=10, w=106, h=20) at FXTable.cpp:362 #12 0xfe98f49c in FXRbTableItem::public_draw (this=0xae4ee8, table=0x184c890, dc=@0xffbfd2b0, x=10, y=10, w=106, h=20) at impl.cpp:1011 #13 0xfec34c38 in FXTableItem_draw (self=0xae4ee8, table=0x184c890, dc=@0xffbfd2b0, x=10, y=10, w=106, h=20) at include/inlinestubs.h:1010 #14 0xfeaa92dc in _wrap_FXTableItem_draw (argc=6, argv=0xffbfbf80, self=17548608) at table_wrap.cpp:917 #15 0x00025bf4 in rb_call0 (klass=5352528, recv=17548608, id=47449, oid=47449, argc=6, argv=0xffbfbf80, body=0x51a968, flags=0) at eval.c:5751 #16 0x000266bc in rb_call (klass=5352528, recv=17548608, mid=47449, argc=6, argv=0xffbfbf80, scope=1, self=6) at eval.c:6146 #17 0x0002725c in vafuncall (recv=17548608, mid=47449, n=6, ar=0xffbfc00c) at ruby.h:696 #18 0x00027390 in rb_funcall (recv=17548608, mid=47449, n=6) at eval.c:6240 #19 0xfec1ed24 in FXRbCallVoidMethod (recv=0xae4ee8, func=47449, arg1=0x184c890, arg2=@0xffbfd2b0, arg3=10, arg4=10, arg5=106, arg6=20) at include/FXRuby.h:396 #20 0xfe98f44c in FXRbTableItem::draw (this=0xae4ee8, table=0x184c890, dc=@0xffbfd2b0, x=10, y=10, w=106, h=20) at impl.cpp:1011 #21 0xfe2a31fc in FX::FXTable::drawCell (this=0x184c890, dc=@0xffbfd2b0, sr=0, er=0, sc=0, ec=0) at FXTable.cpp:2346 #22 0xfe990c5c in FXRbTable::public_drawCell (this=0x184c890, dc=@0xffbfd2b0, sr=0, er=0, sc=0, ec=0) at impl.cpp:1019 #23 0xfec35f04 in FXTable_drawCell (self=0x184c890, dc=@0xffbfd2b0, sr=0, er=0, sc=0, ec=0) at include/inlinestubs.h:1018 #24 0xfeac00e0 in _wrap_FXTable_drawCell (argc=5, argv=0xffbfc548, self=7455288) at table_wrap.cpp:2394 #25 0x00025bf4 in rb_call0 (klass=5350632, recv=7455288, id=56721, oid=56721, argc=5, argv=0xffbfc548, body=0x517590, flags=0) at eval.c:5751 #26 0x000266bc in rb_call (klass=5350632, recv=7455288, mid=56721, argc=5, argv=0xffbfc548, scope=1, self=6) at eval.c:6146 #27 0x0002725c in vafuncall (recv=7455288, mid=56721, n=5, ar=0xffbfc5d4) at ruby.h:696 #28 0x00027390 in rb_funcall (recv=7455288, mid=56721, n=5) at eval.c:6240 #29 0xfec1efb8 in FXRbCallVoidMethod (recv=0x184c890, func=56721, arg1=@0xffbfd2b0, arg2=0, arg3=0, arg4=0, arg5=0) at include/FXRuby.h:381 #30 0xfe990c14 in FXRbTable::drawCell (this=0x184c890, dc=@0xffbfd2b0, sr=0, er=0, sc=0, ec=0) at impl.cpp:1019 #31 0xfe2a33e0 in FX::FXTable::drawRange (this=0x184c890, dc=@0xffbfd2b0, rlo=0, rhi=14, clo=0, chi=1) at FXTable.cpp:2371 #32 0xfe990d1c in FXRbTable::public_drawRange (this=0x184c890, dc=@0xffbfd2b0, rlo=0, rhi=14, clo=0, chi=1) at impl.cpp:1019 #33 0xfec36018 in FXTable_drawRange (self=0x184c890, dc=@0xffbfd2b0, rlo=0, rhi=14, clo=0, chi=1) at include/inlinestubs.h:1018 #34 0xfeac0384 in _wrap_FXTable_drawRange (argc=5, argv=0xffbfcb00, self=7455288) at table_wrap.cpp:2401 #35 0x00025bf4 in rb_call0 (klass=5350632, recv=7455288, id=56729, oid=56729, argc=5, argv=0xffbfcb00, body=0x517560, flags=0) at eval.c:5751 #36 0x000266bc in rb_call (klass=5350632, recv=7455288, mid=56729, argc=5, argv=0xffbfcb00, scope=1, self=6) at eval.c:6146 #37 0x0002725c in vafuncall (recv=7455288, mid=56729, n=5, ar=0xffbfcb8c) at ruby.h:696 #38 0x00027390 in rb_funcall (recv=7455288, mid=56729, n=5) at eval.c:6240 #39 0xfec1efb8 in FXRbCallVoidMethod (recv=0x184c890, func=56729, arg1=@0xffbfd2b0, arg2=0, arg3=14, arg4=0, arg5=1) at include/FXRuby.h:381 #40 0xfe990cd4 in FXRbTable::drawRange (this=0x184c890, dc=@0xffbfd2b0, rlo=0, rhi=14, clo=0, chi=1) at impl.cpp:1019 #41 0xfe2a3850 in FX::FXTable::drawContents (this=0x184c890, dc=@0xffbfd2b0, x=1, y=10, w=-4205904, h=-4205904) at FXTable.cpp:2458 #42 0xfe990f5c in FXRbTable::public_drawContents (this=0x184c890, dc=@0xffbfd2b0, x=116, y=10, w=115, h=295) at impl.cpp:1019 #43 0xfec36354 in FXTable_drawContents (self=0x184c890, dc=@0xffbfd2b0, x=116, y=10, w=115, h=295) at include/inlinestubs.h:1018 #44 0xfeac0b70 in _wrap_FXTable_drawContents (argc=5, argv=0xffbfd0b8, self=7455288) at table_wrap.cpp:2422 #45 0x00025bf4 in rb_call0 (klass=5350632, recv=7455288, id=56753, oid=56753, argc=5, argv=0xffbfd0b8, body=0x5174d0, flags=0) at eval.c:5751 #46 0x000266bc in rb_call (klass=5350632, recv=7455288, mid=56753, argc=5, argv=0xffbfd0b8, scope=1, self=6) at eval.c:6146 #47 0x0002725c in vafuncall (recv=7455288, mid=56753, n=5, ar=0xffbfd144) at ruby.h:696 #48 0x00027390 in rb_funcall (recv=7455288, mid=56753, n=5) at eval.c:6240 #49 0xfec1efb8 in FXRbCallVoidMethod (recv=0x184c890, func=56753, arg1=@0xffbfd2b0, arg2=116, arg3=10, arg4=115, arg5=295) at include/FXRuby.h:381 #50 0xfe990f14 in FXRbTable::drawContents (this=0x184c890, dc=@0xffbfd2b0, x=116, y=10, w=115, h=295) at impl.cpp:1019 #51 0xfe2a3910 in FX::FXTable::onPaint (this=0x184c890, ptr=0xa6c930) at FXTable.cpp:2483 #52 0xfe29d1cc in FX::FXTable::handle (this=0x184c890, sender=0xa6c828, sel=1048576, ptr=0xa6c930) at FXTable.cpp:700 #53 0xfe88e9dc in FXRbTable::handle (this=0x184c890, sender=0xa6c828, key=1048576, ptr=0xa6c930) at include/impl.h:482 #54 0xfe185a70 in FX::FXApp::dispatchEvent (this=0xa6c828, ev=@0xffbfd5e0) at FXApp.cpp:2202 #55 0xfe1839d8 in FX::FXApp::runOneEvent (this=0xa6c828, blocking=true) at FXApp.cpp:3131 #56 0xfe183a4c in FX::FXApp::run (this=0xa6c828) at FXApp.cpp:3090 #57 0xfe67f8a0 in _wrap_FXApp_run (argc=0, argv=0xffbfd988, self=7907616) at core_wrap.cpp:3425 #58 0x00025bf4 in rb_call0 (klass=3067584, recv=7907616, id=81985, oid=5393, argc=0, argv=0xffbfd988, body=0x2eb8a0, flags=0) at eval.c:5751 #59 0x000266bc in rb_call (klass=3067584, recv=7907616, mid=81985, argc=0, argv=0xffbfd988, scope=1, self=7907616) at eval.c:6146 #60 0x00023d78 in rb_eval () #61 0x00025af4 in rb_call0 (klass=3067584, recv=7907616, id=5393, oid=5393, argc=0, argv=0x0, body=0x7f4ef8, flags=8343528) at eval.c:6050 #62 0x000266bc in rb_call (klass=3067584, recv=7907616, mid=5393, argc=0, argv=0x0, scope=0, self=7925832) at eval.c:6146 #63 0x00023e64 in rb_eval () #64 0x00024570 in rb_eval () #65 0x00025af4 in rb_call0 (klass=7925688, recv=7925832, id=5393, oid=5393, argc=0, argv=0x0, body=0x2feef0, flags=3144048) at eval.c:6050 #66 0x000266bc in rb_call (klass=7925688, recv=7925832, mid=5393, argc=0, argv=0x0, scope=0, self=1173576) at eval.c:6146 #67 0x00023e64 in rb_eval () #68 0x0002e9e0 in ruby_exec_internal () at eval.c:1642 #69 0x0002ea14 in ruby_exec () at eval.c:1662 #70 0x0002fa80 in ruby_run () at eval.c:1672 #71 0x0001a67c in main (argc=2, argv=0xffbff1dc, envp=0xffbff1e8) at main.c:48 Thanks, Ryan This message and any enclosures are intended only for the addressee. Please notify the sender by email if you are not the intended recipient. If you are not the intended recipient, you may not use, copy, disclose, or distribute this message or its contents or enclosures to any other person and any such actions may be unlawful. Ball reserves the right to monitor and review all messages and enclosures sent to or from this email address. -------------- next part -------------- An HTML attachment was scrubbed... URL: From lyle at lylejohnson.name Fri Aug 8 13:52:54 2008 From: lyle at lylejohnson.name (Lyle Johnson) Date: Fri, 8 Aug 2008 12:52:54 -0500 Subject: [fxruby-users] "object allocation during garbage collection phase" on Ruby 1.8.7 In-Reply-To: <2EC28B773AF39E47850AC45765483C2C0A4ED1FA@AEROMSG2.AERO.BALL.COM> References: <2EC28B773AF39E47850AC45765483C2C0A4ED1FA@AEROMSG2.AERO.BALL.COM> Message-ID: On Aug 8, 2008, at 11:46 AM, Melton, Ryan wrote: > For now it looks like I will be downgrading to Ruby 1.8.6. I second that emotion. A lot of us are considering just not supporting Ruby 1.8.7, given all of the incompatibilities. --- "FXRuby: Create Lean and Mean GUIs with Ruby" Now available from the Pragmatic Bookshelf! http://www.pragprog.com/titles/fxruby -------------- next part -------------- An HTML attachment was scrubbed... URL: From rmelton at ball.com Fri Aug 8 14:40:43 2008 From: rmelton at ball.com (Melton, Ryan) Date: Fri, 8 Aug 2008 12:40:43 -0600 Subject: [fxruby-users] "object allocation during garbage collectionphase" on Ruby 1.8.7 In-Reply-To: References: <2EC28B773AF39E47850AC45765483C2C0A4ED1FA@AEROMSG2.AERO.BALL.COM> Message-ID: <2EC28B773AF39E47850AC45765483C2C0A4ED267@AEROMSG2.AERO.BALL.COM> I had to downgrade to all the way Ruby 1.8.6-p114 which now works without a problem. According to the change logs, this change made it into the 1.8.6 ruby branch at patch level 175. According to a similar bug posted to wxruby, the problem is in SWIG's generated code for object tracking which is incompatible with newer versions of ruby. They worked around it by replacing SWIG's code with their own tracking solution. You might want to check that out... here is the link to their bug report. http://rubyforge.org/tracker/?func=detail&atid=218&aid=20759&group_id=35 And here is a link to the bug report posted to SWIG: http://sourceforge.net/tracker/index.php?func=detail&aid=2034216&group_i d=1645&atid=101645 Thanks, Ryan ________________________________ From: fxruby-users-bounces at rubyforge.org [mailto:fxruby-users-bounces at rubyforge.org] On Behalf Of Lyle Johnson Sent: Friday, August 08, 2008 11:53 AM To: fxruby-users at rubyforge.org Subject: Re: [fxruby-users] "object allocation during garbage collectionphase" on Ruby 1.8.7 On Aug 8, 2008, at 11:46 AM, Melton, Ryan wrote: For now it looks like I will be downgrading to Ruby 1.8.6. I second that emotion. A lot of us are considering just not supporting Ruby 1.8.7, given all of the incompatibilities. --- "FXRuby: Create Lean and Mean GUIs with Ruby" Now available from the Pragmatic Bookshelf! http://www.pragprog.com/titles/fxruby This message and any enclosures are intended only for the addressee. Please notify the sender by email if you are not the intended recipient. If you are not the intended recipient, you may not use, copy, disclose, or distribute this message or its contents or enclosures to any other person and any such actions may be unlawful. Ball reserves the right to monitor and review all messages and enclosures sent to or from this email address. -------------- next part -------------- An HTML attachment was scrubbed... URL: From erdwin.lianata at yahoo.com.sg Mon Aug 11 00:26:14 2008 From: erdwin.lianata at yahoo.com.sg (Erdwin Lianata) Date: Mon, 11 Aug 2008 11:26:14 +0700 Subject: [fxruby-users] is there a memory limitation on fxruby-mswin32 ? Message-ID: <489FBF66.6070202@yahoo.com.sg> Hi All, I wonder is there a memory limitation on fxruby-mswin32 ? I build an application which uses a lot of checkboxes, it seems running well on Linux...but it crashes on Windows. Would you please try to run the following code... ========= HERE IS THE CODE ======== require 'fox16' include Fox class CheckersView < FXMatrix def initialize(parent) super(parent, 10, :opts => MATRIX_BY_COLUMNS) 5.times { 10.times { FXCheckButton.new(self, '', :opts => LAYOUT_FILL_X|LAYOUT_FILL_Y) } } end end class TestView < FXMainWindow def initialize(app) super(app, 'Test Memory App', :opts => DECOR_ALL, :width => 600, :height => 600) vframe = FXVerticalFrame.new(self, LAYOUT_FILL) FXButton.new(vframe, 'Add') do |button| button.connect(SEL_COMMAND) do add_table(@frame, true) @frame.parent.layout puts "add_table" end end @counter = 1 FXScrollWindow.new(vframe, LAYOUT_FILL) do |scroll| @frame = FXVerticalFrame.new(scroll, LAYOUT_FILL) 93.times { add_table(@frame) } end end def add_table(table_parent, with_create=false) vframe = FXVerticalFrame.new(table_parent) label = FXLabel.new(vframe, @counter.to_s) matrix = FXMatrix.new(vframe, 3, :opts => MATRIX_BY_COLUMNS) CheckersView.new(matrix) FXVerticalFrame.new(matrix) CheckersView.new(matrix) vframe.create if with_create @counter += 1 end def create super show(PLACEMENT_SCREEN) end end FXApp.new do |app| TestView.new(app) app.create app.run end ========= END OF CODE ======== Here I create 93 rows whose each row has 2 table and each table consists of 50 checkboxes. At the topmost of window is a button that is intended to add a new row. The application will crash if the total of rows reach 95. Sometimes it gives a "[BUG] Segmentation fault" messsage which points to FXMatrix's constructor (kwargs.rb). But sometimes it will silently hang, at this moment you can check that the output of "add_table" isn't printed even though the button was clicked. My Windows spesifications are RubyOneClickInstaller-1.8.26 and lib FXRuby-1.6.12 which come along with the installer. I can run the code on Linux, I even can test it with given 150 rows and it's still running well. My Linux specifications are Ruby-1.8.5 and installed gem fxruby-1.6.15. Any workaround for this issue? Thanks, Erdwin From lyle at lylejohnson.name Mon Aug 11 08:21:15 2008 From: lyle at lylejohnson.name (Lyle Johnson) Date: Mon, 11 Aug 2008 07:21:15 -0500 Subject: [fxruby-users] is there a memory limitation on fxruby-mswin32 ? In-Reply-To: <489FBF66.6070202@yahoo.com.sg> References: <489FBF66.6070202@yahoo.com.sg> Message-ID: <8688D4FB-33B3-4AB4-98B3-81B9B3D05D77@lylejohnson.name> On Aug 10, 2008, at 11:26 PM, Erdwin Lianata wrote: > I wonder is there a memory limitation on fxruby-mswin32 ? > I build an application which uses a lot of checkboxes, it seems > running > well on Linux...but it crashes on Windows. > Here I create 93 rows whose each row has 2 table and each table > consists > of 50 checkboxes. At the topmost of window is a button that is > intended > to add a new row. The application will crash if the total of rows > reach 95. > Sometimes it gives a "[BUG] Segmentation fault" messsage which > points to > FXMatrix's constructor (kwargs.rb). But sometimes it will silently > hang, > at this moment you can check that the output of "add_table" isn't > printed even though the button was clicked. There is no limitation in the FXRuby code, but you may be running into some limitation of the Windows OS; see for example this article: http://support.microsoft.com/kb/327699 Let's focus on the add_table() method from your program: def add_table(table_parent, with_create=false) vframe = FXVerticalFrame.new(table_parent) label = FXLabel.new(vframe, @counter.to_s) matrix = FXMatrix.new(vframe, 3, :opts => MATRIX_BY_COLUMNS) CheckersView.new(matrix) FXVerticalFrame.new(matrix) CheckersView.new(matrix) vframe.create if with_create @counter += 1 end Each CheckersView uses up 51 windows handles (one for the matrix, plus 50 more for the checkboxes). In add_table() I see: vframe (1) + label (1) + matrix (1) + CheckersView (51) + vertical frame (1) + CheckersView (51) = 106 So that makes 106 window handles used per call to add_table(), and if we call it 93 times: 106*93 = 9,858 window handles which is awfully close to the 10,000 handles limit mentioned in the article that I linked to. > Any workaround for this issue? I'm having trouble imagining why you'd want 930 checkboxes on the screen at the same time; that seems like an awful lot of information to present to the user at once. If there's some way to restructure the user interface so that you can create some of those checkboxes on demand, and show them only when they're actually needed. Hope this helps, Lyle --- "FXRuby: Create Lean and Mean GUIs with Ruby" Now available from the Pragmatic Bookshelf! http://www.pragprog.com/titles/fxruby From erdwin.lianata at yahoo.com.sg Tue Aug 12 05:11:48 2008 From: erdwin.lianata at yahoo.com.sg (Erdwin Lianata) Date: Tue, 12 Aug 2008 16:11:48 +0700 Subject: [fxruby-users] is there a memory limitation on fxruby-mswin32 ? In-Reply-To: <8688D4FB-33B3-4AB4-98B3-81B9B3D05D77@lylejohnson.name> References: <489FBF66.6070202@yahoo.com.sg> <8688D4FB-33B3-4AB4-98B3-81B9B3D05D77@lylejohnson.name> Message-ID: <48A153D4.2010801@yahoo.com.sg> Lyle Johnson wrote: > I'm having trouble imagining why you'd want 930 checkboxes on the screen > at the same time; that seems like an awful lot of information to present > to the user at once. If there's some way to restructure the user > interface so that you can create some of those checkboxes on demand, and > show them only when they're actually needed. Thanks Lyle, it solves my problem at this moment (though only 18,000 maximum number of handles is supported by the hotfix). Since I'm not a Windows user, I thought that problem was a portability issue of fxruby. Anyway, I'm actually creating an statistical application that needs a set of checkboxes to give user a table-like input (only on/off switch) to filter out each computation result. That's why I need to create a lot of checkboxes at the same time, it's not possible to show only partial of them. I have one more question, is there a way to remove "handle" for a widget? Widgets such as label, vertical/horizontal frame, and only-display widgets no need to receive a user response (in my app). So I can reduce the number of handle. Thanks, Erdwin From wayne.vovil at gmail.com Tue Aug 12 05:49:11 2008 From: wayne.vovil at gmail.com (Wayne Vovil) Date: Tue, 12 Aug 2008 19:49:11 +1000 Subject: [fxruby-users] dilbert.rb Message-ID: Hi I am able to run all the contents of the FXRuby Lean and Mean book; but when I download dilbert.rb from fxruby site and run (after installing hpricot as a gem) I get an error as below: dilbert.rb:46:in `image_data': undefined method `[]' for nil:NilClass (NoMethodError) from dilbert.rb:37:in `initialize' from dilbert.rb:60:in `new' from dilbert.rb:60 As a novice I cannot work out what is wrong. Any ideas please? Cheers Wayne Sydney Australia -------------- next part -------------- An HTML attachment was scrubbed... URL: From lyle at lylejohnson.name Tue Aug 12 10:25:43 2008 From: lyle at lylejohnson.name (Lyle Johnson) Date: Tue, 12 Aug 2008 09:25:43 -0500 Subject: [fxruby-users] is there a memory limitation on fxruby-mswin32 ? In-Reply-To: <48A153D4.2010801@yahoo.com.sg> References: <489FBF66.6070202@yahoo.com.sg> <8688D4FB-33B3-4AB4-98B3-81B9B3D05D77@lylejohnson.name> <48A153D4.2010801@yahoo.com.sg> Message-ID: <57cf8f720808120725w2ca02d7ai9710a30896c82f09@mail.gmail.com> On Tue, Aug 12, 2008 at 4:11 AM, Erdwin Lianata wrote: > I have one more question, is there a way to remove "handle" for a widget? > Widgets such as label, vertical/horizontal frame, and only-display widgets > no need to receive a user response (in my app). So I can reduce the number > of handle. No. Even windows that are display-only (like labels and frames) always have an associated window handle. From datatec at gmail.com Tue Aug 12 12:26:49 2008 From: datatec at gmail.com (datatec) Date: Tue, 12 Aug 2008 12:26:49 -0400 Subject: [fxruby-users] dilbert.rb In-Reply-To: References: Message-ID: I know the script had been broken on the fxruby site. (don't know if this is the same one as in the book though) It broke because the dilbert site changed. I updated the script from the fxruby side a while ago since I run this script daily. Not sure if this will fix you the issue you are having, but it runs here fine for me. #################################################### #!/usr/bin/env ruby require 'fox16' require 'open-uri' begin require 'hpricot' rescue LoadError require 'fox16/missingdep' MSG = < DECOR_ALL, :width => 850, :height => 600, :padLeft => 0, :padRight => 0) # Sunken border for image widget imagebox = FXHorizontalFrame.new(self, FRAME_SUNKEN|FRAME_THICK|LAYOUT_FILL_X|LAYOUT_FILL_Y) # Make image widget @imageview = FXImageView.new(imagebox, :opts => LAYOUT_FILL_X|LAYOUT_FILL_Y|HSCROLLER_NEVER|VSCROLLER_NEVER) # Construct a GIF image and store it in the image viewer @imageview.image = FXGIFImage.new(getApp(), image_data) # Resize main window client area to fit image size resize(@imageview.contentWidth + 12, @imageview.contentHeight + 12) # added the + part because clipping the copywrite info and the right side of the frame end def image_data doc = Hpricot(open("http://www.dilbert.com/")) #url = doc.search("img").find { |e| e['alt'] =~ /Today's Comic/ } #note need to update this since the comic page changed url = doc.search("img").find { |e| e['src'] =~ /\/dyn\/str_strip\/.*\.gif/ } #This is the updated search 2008-04-22 #puts url open("http://www.dilbert.com" + url['src'], "rb").read end def create super show(PLACEMENT_SCREEN) end end if __FILE__ == $0 # Make application application = FXApp.new("DailyDilbert", "FoxTest") # Make window window = DailyDilbert.new(application) # Create it application.create # Run application.run end #################################################### datatec On Tue, Aug 12, 2008 at 5:49 AM, Wayne Vovil wrote: > Hi > > I am able to run all the contents of the FXRuby Lean and Mean book; but > when I download dilbert.rb from fxruby site and run (after installing > hpricot as a gem) I get an error as below: > > dilbert.rb:46:in `image_data': undefined method `[]' for nil:NilClass > (NoMethodError) > from dilbert.rb:37:in `initialize' > from dilbert.rb:60:in `new' > from dilbert.rb:60 > > As a novice I cannot work out what is wrong. Any ideas please? > > Cheers > > Wayne > Sydney Australia > > _______________________________________________ > fxruby-users mailing list > fxruby-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/fxruby-users > -------------- next part -------------- An HTML attachment was scrubbed... URL: From lyle at lylejohnson.name Tue Aug 12 13:00:27 2008 From: lyle at lylejohnson.name (Lyle Johnson) Date: Tue, 12 Aug 2008 12:00:27 -0500 Subject: [fxruby-users] dilbert.rb In-Reply-To: References: Message-ID: <57cf8f720808121000r13c2ae48v364e33f7708f9cde@mail.gmail.com> On Tue, Aug 12, 2008 at 11:26 AM, datatec wrote: > I know the script had been broken on the fxruby site. (don't know if this is > the same one as in the book though) > > It broke because the dilbert site changed. > > I updated the script from the fxruby side a while ago since I run this > script daily. > > Not sure if this will fix you the issue you are having, but it runs here > fine for me. Thanks for the patch! I'll file a bug report and see if I can add this in the next release. From philippe.lang at attiksystem.ch Tue Aug 12 11:21:39 2008 From: philippe.lang at attiksystem.ch (Philippe Lang) Date: Tue, 12 Aug 2008 17:21:39 +0200 Subject: [fxruby-users] is there a memory limitation on fxruby-mswin32 ? References: <489FBF66.6070202@yahoo.com.sg><8688D4FB-33B3-4AB4-98B3-81B9B3D05D77@lylejohnson.name> <48A153D4.2010801@yahoo.com.sg> Message-ID: fxruby-users-bounces at rubyforge.org wrote: > Lyle Johnson wrote: >> I'm having trouble imagining why you'd want 930 checkboxes on the >> screen at the same time; that seems like an awful lot of information >> to present to the user at once. If there's some way to restructure >> the user interface so that you can create some of those checkboxes on >> demand, and show them only when they're actually needed. > > Thanks Lyle, it solves my problem at this moment (though only 18,000 > maximum number of handles is supported by the hotfix). Since I'm not > a Windows user, I thought that problem was a portability issue of > fxruby. > > Anyway, I'm actually creating an statistical application that needs a > set of checkboxes to give user a table-like input (only on/off > switch) to filter out each computation result. That's why I need to > create a lot of checkboxes at the same time, it's not possible to > show only partial of them. Hi, Instead of creating so many checkboxes, you could maybe use an FXTable object, and process the clicks inside cells in order to toggle an icon inside. That's a little more work, but you shouldn't have any limitation in this case. That's what I do in my framework. Regards, Philippe Lang From pijnacker at dse.nl Wed Aug 13 12:58:18 2008 From: pijnacker at dse.nl (Ronald Pijnacker) Date: Wed, 13 Aug 2008 18:58:18 +0200 Subject: [fxruby-users] FXRuby and clipboard Message-ID: <4E9CA720-7ED1-4F90-91CE-DD4641F5DA46@dse.nl> Hi all, While studying the clipboard example, I got the feeling that things look more complicated than necessary. What I would like to do is just push some data onto the clipboard and forget about it. However, when I try that, it does not seem to work. Only when I _also_ connect to the SEL_CLIPBOARD_REQUESTED the data gets copied to the other app. Could someone provide a simple example on how to push data to the clipboard during the handling of a button event? Thanks, Ronald From rovshanb at gmail.com Mon Aug 18 07:52:26 2008 From: rovshanb at gmail.com (Rovshan Baghirov) Date: Mon, 18 Aug 2008 16:52:26 +0500 Subject: [fxruby-users] FXRuby FXScintilla question Message-ID: <1219060346.12204.8.camel@rovshan-laptop-0> Hello, I have started learning FXRuby about 2 weeks ago. Now I'm trying to launch the scintilla_test.rb from the fxruby-1.6 installation directory (/usr/lib/ruby/gems/1.8/gems/fxruby-1.6.16/examples) and get this error: /usr/lib/ruby/gems/1.8/gems/fxruby-1.6.16/lib/fox16/kwargs.rb:2007:in `old_initialize': wrong number of arguments (8 for 0) (ArgumentError) from /usr/lib/ruby/gems/1.8/gems/fxruby-1.6.16/lib/fox16/kwargs.rb:2007:in `initialize' from -:32:in `new' from -:32:in `initialize' from -:75:in `new' from -:75 Exited: 256 I'm on Ubuntu 8.04 and I installed libfxscintilla17 and libfxscintilla-dev from Synaptic. When I change line 2007 in kwargs.rb to old_initialize() the application starts but without the editor. How can I fix this error? Thanks in advance, Rovshan From AEtzold at gmx.de Tue Aug 19 05:26:07 2008 From: AEtzold at gmx.de (Axel Etzold) Date: Tue, 19 Aug 2008 11:26:07 +0200 Subject: [fxruby-users] accented letters In-Reply-To: <1219103174.6209.54.camel@caipora> References: <1219073107.6209.22.camel@caipora> <20080818214749.243320@gmx.net> <1219096908.6209.40.camel@caipora> <20080818222530.243290@gmx.net> <1219103174.6209.54.camel@caipora> Message-ID: <20080819092607.42690@gmx.net> -------- Original-Nachricht -------- > Datum: Tue, 19 Aug 2008 08:42:55 +0900 > Von: angico > An: ruby-talk at ruby-lang.org > Betreff: Re: accented letters > Em Ter, 2008-08-19 ?s 07:22 +0900, Axel Etzold escreveu: > > > Dear Angico, > > > > sorry, I misunderstood. You mean that you want to interact dynamically > with > > FXRuby in some way, like ask the user some question and have the user's > > answer displayed ? > > It seems that depending on what OS you use, you can define a connection > key (on the system, > > not in Ruby or FXRuby) so that accent+key are drawn together ... see > here for Ubuntu: > > > > http://ubuntuforums.org/archive/index.php/t-779463.html > > > > To me ( I am not Brazilian or Portuguese) , the problem you are > experiencing is somewhat surprising, as for instance in French or German, there are > special keys that allow you to enter the whole letter in one go ... but > the French don't have the tilde letters ~a and ~o .... > > maybe general Portuguese language programming forums can help you if the > connection-key hint doesn't work ... > > I'd nevertheless like to know if it does. > > > > Best regards, > > > > Axel > > Hi, Axel. > > I use Ubuntu Linux 8.04. All the applications I have installed on my > system work fine (OpenOffice.org does, JEdit does, Eclipse does, > Evolution does, etc.) > > The only one that refuses to "understand" the key combinations is > exactly this one I'm working on: An FXRuby application. Also, as I > already stated, the application can display the text correctly. It just > can't make the combination. > > So, I guess the problem is with Ruby. > > The brazilian ABNT2 keyboard has only one special key: ?. The remaining > accented letters must be typed as a combination of a dead key (the > accent) followed by the actual letter key, as in ~a, which gives an ?. > But FXRuby's controls still don't accept or understand them. > > Regards, > > -- > angico > ------ > home page: www.angico.org > Gnu/Linux, FLOSS, Espiritismo, e eu por mim mesmo 8^I > ------ > contatos: > email: angico at angico.org > skype: angico00 > ------ > Dear Angico, dear all, I have switched my keyboard layout to Brazilian and I can confirm your FXRuby accent entering troubles. However, I am not sure whether the missing touch is in the Ruby camp rather than in FXRuby's. When I tried some alternative GUI toolkit : http://code.whytheluckystiff.net/shoes/wiki/DownloadShoes (If you get an error missing -lruby, see here: http://code.whytheluckystiff.net/list/shoes/2008/06/28/2998-re-error-make-returns-usr-bin-ld-cannot-find-lruby.html) I could enter Brazilian accents in the reminder application in the sample directory of shoes. This is due to the fact that shoes uses the pango library (http://www.pango.org/) for internationalization. Now, on their page, they talk about integration with the GTK2 GUI toolkit, which, of course, isn't the same as FOX, on which FXRuby builds. As I am not an expert about the intricacies of using pango (or some equivalent) with Fox/FXRuby, I am just CC'ing this message to the fxruby list. Best regards, Axel -- Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen! Ideal f?r Modem und ISDN: http://www.gmx.net/de/go/smartsurfer From lyle at lylejohnson.name Tue Aug 19 16:01:27 2008 From: lyle at lylejohnson.name (Lyle Johnson) Date: Tue, 19 Aug 2008 15:01:27 -0500 Subject: [fxruby-users] accented letters In-Reply-To: <1219173916.7657.15.camel@caipora> References: <1219073107.6209.22.camel@caipora> <20080818214749.243320@gmx.net> <1219096908.6209.40.camel@caipora> <57cf8f720808190608k2bf83f56hb0dbd08bce52e5b0@mail.gmail.com> <1219173916.7657.15.camel@caipora> Message-ID: <57cf8f720808191301l2cda18bcs3228feacecdfcfb6@mail.gmail.com> On Tue, Aug 19, 2008 at 2:21 PM, angico wrote: > So, where can I find that FOX mailing list? Here's the information: http://www.fox-toolkit.org/home.html#MAILINGLIST Hope this helps, Lyle From rovshanb at gmail.com Wed Aug 20 07:10:20 2008 From: rovshanb at gmail.com (Rovshan Baghirov) Date: Wed, 20 Aug 2008 16:10:20 +0500 Subject: [fxruby-users] FXTable scrolling problem Message-ID: <2427e580808200410v502e2e56r1da8997a1da6b85f@mail.gmail.com> Hi, I'm trying to accomplish the following task: 1) Query database for records 2) Populate FXTable with first 50 records from cursor 3) Populate more rows as the table scrolls down To accomplish this I subclassed FXTable (class Table < FXTable) and defined the initialize method as shown below: def initialize(parent) super(parent, :opts=>LAYOUT_FILL|TABLE_COL_SIZABLE|TABLE_ROW_SIZABLE, :padding => 2) self.editable=false setBackColor(FXRGB(255, 255, 255)) setCellColor(1, 0, FXRGB(240, 255, 240)) setCellColor(1, 1, FXRGB(240, 255, 240)) rowHeader.width=30 verticalScrollBar.connect(SEL_COMMAND, method(:table_scrolled)) end I also defined the table_scrolled method as below to check that the event gets handled: def table_scrolled(sender, selector, data) puts "table scrolled to #{data}" end Now when I start the application, populate the table with records (50 records) following happens: - when I scroll the mouse wheel the scroll bar changes its position and I get the output from the event handler but the records in table do not get scrolled - the same happens when I click the scroll bar to change its position - when I click on a table and start scrolling it using down arrow on keyboard everything works ok, but this time the event handler does not get called. Could you please, help me to fix this problem? Thanks, Rovshan -------------- next part -------------- An HTML attachment was scrubbed... URL: From lyle at lylejohnson.name Fri Aug 22 12:16:40 2008 From: lyle at lylejohnson.name (Lyle Johnson) Date: Fri, 22 Aug 2008 11:16:40 -0500 Subject: [fxruby-users] FXRuby FXScintilla question In-Reply-To: <1219060346.12204.8.camel@rovshan-laptop-0> References: <1219060346.12204.8.camel@rovshan-laptop-0> Message-ID: <0313FAF3-648A-47B2-9E71-F6E5467032E4@lylejohnson.name> On Aug 18, 2008, at 6:52 AM, Rovshan Baghirov wrote: > I have started learning FXRuby about 2 weeks ago. Now I'm trying to > launch the scintilla_test.rb from the fxruby-1.6 installation > directory > (/usr/lib/ruby/gems/1.8/gems/fxruby-1.6.16/examples) and get this > error: /usr/lib/ruby/gems/1.8/gems/fxruby-1.6.16/lib/fox16/kwargs.rb: > 2007:in `old_initialize': wrong number of arguments (8 for 0) > (ArgumentError) > > from /usr/lib/ruby/gems/1.8/gems/fxruby-1.6.16/lib/fox16/kwargs.rb: > 2007:in `initialize' > from -:32:in `new' > from -:32:in `initialize' > from -:75:in `new' > from -:75 > > Exited: 256 > > I'm on Ubuntu 8.04 and I installed libfxscintilla17 and > libfxscintilla-dev from Synaptic. I can't reproduce the error here, but based on your description it sounds as though your FXRuby wasn't compiled with support for FXScintilla. If the FXScintilla packages weren't actually installed when you installed the FXRuby gem, it wouldn't have built-in the additional support for FXScintilla. I would suggest uninstalling, and then re-installing, the FXRuby gem, to see if that fixes it. Hope this helps, Lyle --- "FXRuby: Create Lean and Mean GUIs with Ruby" Now available from the Pragmatic Bookshelf! http://www.pragprog.com/titles/fxruby From rovshanb at gmail.com Mon Aug 25 00:50:20 2008 From: rovshanb at gmail.com (Rovshan Baghirov) Date: Mon, 25 Aug 2008 09:50:20 +0500 Subject: [fxruby-users] FXRuby FXScintilla question In-Reply-To: <0313FAF3-648A-47B2-9E71-F6E5467032E4@lylejohnson.name> References: <1219060346.12204.8.camel@rovshan-laptop-0> <0313FAF3-648A-47B2-9E71-F6E5467032E4@lylejohnson.name> Message-ID: <2427e580808242150t6b82a9b5l1b3e81fc96dbda7b@mail.gmail.com> Thank you for response. I will try it. Thanks, Rovshan On Fri, Aug 22, 2008 at 9:16 PM, Lyle Johnson wrote: > > On Aug 18, 2008, at 6:52 AM, Rovshan Baghirov wrote: > > I have started learning FXRuby about 2 weeks ago. Now I'm trying to >> launch the scintilla_test.rb from the fxruby-1.6 installation directory >> (/usr/lib/ruby/gems/1.8/gems/fxruby-1.6.16/examples) and get this >> error: >> /usr/lib/ruby/gems/1.8/gems/fxruby-1.6.16/lib/fox16/kwargs.rb:2007:in >> `old_initialize': wrong number of arguments (8 for 0) (ArgumentError) >> >> from /usr/lib/ruby/gems/1.8/gems/fxruby-1.6.16/lib/fox16/kwargs.rb:2007:in >> `initialize' >> from -:32:in `new' >> from -:32:in `initialize' >> from -:75:in `new' >> from -:75 >> >> Exited: 256 >> >> I'm on Ubuntu 8.04 and I installed libfxscintilla17 and >> libfxscintilla-dev from Synaptic. >> > > I can't reproduce the error here, but based on your description it sounds > as though your FXRuby wasn't compiled with support for FXScintilla. If the > FXScintilla packages weren't actually installed when you installed the > FXRuby gem, it wouldn't have built-in the additional support for > FXScintilla. I would suggest uninstalling, and then re-installing, the > FXRuby gem, to see if that fixes it. > > Hope this helps, > > Lyle > > --- > "FXRuby: Create Lean and Mean GUIs with Ruby" > Now available from the Pragmatic Bookshelf! > http://www.pragprog.com/titles/fxruby > > > > > > _______________________________________________ > fxruby-users mailing list > fxruby-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/fxruby-users > -------------- next part -------------- An HTML attachment was scrubbed... URL: From rovshanb at gmail.com Mon Aug 25 08:19:58 2008 From: rovshanb at gmail.com (Rovshan Baghirov) Date: Mon, 25 Aug 2008 17:19:58 +0500 Subject: [fxruby-users] FXRuby FXScintilla question In-Reply-To: <0313FAF3-648A-47B2-9E71-F6E5467032E4@lylejohnson.name> References: <1219060346.12204.8.camel@rovshan-laptop-0> <0313FAF3-648A-47B2-9E71-F6E5467032E4@lylejohnson.name> Message-ID: <2427e580808250519w1173ff81y89d4425d32df60d5@mail.gmail.com> I downloaded and built fxscintilla and fxruby from sources and now everything works correctly. Thank you, Rovshan On Fri, Aug 22, 2008 at 9:16 PM, Lyle Johnson wrote: > > On Aug 18, 2008, at 6:52 AM, Rovshan Baghirov wrote: > > I have started learning FXRuby about 2 weeks ago. Now I'm trying to >> launch the scintilla_test.rb from the fxruby-1.6 installation directory >> (/usr/lib/ruby/gems/1.8/gems/fxruby-1.6.16/examples) and get this >> error: >> /usr/lib/ruby/gems/1.8/gems/fxruby-1.6.16/lib/fox16/kwargs.rb:2007:in >> `old_initialize': wrong number of arguments (8 for 0) (ArgumentError) >> >> from /usr/lib/ruby/gems/1.8/gems/fxruby-1.6.16/lib/fox16/kwargs.rb:2007:in >> `initialize' >> from -:32:in `new' >> from -:32:in `initialize' >> from -:75:in `new' >> from -:75 >> >> Exited: 256 >> >> I'm on Ubuntu 8.04 and I installed libfxscintilla17 and >> libfxscintilla-dev from Synaptic. >> > > I can't reproduce the error here, but based on your description it sounds > as though your FXRuby wasn't compiled with support for FXScintilla. If the > FXScintilla packages weren't actually installed when you installed the > FXRuby gem, it wouldn't have built-in the additional support for > FXScintilla. I would suggest uninstalling, and then re-installing, the > FXRuby gem, to see if that fixes it. > > Hope this helps, > > Lyle > > --- > "FXRuby: Create Lean and Mean GUIs with Ruby" > Now available from the Pragmatic Bookshelf! > http://www.pragprog.com/titles/fxruby > > > > > > _______________________________________________ > fxruby-users mailing list > fxruby-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/fxruby-users > -------------- next part -------------- An HTML attachment was scrubbed... URL: From rovshanb at gmail.com Tue Aug 26 02:59:49 2008 From: rovshanb at gmail.com (Rovshan Baghirov) Date: Tue, 26 Aug 2008 11:59:49 +0500 Subject: [fxruby-users] FXScintilla example? Message-ID: <2427e580808252359w741879a8x7bb82ce1a945e559@mail.gmail.com> Hello, I have searched for FXScintilla examples (could not find examples on websites, only FreeRIDE and Mondrian) and also read the documentation at scintilla.org but I'm unable to make a simple example work. I'm trying to enable the sql language highlighting using this code: class Editor < FXScintilla def initialize(*args) super setMarginWidthN(0, 30) setTabWidth(4) setIndentationGuides(true) setLexer(FXScintilla::SCLEX_SQL) puts "Lexer: "+getLexer().to_s #----> this line outputs 7 end end Could you please, give me some directions about the steps required to get it working? Thanks in advance, Rovshan -------------- next part -------------- An HTML attachment was scrubbed... URL: From angico at angico.org Tue Aug 26 04:21:47 2008 From: angico at angico.org (angico) Date: Tue, 26 Aug 2008 05:21:47 -0300 Subject: [fxruby-users] changing FXTextField default behavior Message-ID: <1219738907.6079.19.camel@pirilampo> Hi, Is it possible to change the data from an event, SEL_KEYPRESS or SEL_KEYRELEASE or the like, in order to, say, randomly change the codes of each keystroke? If it is, how could I achieve this? I've tried this: text = FXTextField.new(self, 20) text.connect(SEL_KEYPRESS, method(:changeText)) ... def changeText(sender, selector, data) A = 'A'.sum 0 Z = 'Z'.sum 0 a = 'a'.sum 0 z = 'z'.sum 0 c = data.code case c when A .. Z c = rand(25) + A when a .. z c = rand(25) + a end if c != data.code data.code = c end false end But it doesn't work, and if I type in "hello", that's exactly what I see in the control. So, again, is it possible to change that data? Thank you, -- angico ------ home page: www.angico.org Gnu/Linux, FLOSS, Espiritismo, e eu por mim mesmo 8^I ------ contatos: email: angico at angico.org skype: angico00 ------ From jeroen at fox-toolkit.org Tue Aug 26 22:17:52 2008 From: jeroen at fox-toolkit.org (Jeroen van der Zijp) Date: Tue, 26 Aug 2008 21:17:52 -0500 Subject: [fxruby-users] changing FXTextField default behavior In-Reply-To: <1219738907.6079.19.camel@pirilampo> References: <1219738907.6079.19.camel@pirilampo> Message-ID: <200808262117.53204.jeroen@fox-toolkit.org> On Tuesday 26 August 2008, angico wrote: > Hi, > > Is it possible to change the data from an event, SEL_KEYPRESS or > SEL_KEYRELEASE or the like, in order to, say, randomly change the codes > of each keystroke? > > If it is, how could I achieve this? > > I've tried this: > > text = FXTextField.new(self, 20) > text.connect(SEL_KEYPRESS, method(:changeText)) > ... > def changeText(sender, selector, data) > A = 'A'.sum 0 > Z = 'Z'.sum 0 > a = 'a'.sum 0 > z = 'z'.sum 0 > > c = data.code > > case c > when A .. Z > c = rand(25) + A > when a .. z > c = rand(25) + a > end > > if c != data.code > data.code = c > end > > false > end > > But it doesn't work, and if I type in "hello", that's exactly what I see > in the control. > > So, again, is it possible to change that data? When you intercept SEL_KEYPRESS, the keysym is passed to FXEvent.code and the translated text is in FXEvent.text. If the .code represents an editing command, the .text member is disregarded; but if the .code is a regular character, the string which is the translation of the [sequence of] keysyms is inserted. This way, input methods can be used to insert text while regular editing commands still work normally. - Jeroen -- +----------------------------------------------------------------------------+ | Copyright (C) 21:10 08/26/2008 Jeroen van der Zijp. All Rights Reserved. | +----------------------------------------------------------------------------+ From rovshanb at gmail.com Wed Aug 27 01:01:16 2008 From: rovshanb at gmail.com (Rovshan Baghirov) Date: Wed, 27 Aug 2008 10:01:16 +0500 Subject: [fxruby-users] FXScintilla example? In-Reply-To: <2427e580808252359w741879a8x7bb82ce1a945e559@mail.gmail.com> References: <2427e580808252359w741879a8x7bb82ce1a945e559@mail.gmail.com> Message-ID: <2427e580808262201v24b67828o87f1f772ec75a187@mail.gmail.com> I'm sorry for dummy question. Next time I'll search a little more before posting. I found how to do it. On Tue, Aug 26, 2008 at 11:59 AM, Rovshan Baghirov wrote: > Hello, > > I have searched for FXScintilla examples (could not find examples on > websites, only FreeRIDE and Mondrian) and also read the documentation at > scintilla.org but I'm unable to make a simple example work. > I'm trying to enable the sql language highlighting using this code: > > class Editor < FXScintilla > def initialize(*args) > super > setMarginWidthN(0, 30) > setTabWidth(4) > setIndentationGuides(true) > setLexer(FXScintilla::SCLEX_SQL) > > puts "Lexer: "+getLexer().to_s #----> this line outputs 7 > end > end > > Could you please, give me some directions about the steps required to get > it working? > > Thanks in advance, > Rovshan > -------------- next part -------------- An HTML attachment was scrubbed... URL: