From dglnz at yahoo.com Thu Jul 2 06:37:03 2009 From: dglnz at yahoo.com (dave L) Date: Thu, 2 Jul 2009 03:37:03 -0700 (PDT) Subject: [fxruby-users] trouble with program code separation In-Reply-To: <43d756720907011435q331f1572m47b49f102a454f51@mail.gmail.com> References: <414785.2856.qm@web30001.mail.mud.yahoo.com> <43d756720907011435q331f1572m47b49f102a454f51@mail.gmail.com> Message-ID: <196575.57787.qm@web30003.mail.mud.yahoo.com> Thanks Meinrad for your reply, I had tried doing something like this but it didn't work in the last couple of days - Grrrr. Now before when i had the code inside the foxGUIb generated file when i entered something into the textfield which is named @acc_code I had it so that the value was put into a label (which just happened to hold the word Address on the screen - this was more for me to see that the enter key worked or not. Now the code below this fails! - so it's two steps forward 1 back. I readily admit that i'm not the brightest programmer so what seems logical sometimes for me when it's not shown is a mistery hense i go a bit overboard sometimes to explain my problem. So I've commented out all references to my program sqlite3_calls.rb to try and get the keypress to work that is when the ENTER key is press i want the value to be shown on a label just to prove it works. Once that's done then it's one step to uncomment the references to SQLite3_calls and pass the value through to get a customer record returned and to have some values displayed on screen. My current code for MainWindow - foxGUIb generated code & my hand coded event handler code. yours or that of others on this list would be greatly appreciated ________________________________ From: Meinrad Recheis To: fxruby-users at rubyforge.org Sent: Thursday, 2 July, 2009 9:35:17 AM Subject: Re: [fxruby-users] trouble with program code separation dave, I don't see the whole code, so I can not exactly tell you how to fix your problem. maybe a small example will help you: class MainWindow # generated by foxguib def initialize( parent) construct_widget_tree( parent) init if respond_to? 'init' end def construct_widget_tree( parent) # here the gui is created by foxguib code end end # you don't want to change the above autogenerated class in case you want to change it later and regenerate it. # everything that MainWindow should do that is not provided by foxguib goes in a subclass: class DBWindow < MainWindow # your code def initialize(parent) super # do your stuff here for example: @mydb = Dbase.new end end hth, -- Henon lot's snippted -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: two_files_in_one.txt URL: From dglnz at yahoo.com Fri Jul 3 19:15:47 2009 From: dglnz at yahoo.com (dave L) Date: Fri, 3 Jul 2009 16:15:47 -0700 (PDT) Subject: [fxruby-users] IDE Message-ID: <67420.66888.qm@web30002.mail.mud.yahoo.com> Hi Nataraj S Narayan, The only one that comes close to that sort of thing would be ... foxGUIb - written by Meinrad Recheis (aka henon) Shoes - written by _why_the_lucky_stiff (aka(_why) foxGuib is a good for visually placing controls onto the screen etc and i'm having a time trying to link my event code to actions done on the foxGUIb generated screen (thinking about doing a screen cast once i am more confidant about doing things with foxGUIb and pulling in my code - or visa versa). Shoes is a great wee program very versital and much more ruby in how you use it but has it's own quirks. good place to learn about Shoes is at www.ruby learning.org they run a 2 week course every so often among other courses for ruby. might add that doing the free ruby core course 1st might help you too (not that i know or critiquing your programming skills). HTH dave. -------------- next part -------------- An HTML attachment was scrubbed... URL: From dglnz at yahoo.com Sun Jul 5 00:41:12 2009 From: dglnz at yahoo.com (dave L) Date: Sat, 4 Jul 2009 21:41:12 -0700 (PDT) Subject: [fxruby-users] trouble with program code separation In-Reply-To: <43d756720907040241m68a1f950g7efdb4eb6ee1e3b2@mail.gmail.com> References: <414785.2856.qm@web30001.mail.mud.yahoo.com> <43d756720907011435q331f1572m47b49f102a454f51@mail.gmail.com> <196575.57787.qm@web30003.mail.mud.yahoo.com> <43d756720907040241m68a1f950g7efdb4eb6ee1e3b2@mail.gmail.com> Message-ID: <922126.11828.qm@web30005.mail.mud.yahoo.com> Have you run my code? what results did YOU get - text entered appear in label4 (aka Address)? for me running the program (has the code generated by foxGUIb) it fails to pass any event triggers to the code i had written so when i type in 12345 i see it in the textfield but the text in label4 (Address) is unchanged and when the enter key is pressed again no change to the text displayed (changing my code from a class to a module does nothing, changing the include to an extend does nothing either). From my experiments of trying different things to try and get the two to interact I have no events being fired OR passed through to my code. could you _or_ anyone else using foxGUIb1.0.0 try the code attached in my previous email see what results they get? this is VERY frustrating for me as i did have the code working when the event code was inside of foxGUIb generated code. Dave. ________________________________ From: Meinrad Recheis To: fxruby-users at rubyforge.org Sent: Saturday, 4 July, 2009 9:41:37 PM Subject: Re: [fxruby-users] trouble with program code separation the code seems correct to me, what problem are you having? On Thu, Jul 2, 2009 at 12:37 PM, dave L wrote: Thanks Meinrad for your reply, > >I had tried doing something like this but it didn't work in the last couple of days - Grrrr. > >Now before when i had the code inside the foxGUIb generated file when i entered something into the textfield which is named @acc_code I had it so that the value was put into a label (which just happened to hold the word Address on the screen - this was more for me to see that the enter key worked or not. > >Now the code below this fails! - so it's two steps forward 1 back. > >I readily admit that i'm not the brightest programmer so what seems logical sometimes for me when it's not shown is > a mistery hense i go a bit overboard sometimes to explain my problem. > >So > I've commented out all references to my program sqlite3_calls.rb to try and get the keypress to work >that is when the ENTER key is press i want the value to be shown on a label just to prove it works. > >Once that's done then it's one step to uncomment the references to SQLite3_calls and pass the value through to get a customer record returned and to have some values displayed on screen. > >My current code for MainWindow - foxGUIb generated code & my hand coded event handler code. > >yours or that of others on this list would be greatly appreciated > > > > ________________________________ >From: Meinrad Recheis > >To: fxruby-users at rubyforge.org >Sent: Thursday, 2 July, > 2009 9:35:17 AM > >Subject: Re: [fxruby-users] trouble with program code separation > > >dave, >I don't see the whole code, so I can not exactly tell you how to fix your problem. maybe >>a small example will help you: > > >class MainWindow # generated by foxguib > def initialize( parent) > construct_widget_tree( > parent) > init if respond_to? 'init' > end > > > > def construct_widget_tree( parent) > # here the gui is created by foxguib code > end >end > ># you don't want to change the above autogenerated class in case you want to change it later and regenerate it. ># everything that MainWindow should do that is not provided by foxguib goes in a subclass: > > >class DBWindow < MainWindow # your code > def initialize(parent) > super > # do your stuff here for example: > @mydb = Dbase.new > end >> end >hth, >-- Henon > >lot's > snippted > >> > > Email slow, clunky, unreliable? Switch to Yahoo!Xtra Mail, New Zealand's new email address. >>_______________________________________________ >>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 dglnz at yahoo.com Sun Jul 5 00:57:52 2009 From: dglnz at yahoo.com (dave L) Date: Sat, 4 Jul 2009 21:57:52 -0700 (PDT) Subject: [fxruby-users] IDE Message-ID: <80488.44548.qm@web30003.mail.mud.yahoo.com> Just tried this as an experiment. what i did was to change the init if respond_to? 'init' line within the foxGUIb code to a puts 'yes' if respond_to? 'init'. Now using Sicite i expected to see in the output screen yes displayed either during program execution or after the program is closed. But nothing happened!! so i can only think that the generated code doesn't know anything about my code. If that is so then i copied and pasted the unit test across to my code and ran my code and got no response either. dave. # source generated by foxGUIb 1.0.0 class MainWindow def initialize( parent) construct_widget_tree( parent) puts 'yes' if respond_to? 'init' end def construct_widget_tree( parent) @topwin= FX::MainWindow.new(parent){|w| @mainWindow=w w.wdg_name='mainWindow' My code written tonight after viewing your reply. require 'monitorscreen.rb' #require 'sqlite3_calls.rb' #include Dbase class Fxwindow_code < MainWindow def initialize(parent) super #@mydb = dbase.new end def init # just put the characters to a label on the screen - easy debug solution for me to see # if the user entry gets passed through # - when there is a key press - SEL_KEYRELEASE message is sent # ________________________________ From: dave L To: fxruby-users at rubyforge.org Sent: Saturday, 4 July, 2009 11:15:47 AM Subject: Re: [fxruby-users] IDE Hi Nataraj S Narayan, The only one that comes close to that sort of thing would be ... foxGUIb - written by Meinrad Recheis (aka henon) Shoes - written by _why_the_lucky_stiff (aka(_why) foxGuib is a good for visually placing controls onto the screen etc and i'm having a time trying to link my event code to actions done on the foxGUIb generated screen (thinking about doing a screen cast once i am more confidant about doing things with foxGUIb and pulling in my code - or visa versa). Shoes is a great wee program very versital and much more ruby in how you use it but has it's own quirks. good place to learn about Shoes is at www.ruby learning.org they run a 2 week course every so often among other courses for ruby. might add that doing the free ruby core course 1st might help you too (not that i know or critiquing your programming skills). HTH dave. Email slow, clunky, unreliable? Switch to Yahoo!Xtra Mail, New Zealand's new email address. -------------- next part -------------- An HTML attachment was scrubbed... URL: From dglnz at yahoo.com Sun Jul 5 01:53:21 2009 From: dglnz at yahoo.com (dave L) Date: Sat, 4 Jul 2009 22:53:21 -0700 (PDT) Subject: [fxruby-users] IDE In-Reply-To: <80488.44548.qm@web30003.mail.mud.yahoo.com> References: <80488.44548.qm@web30003.mail.mud.yahoo.com> Message-ID: <935940.80382.qm@web30003.mail.mud.yahoo.com> Ooops SORRY!!! Hijacked another thread. appologies to all. will resubmit it under the right thread. dave. ________________________________ From: dave L To: fxruby-users at rubyforge.org Sent: Sunday, 5 July, 2009 4:57:52 PM Subject: Re: [fxruby-users] IDE Just tried this as an experiment. what i did was to change the init if respond_to? 'init' line within the foxGUIb code to a puts 'yes' if respond_to? 'init'. Now using Sicite i expected to see in the output screen yes displayed either during program execution or after the program is closed. But nothing happened!! so i can only think that the generated code doesn't know anything about my code. If that is so then i copied and pasted the unit test across to my code and ran my code and got no response either. dave. # source generated by foxGUIb 1.0.0 class MainWindow def initialize( parent) construct_widget_tree( parent) puts 'yes' if respond_to? 'init' end def construct_widget_tree( parent) @topwin= FX::MainWindow.new(parent){|w| @mainWindow=w w.wdg_name='mainWindow' My code written tonight after viewing your reply. require 'monitorscreen.rb' #require 'sqlite3_calls.rb' #include Dbase class Fxwindow_code < MainWindow def initialize(parent) super #@mydb = dbase.new end def init # just put the characters to a label on the screen - easy debug solution for me to see # if the user entry gets passed through # - when there is a key press - SEL_KEYRELEASE message is sent # ________________________________ From: dave L To: fxruby-users at rubyforge.org Sent: Saturday, 4 July, 2009 11:15:47 AM Subject: Re: [fxruby-users] IDE Hi Nataraj S Narayan, The only one that comes close to that sort of thing would be ... foxGUIb - written by Meinrad Recheis (aka henon) Shoes - written by _why_the_lucky_stiff (aka(_why) foxGuib is a good for visually placing controls onto the screen etc and i'm having a time trying to link my event code to actions done on the foxGUIb generated screen (thinking about doing a screen cast once i am more confidant about doing things with foxGUIb and pulling in my code - or visa versa). Shoes is a great wee program very versital and much more ruby in how you use it but has it's own quirks. good place to learn about Shoes is at www.ruby learning.org they run a 2 week course every so often among other courses for ruby. might add that doing the free ruby core course 1st might help you too (not that i know or critiquing your programming skills). HTH dave. Email slow, clunky, unreliable? Switch to Yahoo!Xtra Mail, New Zealand's new email address. Email slow, clunky, unreliable? Switch to Yahoo!Xtra Mail, New Zealand's new email address. -------------- next part -------------- An HTML attachment was scrubbed... URL: From dglnz at yahoo.com Sun Jul 5 01:54:14 2009 From: dglnz at yahoo.com (dave L) Date: Sat, 4 Jul 2009 22:54:14 -0700 (PDT) Subject: [fxruby-users] trouble with program code separation In-Reply-To: <922126.11828.qm@web30005.mail.mud.yahoo.com> References: <414785.2856.qm@web30001.mail.mud.yahoo.com> <43d756720907011435q331f1572m47b49f102a454f51@mail.gmail.com> <196575.57787.qm@web30003.mail.mud.yahoo.com> <43d756720907040241m68a1f950g7efdb4eb6ee1e3b2@mail.gmail.com> <922126.11828.qm@web30005.mail.mud.yahoo.com> Message-ID: <143534.40086.qm@web30001.mail.mud.yahoo.com> Just tried this as an experiment. what i did was to change the init if respond_to? 'init' line within the foxGUIb code to a puts 'yes' if respond_to? 'init'. Now using Sicite i expected to see in the output screen yes displayed either during program execution or after the program is closed. But nothing happened!! so i can only think that the generated code doesn't know anything about my code. If that is so then i copied and pasted the unit test across to my code and ran my code and got no response either. dave. # source generated by foxGUIb 1.0.0 class MainWindow def initialize( parent) construct_widget_tree( parent) puts 'yes' if respond_to? 'init' end def construct_widget_tree( parent) @topwin= FX::MainWindow.new(parent){|w| @mainWindow=w w.wdg_name='mainWindow' My code written tonight after viewing your reply. require 'monitorscreen.rb' #require 'sqlite3_calls.rb' #include Dbase class Fxwindow_code < MainWindow def initialize(parent) super #@mydb = dbase.new end def init # just put the characters to a label on the screen - easy debug solution for me to see # if the user entry gets passed through # - when there is a key press - SEL_KEYRELEASE message is sent # ________________________________ From: dave L To: fxruby-users at rubyforge.org Sent: Sunday, 5 July, 2009 4:41:12 PM Subject: Re: [fxruby-users] trouble with program code separation Have you run my code? what results did YOU get - text entered appear in label4 (aka Address)? for me running the program (has the code generated by foxGUIb) it fails to pass any event triggers to the code i had written so when i type in 12345 i see it in the textfield but the text in label4 (Address) is unchanged and when the enter key is pressed again no change to the text displayed (changing my code from a class to a module does nothing, changing the include to an extend does nothing either). From my experiments of trying different things to try and get the two to interact I have no events being fired OR passed through to my code. could you _or_ anyone else using foxGUIb1.0.0 try the code attached in my previous email see what results they get? this is VERY frustrating for me as i did have the code working when the event code was inside of foxGUIb generated code. Dave. ________________________________ From: Meinrad Recheis To: fxruby-users at rubyforge.org Sent: Saturday, 4 July, 2009 9:41:37 PM Subject: Re: [fxruby-users] trouble with program code separation the code seems correct to me, what problem are you having? On Thu, Jul 2, 2009 at 12:37 PM, dave L wrote: Thanks Meinrad for your reply, > >I had tried doing something like this but it didn't work in the last couple of days - Grrrr. > >Now before when i had the code inside the foxGUIb generated file when i entered something into the textfield which is named @acc_code I had it so that the value was put into a label (which just happened to hold the word Address on the screen - this was more for me to see that the enter key worked or not. > >Now the code below this fails! - so it's two steps forward 1 back. > >I readily admit that i'm not the brightest programmer so what seems logical sometimes for me when it's not shown is > a mistery hense i go a bit overboard sometimes to explain my problem. > >So > I've commented out all references to my program sqlite3_calls.rb to try and get the keypress to work >that is when the ENTER key is press i want the value to be shown on a label just to prove it works. > >Once that's done then it's one step to uncomment the references to SQLite3_calls and pass the value through to get a customer record returned and to have some values displayed on screen. > >My current code for MainWindow - foxGUIb generated code & my hand coded event handler code. > >yours or that of others on this list would be greatly appreciated > > > > ________________________________ >From: Meinrad Recheis > >To: fxruby-users at rubyforge.org >Sent: Thursday, 2 July, > 2009 9:35:17 AM > >Subject: Re: [fxruby-users] trouble with program code separation > > >dave, >I don't see the whole code, so I can not exactly tell you how to fix your problem. maybe >>a small example will help you: > > >class MainWindow # generated by foxguib > def initialize( parent) > construct_widget_tree( > parent) > init if respond_to? 'init' > end > > > > def construct_widget_tree( parent) > # here the gui is created by foxguib code > end >end > ># you don't want to change the above autogenerated class in case you want to change it later and regenerate it. ># everything that MainWindow should do that is not provided by foxguib goes in a subclass: > > >class DBWindow < MainWindow # your code > def initialize(parent) > super > # do your stuff here for example: > @mydb = Dbase.new > end >> end >hth, >-- Henon > >some > snipped > -------------- next part -------------- An HTML attachment was scrubbed... URL: From dglnz at yahoo.com Mon Jul 13 21:31:45 2009 From: dglnz at yahoo.com (dave L) Date: Mon, 13 Jul 2009 18:31:45 -0700 (PDT) Subject: [fxruby-users] foxGUIb and the displaying of a dialogbox Message-ID: <35759.87475.qm@web30002.mail.mud.yahoo.com> Hi Meinrad, Yes it's not shown here but i did try that too. The errors where reduced to 1 or 2 lines. I will when i get home tonight do this excercise again and post the error/s generated but still reflects the fact that i'm not doing something right because it points to the @topwin, :@topwin,mainWindow.topwin as being an undefined method. I noticed in the example 7 code that the creation of the dialog object points to the class but when i tried that i again got errors so thought best to post what i did looking for someone to say .... Oh ya yo've gotta do @dailogbox = Fox::fxdialog.new(....) as said will post in another email further code and the errors i get and hopefully it'll be an light turning on for someone who can then show me my error. cheers, Dave. --- On Tue, 14/7/09, Meinrad Recheis wrote: > From: Meinrad Recheis > Subject: Re: [fxruby-users] foxGUIb and the displaying of a dialogbox > To: fxruby-users at rubyforge.org > Received: Tuesday, 14 July, 2009, 5:31 AM > On Mon, Jul 13, > 2009 at 11:34 AM, dave L > wrote: > > Hi folks, > > Using foxGUI for the graphical layout of my user screen. > > And have another file for the event handling. > > I am very new to FXRuby and have asked Meinrad for advise > off list but so far i've failed to grasp things. > > below is a snippet of code from my event handling file and > would like advice as to fixing the current errors for that. > > > I have read but don't full understand the code for > example 7 - dialogbox in so far as how it links to mine. > > > > require 'sqlite3_calls.rb' > require 'monitordxlog' > require 'monitorscreen' > > > class Fxwindow_code < MainWindow > > def initialize(parent)??? > ??? super??? > > # the 3 lines below i saw in Meinrads code for docman.rb so > thought to try it out. > ??? @parent=DialogBox.topwin > ??? > @Dialog=DialogBox.new @parent > ??? @Dialog.create > ??? @mydb = Dbase.new > ??? > end > > ? def init > ? ? ? ? ?? # sample code given to me by Meinrad as > being possibly correct > ?????????? # I've tried both variants - > Fox::FX....? and FX::D... both failing to display the > > ?????????? # dialogbox. > ???? #dialog = Fox::FxDialogBox.new( :@topwin) # or > FX::DialogBox.new(mainwindow) > ??? @textfield1.connect(Fox::SEL_KEYRELEASE){????? > > ????? if @textfield1.text.length == 2 > then????????? > > ????????? > @Dialog.show(FOX::PLACEMENT_DEFAULT) > ????????? @text2.text = '10 max chars > only!!!' > ?????? end > ?????? > errors are > > >ruby mymainwin.rb > C:/Ruby1.8/lib/ruby/gems/1.8/gems/fxruby-1.6.16-x86-mswin32-60/lib/fox16/kwargs.rb:647:in > `old_initialize': No matching function for overloaded > 'new_FXDialogBox' (ArgumentError) > > ??? from > C:/Ruby1.8/lib/ruby/gems/1.8/gems/fxruby-1.6.16-x86-mswin32-60/lib/fox16/kwargs.rb:647:in > `initialize' > ??? from > C:/Ruby1.8/lib/ruby/site_ruby/1.8/libGUIb16.rb:446:in > `initialize' > ??? from ./monitordxlog.rb:11:in `new' > > ??? from ./monitordxlog.rb:11:in > `construct_widget_tree' > ??? from ./monitordxlog.rb:5:in `initialize' > ??? from mymainwin.rb:10:in `new' > ??? from mymainwin.rb:10:in > `initialize' > ??? from mymainwin.rb:53:in `new' > ??? from mymainwin.rb:53 > >Exit code: 1 > > it should be @topwin (a foxguib generated > instance variale pointing to the top most widget of a > foxguib class), not :@topwin which is simply a symbol. > > -- henon > > -----Inline Attachment Follows----- > > _______________________________________________ > fxruby-users mailing list > fxruby-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/fxruby-users From dglnz at yahoo.com Tue Jul 14 18:14:59 2009 From: dglnz at yahoo.com (dave L) Date: Tue, 14 Jul 2009 15:14:59 -0700 (PDT) Subject: [fxruby-users] foxGUIb and the displaying of a dialogbox Message-ID: <615196.27327.qm@web30008.mail.mud.yahoo.com> that is the thing!!! I have done that - created a foxGUI and want to call that DialogBox as it is! Namely 1 label with text put in it by me. A button that does nothing - want to get one thing done at a time - gewt the dialogbox to appear. Was thinking maybe I should do what i have for the MainWindow and mymainwin for the DialogBox ... 1. Got the foxGUI generated code in the file monitordxlog.rb this is CLASS based code not a Sequence selected and generated code. 2. should I have a subclass file called sub_monitordxlog.rb this being the class I call and refer to in mymainwin code? thinking about it i will try it out at home tonight. anyone else on list able to help me out? dave. --- On Tue, 14/7/09, Meinrad Recheis wrote: > From: Meinrad Recheis > Subject: Re: [fxruby-users] foxGUIb and the displaying of a dialogbox > To: fxruby-users at rubyforge.org > Received: Tuesday, 14 July, 2009, 10:52 PM > On Tue, Jul > 14, 2009 at 11:19 AM, dave L > wrote: > > Okay so i've done a number of test > and have found that this code snippet will give me a blank > window in the top left of the screen. > > > ? def init > ??? > ???? #dialog = Fox::FxDialogBox.new( :@topwin) # or > FX::DialogBox.new(mainwindow) > ??? @textfield1.connect(Fox::SEL_KEYRELEASE){????? > > ????? if @textfield1.text.length == 2 then??? > > ????????? @Dialog = FX::DialogBox.new > @topwin > ????????? @Dialog.create??????? > ????????? > @Dialog.show(FOX::PLACEMENT_DEFAULT) > ????????? @text2.text = '10 max chars > only!!!' > ?????? end > > ? def init > ??? > ???? #dialog = Fox::FxDialogBox.new( :@topwin) # or > FX::DialogBox.new(mainwindow) > ??? @textfield1.connect(Fox::SEL_KEYRELEASE){????? > > ????? if @textfield1.text.length == 2 then??? > > ????????? @Dialog = FX::DialogBox.new > @topwin > ????????? @Dialog.create??????? > ????????? @Dialog.show > #(FOX::PLACEMENT_DEFAULT) > ????????? @text2.text = '10 max chars > only!!!' > ?????? end > > > gives me a blank window no widgits > visible!!! > of course it is blank, you haven't linked > any widgets in. the label @text2 you might expect to be > shown is not created with @Dialog as parent! build a dialog > in foxguib how you want it to be and have a look, how > *exactly* foxguib constructs the widget tree in the > generated code. i have currently no time to look at the > other problems you got. maybe later. > -- henon > Git# --> > Git for .NET > > > -----Inline Attachment Follows----- > > _______________________________________________ > fxruby-users mailing list > fxruby-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/fxruby-users From jkinsella at ancillaryservices.com Wed Jul 22 18:03:57 2009 From: jkinsella at ancillaryservices.com (Joey Kinsella) Date: Wed, 22 Jul 2009 18:03:57 -0400 Subject: [fxruby-users] Widget Creation Message-ID: <4A678CCD.6000301@ancillaryservices.com> I am currently in the process of attempting to build a custom button, and was wondering if anyone could answer me how I can setup message handling (such as posting to a connect() call). I've been searching the internet for a while now, and this seems to be rather undocumented. Thanks, Joey Kinsella From stuart_clarke86 at yahoo.com Wed Jul 29 09:58:27 2009 From: stuart_clarke86 at yahoo.com (Stuart Clarke) Date: Wed, 29 Jul 2009 13:58:27 +0000 (GMT) Subject: [fxruby-users] GUI Message Box Message-ID: <573430.88337.qm@web86603.mail.ird.yahoo.com> Hi all, I hope this is not to silly a question. I have a GUI which simpily allows the user to point to a few files and folders then click a Run button. Upon completion of the backend processing the user is then presented with a FXMessageBox giving an information message and the user can click on OK. By clicking Ok the original GUI is still sitting in the background and has to be terminated by the user also. I was wondering is there a way that when the FXMessageBox pops up and the user clicks Ok, can it kill the popup GUI and the original GUI in the same way FXApp::ID_QUIT works FXMenuCommand. I hope this makes sense Many thanks Stuart -------------- next part -------------- An HTML attachment was scrubbed... URL: From jeroen at fox-toolkit.org Wed Jul 29 10:37:29 2009 From: jeroen at fox-toolkit.org (Jeroen van der Zijp) Date: Wed, 29 Jul 2009 09:37:29 -0500 Subject: [fxruby-users] GUI Message Box In-Reply-To: <573430.88337.qm@web86603.mail.ird.yahoo.com> References: <573430.88337.qm@web86603.mail.ird.yahoo.com> Message-ID: <200907290937.29889.jeroen@fox-toolkit.org> On Wednesday 29 July 2009, Stuart Clarke wrote: > Hi all, > I hope this is not to silly a question. I have a GUI which simpily allows the user to point to a few files and folders then click a Run button. Upon completion of the backend processing the user is then presented with a FXMessageBox giving an information message and the user can click on OK. By clicking Ok the original GUI is still sitting in the background and has to be terminated by the user also. I was wondering is there a way that when the FXMessageBox pops up and the user clicks Ok, can it kill the popup GUI and the original GUI in the same way FXApp::ID_QUIT works FXMenuCommand. > I hope this makes sense When the FXMessageBox returns from execute() with MBOX_OK, you're code should just close() the main window, or sent the main window an ID_CLOSE message, which has the same effect. If you don't want to terminate, then you can hide() the main window, because if you close() a FXTopWindow, FXApp is sent an ID_QUIT if no other top windows remain. So if you didn't actually want to stop the program then its best to simply hide() the window. Regards, - Jeroen