Martin Schöttler
2011-Sep-16 03:53 UTC
[fxruby-users] Finish Button disappears on last panel of FXWizard
Hi Patrick, I see the same issue: Connecting the buttons (advanceButton, finishButton) by SEL_COMMAND does not yield the desired result. But connecting the FXWizard object to SEL_UPDATE works: wiz.connect( SEL_UPDATE ){ ... } In the block you may check which screen is the current one by wiz.container.current (0 for the first screen, 1 for the second ) and whether the Wizard has been finished wiz.shown? (true if not finished, false if finished). As the SEL_UPDATE event comes periodically, I firstly check whether something has changed, and leave the block immediately if not: @current = -1 wiz.connect( SEL_UPDATE ){ exit unless wiz.shown? # finish has been pressed unless @current == wiz.container.current @current = wiz.containter.current ... # now call a handler for the current page end } It took me some hours to come to this solution, as I found only few hints for FXRuby/FXWizard by Google. I hope there are no misspellings in the solution above, as I now write this down from memory. Martin patrick-194 wrote:> > require ''rubygems'' > require ''fox16'' > include Fox app = FXApp.new > wiz = FXWizard.new(app, ''wiz'', nil, :width => 640, :height => 480) > ... > wiz.finishButton.connect(SEL_COMMAND) { exit } > ... > It seems that when I add attach a command to the wiz.finishButton, when > the time comes for it to appear (on the last panel) it disappears... > > _______________________________________________ > fxruby-users mailing list > fxruby-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/fxruby-users >-- View this message in context: http://old.nabble.com/Finish-Button-disappears-on-last-panel-of-FXWizard-tp25656458p32454694.html Sent from the FXRuby Users mailing list archive at Nabble.com.