Re: [Fxruby-users] FXProgressDialog problem
Status: Inactive
Brought to you by:
lyle
From: Lyle J. <jl...@cf...> - 2003-12-16 20:06:07
|
Carl Youngblood wrote: > I'm trying to display a progress dialog after the user clicks a button. > In my onClick method for my application, I have the following code: > > FXProgressDialog.new(self, > "Bayesian Inference Progress", > "Learning Bayesian network", > PROGRESSDIALOG_NOCANCEL) do |prog| > prog.total = @transactions.size - total_categorized + 120 > prog.progress = 0 > # stuff ... > prog.progress += 10 > # more stuff ... > prog.progress += 10 > # etc. etc. > end > > When I click on the button, the code gets executed but I never see the > progress dialog. What am I doing wrong? Well, never calling show() on the dialog box is a problem ;) See what happens if you add the line: prog.show as the first line of the block. Also I guess a call to prog.hide at the end. |