FXWizard example?

View: New views
2 Messages — Rating Filter:   Alert me  

FXWizard example?

by patrick-194 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

After futzing about with juggling mutiple mainWindows with limited success - I see there is a FXWizard class.
However, I was a tad dismayed at my (lack of) results in understanding the rdoc details to implement one.

this bit:

require 'rubygems'
require 'fox16'
include Fox

app = FXApp.new
wiz = FXWizard.new(app, 'wiz', :width => 300, :height => 300)

generates this error:

C:/Ruby/lib/ruby/gems/1.8/gems/fxruby-1.6.19-x86-mswin32-60/lib/fox16/kwargs.rb:2678:in `old_initialize': No matching function for overloaded 'new_FXWizard'
gumentError)
        from C:/Ruby/lib/ruby/gems/1.8/gems/fxruby-1.6.19-x86-mswin32-60/lib/fox16/kwargs.rb:2678:in `initialize'
        from wiz.rb:6:in `new'
        from wiz.rb:6

according to the rdocs:

If owner is the application, the dialog box will be free-floating.

so I'm at a loss as to what I'm missing...

_______________________________________________
fxruby-users mailing list
fxruby-users@...
http://rubyforge.org/mailman/listinfo/fxruby-users

Re: FXWizard example?

by Lyle Johnson-4 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


On Sep 25, 2009, at 8:08 PM, patrick@... wrote:

After futzing about with juggling mutiple mainWindows with limited success - I see there is a FXWizard class.
However, I was a tad dismayed at my (lack of) results in understanding the rdoc details to implement one.

The error message is completely unhelpful, but I think all that's wrong is that you're missing one of the required arguments for FXWizard.new. See the API docs here:


The first three arguments are the owner window (or app, in your case), the name (i.e. the title for the dialog box) and the image to be displayed in the sidebar (or nil if you don't want an image). Try something like:

wiz = FXWizard.new(app, 'wiz', nil, :width => 300, :height => 300)

Hope this helps,

Lyle


---
"FXRuby: Create Lean and Mean GUIs with Ruby"
Now available from the Pragmatic Bookshelf!






_______________________________________________
fxruby-users mailing list
fxruby-users@...
http://rubyforge.org/mailman/listinfo/fxruby-users