Hanmac / rwx

wxWidgets binding for ruby
Other
50 stars 4 forks source link

Controls demo fails #7

Closed rhinton closed 10 years ago

rhinton commented 10 years ago

I finally figured out that rwx needs Ruby 2.1.0 and installed it. (It would be great if README.rdoc included a list of requirements.) I've compiled and linked against wxWidgets 3.0, and I'm trying to run the examples. Here is the error I get

.../rwx/samples/controls]$ ruby controls.rb
04:37:05 PM: Debug: Failed to connect to session manager: SESSION_MANAGER environment variable not defined
controls.rb:127:in `orientation=': no implicit conversion of true into Integer (TypeError)
        from controls.rb:127:in `block (2 levels) in on_init'
        from controls.rb:126:in `initialize'
        from controls.rb:126:in `new'
        from controls.rb:126:in `block in on_init'
        from controls.rb:25:in `tap'
        from controls.rb:25:in `on_init'
        from controls.rb:139:in `main_loop'
        from controls.rb:139:in `<main>'

I changed line 127 to

        box.orientation = 1

then the demo works fine for me.

rhinton commented 10 years ago

I had to make the same change to dialog_sample.rb:190. (I don't use XRC, so I haven't run the other sample.)