From fkchang2000 at yahoo.com Fri Jan 6 17:37:52 2006 From: fkchang2000 at yahoo.com (Forrest Chang) Date: Fri, 6 Jan 2006 14:37:52 -0800 (PST) Subject: [fxruby-users] dynamically changing dialogs Message-ID: <20060106223752.38626.qmail@web82007.mail.mud.yahoo.com> Hi All: I want to dynamically change a subclass of FXDialogBox after it'd been displayed. I did some googling and found that widget.create solves the problem on FXMainWindow, but does not seem to do the same with an FXDialogBox. I have a code sample that creats a main window with a button to display a simplified dialog which adds 2 "entries" to itself in initialize() and gives a button to add additional entries. The 2 buttons added in intialize work, but I can't see them added later. Any ideas? TIA Forrest -------------------------------- #!/usr/bin/env ruby require 'rubygems' require_gem 'fxruby' require 'fox12' include Fox class TestGui < FXDialogBox def add_entry( create) but = FXButton.new( @test_entries_frame, "foo") but.create if create # don't create when called in initialize end def initialize(owner) super(owner, "Test", DECOR_ALL, 0, 0, 600, 400) vframe = FXVerticalFrame.new( self,LAYOUT_FILL_X|LAYOUT_FILL_Y) FXButton.new( vframe, "Add Entry").connect(SEL_COMMAND) { # add entry with create add_entry( true) } @test_entries_frame = FXVerticalFrame.new( vframe, LAYOUT_FILL_X|LAYOUT_FILL_Y) # add entry without create add_entry( nil) add_entry( nil) show PLACEMENT_CURSOR end # initialize end # TestGui if $0 == __FILE__ app = FXApp.new( 'dynamic demo') mw = FXMainWindow.new( app, "dynamic demo", nil, nil, DECOR_ALL) FXButton.new( mw, "show selector").connect( SEL_COMMAND) { dg = TestGui.new( app) dg.execute } mw.show app.create app.run end From info at sten-net.de Sat Jan 7 10:17:21 2006 From: info at sten-net.de (Jannis Pohlmann) Date: Sat, 07 Jan 2006 16:17:21 +0100 Subject: [fxruby-users] dynamically changing dialogs In-Reply-To: <20060106223752.38626.qmail@web82007.mail.mud.yahoo.com> References: <20060106223752.38626.qmail@web82007.mail.mud.yahoo.com> Message-ID: <43BFDB81.3050605@sten-net.de> Forrest Chang schrieb: > Hi All: > > I want to dynamically change a subclass of > FXDialogBox after it'd been displayed. I did some > googling and found that widget.create solves the > problem on FXMainWindow, but does not seem to do the > same with an FXDialogBox. I have a code sample that > creats a main window with a button to display a > simplified dialog which adds 2 "entries" to itself in > initialize() and gives a button to add additional > entries. The 2 buttons added in intialize work, but I > can't see them added later. > > Any ideas? TIA Well, you always have to call recalc() on the parent window or the newly created widget in order to have it displayed. Regards, Jannis From sdruby at onlinehome.de Sat Jan 7 12:05:20 2006 From: sdruby at onlinehome.de (=?us-ascii?Q?Sascha_Dordelmann?=) Date: Sat, 7 Jan 2006 18:05:20 +0100 Subject: [fxruby-users] dynamically changing dialogs In-Reply-To: <43BFDB81.3050605@sten-net.de> Message-ID: Forrest Chang wrote: > I want to dynamically change a subclass of > FXDialogBox after it'd been displayed. I did some > googling and found that widget.create solves the > problem on FXMainWindow, but does not seem to do the > same with an FXDialogBox. I have a code sample that > creats a main window with a button to display a > simplified dialog which adds 2 "entries" to itself in > initialize() and gives a button to add additional > entries. The 2 buttons added in intialize work, but I > can't see them added later. I was able to add checkboxes dynamically in GongFox (http://hinterkattentuffel.de/gong/en/index.htm) but I can't tell you how to get rid of them later other than with the hide function. Sascha From boxofsoxx-goognews at yahoo.com Sat Jan 14 00:46:05 2006 From: boxofsoxx-goognews at yahoo.com (boxofsoxx-goognews@yahoo.com) Date: Fri, 13 Jan 2006 21:46:05 -0800 (PST) Subject: [fxruby-users] help, message passing Message-ID: <20060114054605.78802.qmail@web51603.mail.yahoo.com> What is the correct way to pass messages between windows. I am trying to create an edit dialog that allows you to edit and save a text field. The dialog called FXEditDialog is inherited from FXDialogBox, and has an FXText field, and three buttons, save cancel and OK. I don't know how to pass the message from the buttons back to the main window so that I can update the the field in the main window. I looked through the documentation and couldn't find any examples. Any help will be greatly appreciated. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/fxruby-users/attachments/20060113/de716a42/attachment.htm From vjoel at path.berkeley.edu Tue Jan 17 22:52:13 2006 From: vjoel at path.berkeley.edu (Joel VanderWerf) Date: Tue, 17 Jan 2006 19:52:13 -0800 Subject: [fxruby-users] help, message passing In-Reply-To: <20060114054605.78802.qmail@web51603.mail.yahoo.com> References: <20060114054605.78802.qmail@web51603.mail.yahoo.com> Message-ID: <43CDBB6D.40004@path.berkeley.edu> boxofsoxx-goognews at yahoo.com wrote: > What is the correct way to pass messages between windows. I am trying to create > an edit dialog that allows you to edit and save a text field. The dialog called > FXEditDialog is inherited from FXDialogBox, and has an FXText field, and three > buttons, save cancel and OK. I don't know how to pass the message from the > buttons back to the main window so that I can update the the field in the main > window. I looked through the documentation and couldn't find any examples. Any > help will be greatly appreciated. Can you just call #connect on each button, and give it a code block that sets the text of the field in the main window? -- vjoel : Joel VanderWerf : path berkeley edu : 510 665 3407 From boxofsoxx-goognews at yahoo.com Thu Jan 19 20:09:52 2006 From: boxofsoxx-goognews at yahoo.com (boxofsoxx-goognews@yahoo.com) Date: Thu, 19 Jan 2006 17:09:52 -0800 (PST) Subject: [fxruby-users] help, message passing Message-ID: <20060120010952.42784.qmail@web51613.mail.yahoo.com> ----- Original Message ----- From: "Joel VanderWerf" To: Sent: Tuesday, January 17, 2006 10:52 PM Subject: Re: [fxruby-users] help, message passing > boxofsoxx-goognews at yahoo.com wrote: >> What is the correct way to pass messages between windows. I am trying to create >> an edit dialog that allows you to edit and save a text field. The dialog called >> FXEditDialog is inherited from FXDialogBox, and has an FXText field, and three >> buttons, save cancel and OK. I don't know how to pass the message from the >> buttons back to the main window so that I can update the the field in the main >> window. I looked through the documentation and couldn't find any examples. Any >> help will be greatly appreciated. > > Can you just call #connect on each button, and give it a code block that > sets the text of the field in the main window? > > -- > vjoel : Joel VanderWerf : path berkeley edu : 510 665 3407 > _______________________________________________ Thanks for the response. This might work, but I am a bit confused as to how to pull it off. The edit window has the buttons and the new text. I am unsure how to use the button connected routine to update the main windows copy of the text. It seems like the child window will need to have access to the main windows variables, or the main window has to connect to the child window's buttons. Does the variable scope allow this? If this is the best route, than I can fuddle with it until I figure something out. It seems like there should be an easier way to do this. A lot of FX dialogs pass messages back to the main window, but these are all written in C. I haven't seen anyone construct a dialog strictly in FXRuby, but it seems like it should possible. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/fxruby-users/attachments/20060119/1dcac36d/attachment.htm From dragoncity at impulse.net.au Sun Jan 22 20:13:00 2006 From: dragoncity at impulse.net.au (brett s hallett) Date: Mon, 23 Jan 2006 12:13:00 +1100 Subject: [fxruby-users] setting default FONT for buttons . etc Message-ID: <1137978780.8706.4.camel@linux.site> I have just upgraded to FXRuby & FOX 1.4 'x' and discover that when I reload my programs using 'fox14' ( was 'fox12') the displayed FONT is not as it was. ie: very thin and washed out. Can anybody direct me to how I can set the default font ? Indeed can I set this in FXRuby or Fox, or is it better to set it in my pograms ? -- Yours, Brett From uwe.hartl at gmx.net Mon Jan 23 18:06:30 2006 From: uwe.hartl at gmx.net (Uwe Hartl) Date: Tue, 24 Jan 2006 00:06:30 +0100 Subject: [fxruby-users] FXTextField Message-ID: <200601240006.30681.uwe.hartl@gmx.net> Hallo, I am trying to insert text into an FXTextField. Unfortunately the TextField just shows Garbage. If I print (p garbage) the Garbage it says "\a" Why does it not say "dfdf" and show "dfdf" in the text field? Here is the code I use: @txt = FXTextField.new(hf, 10, nil, 0, opts= LAYOUT_FILL_X) @txt.handle(sender, FXSEL(FXTextField::SEL_COMMAND, FXTextField::ID_INSERT_STRING), "dfdf") I a confused. Please, can someone help? Thank you very much. Uwe -- *********************************************************************** Uwe Hartl e-mail: Uwe.Hartl at gmx.net 91522 Ansbach Telephone: (0981) 9724526 Am M?hlfeld 8 Notfall-Mobil: (0160)90418680 Germany *********************************************************************** From lyle at knology.net Mon Jan 23 18:18:35 2006 From: lyle at knology.net (lyle@knology.net) Date: 23 Jan 2006 23:18:35 -0000 Subject: [fxruby-users] FXTextField In-Reply-To: <> References: <> Message-ID: <20060123231835.25508.qmail@webmail1.knology.net> On Tue, 24 Jan 2006 00:06:30 +0100, Uwe Hartl wrote : > I am trying to insert text into an FXTextField. Unfortunately the TextField > just shows Garbage. If I print (p garbage) the Garbage it says "\a" > > Why does it not say "dfdf" and show "dfdf" in the text field? Here is the code > I use: > > @txt = FXTextField.new(hf, 10, nil, 0, opts= LAYOUT_FILL_X) > @txt.handle(sender, FXSEL(FXTextField::SEL_COMMAND, > FXTextField::ID_INSERT_STRING), "dfdf") > > I a confused. Please, can someone help? Uwe, What do you get when you just set the text directly, i.e. @txt.text = "dfdf" ? Lyle From lyle at knology.net Mon Jan 23 19:30:23 2006 From: lyle at knology.net (Lyle Johnson) Date: Mon, 23 Jan 2006 18:30:23 -0600 Subject: [fxruby-users] FXTextField In-Reply-To: <200601240046.28355.uwe.hartl@gmx.net> References: <> <20060123231835.25508.qmail@webmail1.knology.net> <200601240046.28355.uwe.hartl@gmx.net> Message-ID: On Jan 23, 2006, at 5:46 PM, Uwe Hartl wrote: > Than I get "dfdf" in the Textfield and the textfield contents is read > out as > "dfdf", too. And that was the desired result, right? From lyle at knology.net Mon Jan 23 20:46:06 2006 From: lyle at knology.net (Lyle Johnson) Date: Mon, 23 Jan 2006 19:46:06 -0600 Subject: [fxruby-users] setting default FONT for buttons . etc In-Reply-To: <1137978780.8706.4.camel@linux.site> References: <1137978780.8706.4.camel@linux.site> Message-ID: <8644faa95f8c0e33ba5a4d2a173a7ffe@knology.net> On Jan 22, 2006, at 7:13 PM, brett s hallett wrote: > I have just upgraded to FXRuby & FOX 1.4 'x' and discover that when I > reload my programs using 'fox14' ( was 'fox12') the displayed FONT is > not as it was. ie: very thin and washed out. > > Can anybody direct me to how I can set the default font ? Just set it before you start constructing any widgets and that should do the trick, e.g. app = FXApp.new(...) app.normalFont = FXFont.new(app, ...) MainWindow.new(app, ...) app.create app.run Hope this helps, Lyle From lyle at knology.net Tue Jan 24 10:33:38 2006 From: lyle at knology.net (Lyle Johnson) Date: Tue, 24 Jan 2006 09:33:38 -0600 Subject: [fxruby-users] [ANN] FXRuby 1.4.4 Now Available Message-ID: -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 All, FXRuby version 1.4.4 is now available for download from this page: http://rubyforge.org/frs/?group_id=300&release_id=4063 For a summary of the changes in this release, please see this page: http://www.fxruby.org/doc/changes.html As usual, the code is provided as a Win32 installer or a binary Gem (both compatible with the soon-to-be-available One-Click Installer for Ruby 1.8.4), as a source gem, and as a source tarball. For instructions on compiling FXRuby from source, please see: http://www.fxruby.org/doc/build.html And as always, the FXRuby home page is here: http://www.fxruby.org Enjoy, Lyle -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (Darwin) iD8DBQFD1kjSFXV/hD6oMd0RAsOuAJ9OqyYoK6efjtbYg0hnoYAtVCgbVwCggr6p EFTgRmPJioMSqqktN2xgMto= =SQ3M -----END PGP SIGNATURE----- From lyle at knology.net Tue Jan 24 13:05:01 2006 From: lyle at knology.net (Lyle Johnson) Date: Tue, 24 Jan 2006 12:05:01 -0600 Subject: [fxruby-users] FXTextField In-Reply-To: <200601241641.37929.uwe.hartl@gmx.net> References: <> <200601240046.28355.uwe.hartl@gmx.net> <200601241641.37929.uwe.hartl@gmx.net> Message-ID: On Jan 24, 2006, at 9:41 AM, Uwe Hartl wrote: > this is setting the text just right away. The point here is, that I > want the > text to be added at the position of the cursor. If I have "qwerty" in > the > text field and I put the cursor behind the "e" that I calll the method > with > "asdfg" I want the result to be "qweasdfgrty". This is what I thought > the > INSERT would do. Ah, OK. I have added this to the bug list and will try to get it fixed for the next release. I am actually surprised to see that Jeroen doesn't provide an API to (more directly) insert text into a text field as you can with the multiline FXText widget. From jeroen at fox-toolkit.org Tue Jan 24 13:24:24 2006 From: jeroen at fox-toolkit.org (Jeroen van der Zijp) Date: Tue, 24 Jan 2006 12:24:24 -0600 Subject: [fxruby-users] FXTextField In-Reply-To: References: <> <200601241641.37929.uwe.hartl@gmx.net> Message-ID: <200601241224.24724.jeroen@fox-toolkit.org> On Tuesday 24 January 2006 12:05 pm, Lyle Johnson wrote: > > On Jan 24, 2006, at 9:41 AM, Uwe Hartl wrote: > > > this is setting the text just right away. The point here is, that I > > want the > > text to be added at the position of the cursor. If I have "qwerty" in > > the > > text field and I put the cursor behind the "e" that I calll the method > > with > > "asdfg" I want the result to be "qweasdfgrty". This is what I thought > > the > > INSERT would do. > > Ah, OK. I have added this to the bug list and will try to get it fixed > for the next release. I am actually surprised to see that Jeroen > doesn't provide an API to (more directly) insert text into a text field > as you can with the multiline FXText widget. Its not there because text fields usually contain only a little text. Note that manipulation of strings is in FXString. So: field->setText(field->getText().insert(pos,"More text")); Should do the trick. I admit it is slightly more work, but up till now no one has never needed a specific API to do just this in FXTextField.... - Jeroen From lyle at knology.net Tue Jan 24 14:05:06 2006 From: lyle at knology.net (Lyle Johnson) Date: Tue, 24 Jan 2006 13:05:06 -0600 Subject: [fxruby-users] FXTextField In-Reply-To: <200601241931.45908.uwe.hartl@gmx.net> References: <> <200601241641.37929.uwe.hartl@gmx.net> <200601241931.45908.uwe.hartl@gmx.net> Message-ID: <65771f35b0f4db7c2230bf402bd80d15@knology.net> On Jan 24, 2006, at 12:31 PM, Uwe Hartl wrote: > Thanks, now I think I go a workaround, will see if I get the cursor > position > somehow out of the TextField. Say, is there somewhere better > documentation > for FXRuby than this webpage: > http://www.fxruby.org/1.2/doc/api/index.html > If I look at a class there, there are only a very few methods listed > which are > understood by the widget. If I do a Widget.public_methods.to_yaml I > get a > zillion of methods and I have to guess from the name what I need and > can only > try the real behavior of it. All of the methods that I consider to be part of the public API (e.g. for FXTextField) are documented in the RDoc documentation that you alluded to. Is it possible that public_methods is also showing you all of the widget's inherited methods as well (i.e. those defined in base classes)? If so, you'd need to check the base class' documentation for information for those. > The messages understood by the TextField I had > to Google for the information how this works. On the docs, the left > hand > uppper window with the file names, I don't know what this is good for, > these > do not tell me any information. On the right hand side, the Functions > window > also does not list all of the functions. What do I do wrong? Wich > documentation do you use? This is just the standard RDoc format, which has been a part of the standard Ruby library for a while now. The "Files" frame in the upper left hand corner lists all of the files that were processed to generate the documentation. The "Methods" frame in the upper right-hand corner lists methods but not attribute accessors; I'm not sure if there's a way to have RDoc generate those or not. From lyle at knology.net Tue Jan 24 15:43:17 2006 From: lyle at knology.net (Lyle Johnson) Date: Tue, 24 Jan 2006 14:43:17 -0600 Subject: [fxruby-users] FXTextField In-Reply-To: <200601242101.47660.uwe.hartl@gmx.net> References: <> <200601241931.45908.uwe.hartl@gmx.net> <65771f35b0f4db7c2230bf402bd80d15@knology.net> <200601242101.47660.uwe.hartl@gmx.net> Message-ID: <2aa5525b0d41321eb279eab42c649cdc@knology.net> On Jan 24, 2006, at 2:01 PM, Uwe Hartl wrote: > Yes, I think there are the inherited methods too. Some of them I find > in the > tree, others I don't. But the explaination that you only document the > ones > you consider to be part of the API, this explains the missing methods. OK. > Do I go correct in the assumption, that in new versions only the > documented API is > going to be compatible? This would forbid using the other methods and > attributes. Therefore I get the feeling that I better switch to FXText > for > the purpose I wanted to use FXTextField. FXText seems to deliver all I > can > think of... If I understand your question then the answer is yes, you should stick to using only the documented APIs for FXRuby. There are some things that you can still only do reliably when using the C++ library, such as the example you ran into (sending an ID_INSERT_STRING message directly to the widget). > I just checked, you are the guy who creates FXRuby! Thanks for the > work. You're welcome. ;) Jeroen van der Zijp, the creator of FOX, has done most of the hard work, but I'm glad to make his work available to the Ruby community too. > I am glad that you do it. I was trying to do the program I want in > Java first but > I had the feeling to fight against Java. I switched to ruby and I had > the > feeling Ruby fights with me... I like this, that you feel like Ruby is fighting with you and not against you. I need to remember that for the future when I talk to people about Java and Ruby. > I have choosen FX because it seemed to be less resource hungry and and > similar capable as the gtk stuff -- and it comes with > the "One click Installer" on Windows. I would be helpless to install > stuff on > Windows. Nothing is as easy as an "emerge fxruby"... > > Again, thank you for creating FXRuby. From lyle at knology.net Tue Jan 24 15:51:44 2006 From: lyle at knology.net (Lyle Johnson) Date: Tue, 24 Jan 2006 14:51:44 -0600 Subject: [fxruby-users] FXTextField In-Reply-To: <200601242137.44953.uwe.hartl@gmx.net> References: <> <200601241931.45908.uwe.hartl@gmx.net> <65771f35b0f4db7c2230bf402bd80d15@knology.net> <200601242137.44953.uwe.hartl@gmx.net> Message-ID: <7b39cb211ccf5456e37efdf06ddc1f52@knology.net> On Jan 24, 2006, at 2:37 PM, Uwe Hartl wrote: > it's me again. Now I changed the TextField to Text an try this: > > @txt = FXText.new(hf, nil, 0, opts= > LAYOUT_FILL_X|FRAME_SUNKEN|FRAME_THICK) > from the documentation I read > Attributes > visibleRows [RW] Number of visible rows [Integer] > > do I interpret this as a readable and writable attribute of FXText? If > I try: > > @txt.visibleRows = 1 > or > @txt.visibleRows= 1 > then I get > ./Dataviewclasses.rb:51:in `showQuery': undefined method `visibleRows=' > for :Fox::FXText (NoMethodError) I just tried a quick test with the latest releases of FXRuby (versions 1.2.6 and 1.4.4) and it worked fine. Do you know which version of FXRuby you're using? From lyle at knology.net Tue Jan 24 17:14:19 2006 From: lyle at knology.net (Lyle Johnson) Date: Tue, 24 Jan 2006 16:14:19 -0600 Subject: [fxruby-users] FXTextField In-Reply-To: <200601242218.01031.uwe.hartl@gmx.net> References: <> <200601242137.44953.uwe.hartl@gmx.net> <7b39cb211ccf5456e37efdf06ddc1f52@knology.net> <200601242218.01031.uwe.hartl@gmx.net> Message-ID: On Jan 24, 2006, at 3:18 PM, Uwe Hartl wrote: > Thats what I have... > > * dev-ruby/fxruby > Latest version available: 1.2.2 > Latest version installed: 1.2.2 > Size of downloaded files: 1,628 kB > Homepage: http://www.fxruby.org/ > Description: Ruby language binding to the FOX GUI toolkit > License: LGPL-2.1 That is an extremely old version, released on October 1, 2004. You need to upgrade to one of the latest versions, preferably 1.4.4. From wharsojo at gmail.com Wed Jan 25 10:07:11 2006 From: wharsojo at gmail.com (Widi Harsojo) Date: Wed, 25 Jan 2006 22:07:11 +0700 Subject: [fxruby-users] [ANN] FXRuby 1.4.4 Now Available In-Reply-To: References: Message-ID: 2006/1/24, Lyle Johnson : > Enjoy, > > Lyle Thanks, Lyle (include Jroen to...), but.... it seems that "RAA Search" not update to the current version http://raa.ruby-lang.org/search.rhtml?search=fxruby Regards, Widi Harsojo. From lyle at knology.net Wed Jan 25 10:25:22 2006 From: lyle at knology.net (lyle@knology.net) Date: 25 Jan 2006 15:25:22 -0000 Subject: [fxruby-users] [ANN] FXRuby 1.4.4 Now Available In-Reply-To: <> References: <> Message-ID: <20060125152522.29879.qmail@webmail3.knology.net> On Wed, 25 Jan 2006 22:07:11 +0700, Widi Harsojo wrote : > Thanks, Lyle (include Jroen to...), but.... > it seems that "RAA Search" not update to the current version > > http://raa.ruby-lang.org/search.rhtml?search=fxruby Thanks, I've just updated the RAA listing as well as the freshmeat.net listing. I wish that both of those sites would just subscribe to the DOAP file for FXRuby (http://www.fxruby.org/doap.rdf) and update themselves when there's a new release! From uwe.hartl at gmx.net Thu Jan 26 17:01:02 2006 From: uwe.hartl at gmx.net (Uwe Hartl) Date: Thu, 26 Jan 2006 23:01:02 +0100 Subject: [fxruby-users] FXTextField In-Reply-To: References: <> <200601242218.01031.uwe.hartl@gmx.net> Message-ID: <200601262301.02611.uwe.hartl@gmx.net> Hi Lyle, I got it. It took me forever: @txt.connect(SEL_LEFTBUTTONPRESS) {|sender, sel, item| helpText.setText("Suche nach einem Datum.") @txt.onLeftBtnPress(sender, sel, item) 0 } The "0" does the trick. The event is not consumed and the Textfield still reacts to the mouse. The funny thing is, I get an error message, when I write return 0 I got the idea from here: http://www.fox-toolkit.com/messages.html in the section "Message Handler Return Values" Thanks for the help Uwe -- *********************************************************************** Uwe Hartl e-mail: Uwe.Hartl at gmx.net 91522 Ansbach Telephone: (0981) 9724526 Am M?hlfeld 8 Notfall-Mobil: (0160)90418680 Germany *********************************************************************** From vjoel at path.berkeley.edu Thu Jan 26 16:13:35 2006 From: vjoel at path.berkeley.edu (Joel VanderWerf) Date: Thu, 26 Jan 2006 14:13:35 -0700 Subject: [fxruby-users] FXTextField In-Reply-To: <200601262301.02611.uwe.hartl@gmx.net> References: <> <200601242218.01031.uwe.hartl@gmx.net> <200601262301.02611.uwe.hartl@gmx.net> Message-ID: <43D93B7F.50806@path.berkeley.edu> Uwe Hartl wrote: > Hi Lyle, > > I got it. It took me forever: > > @txt.connect(SEL_LEFTBUTTONPRESS) {|sender, sel, item| > helpText.setText("Suche nach einem Datum.") > @txt.onLeftBtnPress(sender, sel, item) > 0 > } > > The "0" does the trick. The event is not consumed and the Textfield still > reacts to the mouse. The funny thing is, I get an error message, when I write > return 0 That's because ruby thinks you are returning from the enclosing method, rather than from the block. You can use "break 0" to exit from the block with a certain value. > I got the idea from here: > > http://www.fox-toolkit.com/messages.html > in the section "Message Handler Return Values" > > Thanks for the help > > Uwe > -- vjoel : Joel VanderWerf : path berkeley edu : 510 665 3407 From uwe.hartl at gmx.net Fri Jan 27 10:41:50 2006 From: uwe.hartl at gmx.net (Uwe Hartl) Date: Fri, 27 Jan 2006 16:41:50 +0100 Subject: [fxruby-users] FXTextField In-Reply-To: <43D93B7F.50806@path.berkeley.edu> References: <> <200601262301.02611.uwe.hartl@gmx.net> <43D93B7F.50806@path.berkeley.edu> Message-ID: <200601271641.50856.uwe.hartl@gmx.net> Hi Joel, not really, I tried it with break 0 and get: ./Dataviewclasses.rb:66:in `call': break from proc-closure (LocalJumpError) from /usr/lib/ruby/site_ruby/1.8/fox14/responder2.rb:57:in `onHandleMsg' Uwe From vjoel at path.berkeley.edu Fri Jan 27 16:52:44 2006 From: vjoel at path.berkeley.edu (Joel VanderWerf) Date: Fri, 27 Jan 2006 13:52:44 -0800 Subject: [fxruby-users] FXTextField In-Reply-To: <200601271641.50856.uwe.hartl@gmx.net> References: <> <200601262301.02611.uwe.hartl@gmx.net> <43D93B7F.50806@path.berkeley.edu> <200601271641.50856.uwe.hartl@gmx.net> Message-ID: <43DA962C.4090701@path.berkeley.edu> Uwe Hartl wrote: > Hi Joel, > not really, I tried it with break 0 and get: > ./Dataviewclasses.rb:66:in `call': break from proc-closure (LocalJumpError) > from /usr/lib/ruby/site_ruby/1.8/fox14/responder2.rb:57:in > `onHandleMsg' > > Uwe Right, sorry. When a block has been turned into a proc (closure) you can still use next, however: def foo(&bl) @goo = bl end foo { next 4; raise } p @goo.call # ==> 4 -- vjoel : Joel VanderWerf : path berkeley edu : 510 665 3407 From dragoncity at impulse.net.au Fri Jan 27 16:56:49 2006 From: dragoncity at impulse.net.au (brett s hallett) Date: Sat, 28 Jan 2006 08:56:49 +1100 Subject: [fxruby-users] setting default FONT for buttons . etc Message-ID: <1138399009.8752.0.camel@linux.site> Thanks, Lyle Exactly what I needed to know ! -- Yours, Brett From uwe.hartl at gmx.net Sun Jan 29 03:19:29 2006 From: uwe.hartl at gmx.net (Uwe Hartl) Date: Sun, 29 Jan 2006 09:19:29 +0100 Subject: [fxruby-users] FXTextField In-Reply-To: <43DA962C.4090701@path.berkeley.edu> References: <> <200601271641.50856.uwe.hartl@gmx.net> <43DA962C.4090701@path.berkeley.edu> Message-ID: <200601290919.29874.uwe.hartl@gmx.net> Hi Joel, this seems to work, too. Thank you. Now I thought I found the wisdom with the message forwarding, but this is far from complete, I guess. I try now to make the FXText to ignore some keys. There are two FXText showing the same information, therefore I used a FXDataTarget. To make the FXText to ignore the keys and I inherited the FXText. In the subclass I connect to the SEL_KEYPRESS and filter the input. This procedure works great with one FXText, but it does not transfer the Info to the other FXText via the DataTarget. Here ist the test - code: require 'fox14' include Fox class UHS_FXText < FXText def initialize(p, tgt=nil, sel=0, opts=0, x=0, y=0, w=0, h=0, pl=3, pr=3, pt=2, pb=2) super setValidChars("1234567890 :z") end def setValidChars(validchars) connect(SEL_KEYPRESS) {|sender, sel, item| ret = true if validchars.include?(item.text) ret = false else puts "Key not handled!" end ret } end end class Welcome < FXMainWindow def initialize() super($theApp, 'Welcome to the Manager', icon=nil, miniIcon=nil, opts=DECOR_ALL, x=0, y=0, width=300, height=300) tgt = FXDataTarget.new("FOX") fr = FXVerticalFrame.new(self, LAYOUT_FILL_X|LAYOUT_FILL_Y) dt1 = UHS_FXText.new(fr, tgt, FXDataTarget::ID_VALUE, opts= LAYOUT_FILL_X| VSCROLLING_OFF|HSCROLLER_ALWAYS) dt1.visibleRows = 2 dt2 = UHS_FXText.new(fr, tgt, FXDataTarget::ID_VALUE, opts= LAYOUT_FILL_X| VSCROLLING_OFF|HSCROLLER_ALWAYS) dt2.visibleRows = 2 end end if $0 == __FILE__ $theApp = FXApp.new $wn = Welcome.new $wn.show $theApp.create $theApp.run p "finishing up" end May be, you can figure this out... Thanks Uwe From lyle at knology.net Mon Jan 30 10:08:19 2006 From: lyle at knology.net (Lyle Johnson) Date: Mon, 30 Jan 2006 09:08:19 -0600 Subject: [fxruby-users] [fxruby-announce] FXruby webservices In-Reply-To: References: Message-ID: On Jan 30, 2006, at 7:59 AM, Brutyn Nick hotmail wrote: > How can i set up a webservice client in fxruby??? Nick, I don't understand how this has anything to do with FXRuby. The code example that you showed doesn't even contain any FXRuby code, but more to the point, if you can't access your web service from a standalone Ruby program that doesn't include any FXRuby user interface elements, you're not going to be able to do it from an FXRuby program either. Unless there's something I'm missing here, you would probably be better served taking this question to the ruby-talk mailing list. Lyle P.S. The fxruby-announce mailing list is for announcements only. I've Cc'd this response to the fxruby-users mailing list, and any future questions having to do with FXRuby should be directed there. -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: text/enriched Size: 889 bytes Desc: not available Url : http://rubyforge.org/pipermail/fxruby-users/attachments/20060130/e4e5358e/attachment.bin From lyle at knology.net Mon Jan 30 10:11:11 2006 From: lyle at knology.net (Lyle Johnson) Date: Mon, 30 Jan 2006 09:11:11 -0600 Subject: [fxruby-users] [fxruby-announce] Login application In-Reply-To: References: Message-ID: <99d7372c4037238bcaa161f275dc2f2e@knology.net> On Jan 30, 2006, at 8:03 AM, Brutyn Nick hotmail wrote: > hey, > ? > i want to make a application that can do: > -user can login in > -when login fails, show message > -when login is correct, new window(no popup)?with some select list of > some sort filled with employee records f that user. OK. > How can i: > -If i click a button i can get the value from the textfield I think you'd do something like: button.connect(SEL_COMMAND) { value = textField.text } > -When login succes show new window (no popup) > -fill some select list?? > ? > I m pretty new at this, only worked with RoR, how u guys can help me, > of have some great example that can do this. There are several examples of how to display windows (e.g. main windows and dialog boxes), as well as how to create and fill list widgets, in the "examples" directory of the FXRuby distribution. I'd suggest that you start with those, and then modify them a little bit at a time to learn how things work. -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: text/enriched Size: 1665 bytes Desc: not available Url : http://rubyforge.org/pipermail/fxruby-users/attachments/20060130/ff749fd6/attachment.bin From thom01 at laposte.net Tue Jan 31 14:02:28 2006 From: thom01 at laposte.net (thom01) Date: Tue, 31 Jan 2006 20:02:28 +0100 Subject: [fxruby-users] How to display a frame content into different containers ? Message-ID: Hi, My main window is splitted horizontally. - The left side contains a tree list whose each item is associated to a vertical frame. - The right side is itself splitted vertically, the upper and lower panes contain an empty vertical frame by default. I'd like to show a tree item's frame into one of the right panes when the tree item is selected. How can I do it with FXRuby ? I tried to use FXSwitcher, it works but I'd like to be able to display the item's frame into the upper pane as well as the lower one. Thanks Thomas Acc?dez au courrier ?lectronique de La Poste : www.laposte.net ; 3615 LAPOSTENET (0,34 ?/mn) ; t?l : 08 92 68 13 50 (0,34?/mn) From lyle at knology.net Tue Jan 31 14:57:47 2006 From: lyle at knology.net (lyle@knology.net) Date: 31 Jan 2006 19:57:47 -0000 Subject: [fxruby-users] How to display a frame content into different containers ? In-Reply-To: <> References: <> Message-ID: <20060131195747.19635.qmail@webmail3.knology.net> On Tue, 31 Jan 2006 20:02:28 +0100, "thom01" wrote : > My main window is splitted horizontally. > - The left side contains a tree list whose each item is > associated to a vertical frame. > - The right side is itself splitted vertically, the upper and > lower panes contain an empty vertical frame by default. OK. > I'd like to show a tree item's frame into one of the right > panes when the tree item is selected. OK. > How can I do it with FXRuby ? > I tried to use FXSwitcher, it works but I'd like to be able to > display the item's frame into the upper pane as well as the > lower one. You cannot display the same window object (i.e. the vertical frame) in more than one place at the same time, if that is what you are asking. If you just want to change the vertical frame's position in the split, e.g. to make it the first child window instead of the second, you could call linkBefore() or linkAfter() on the frame. If you want to actually move the child window to a completely different parent window, you could call reparent() on it. Hope this helps, Lyle From meinrad.recheis at gmail.com Tue Jan 31 16:25:25 2006 From: meinrad.recheis at gmail.com (Meinrad Recheis) Date: Tue, 31 Jan 2006 22:25:25 +0100 Subject: [fxruby-users] foxguib Message-ID: <43d756720601311325x2d8c8494r568ab12689386e26@mail.gmail.com> hi fxruby users! i decided to maybe put some efforts into a new release of foxguib. as the creator and maintainer of foxguib (who sadly never got much feedback) i am very interested if it is worth the effort. often i heard the opinion: "well, foxguib is nice, but i prefer coding my interfaces by hand." are you folks interested in a new release of foxguib? what would you like most to be enforced? * even more stability / usability * extend widget support * cool new features (tell me which) * documentation * ... what so ever please tell me your opinion! yours, -- henon