Here is my code:
require ''rubygems''
require ''wx''
include Wx
class GuiMudClientApp < App
def on_init
frame = Frame.new(nil, -1, "GMC: Incoming").show
test = TextCtrl.new(frame, -1, "-----Mud stuff here-----",
Point.new(500, 500), Size.new(500, 500), TE_READONLY)
test.append_text "Pfft!"
end
end
nowai = GuiMudClientApp.new
nowai.main_loop
I get this error:
guimc.rb:8:in `new'': Error initializing #<Wx::TextCtrl:0x74e3c0>
(TypeError)
: Expected argument 1 of type wxWindow *, but got TrueClass true
in SWIG method ''wxTextCtrl''
Correct parameters for Wxruby2::TextCtrl.new are:
:id => (Fixnum)
:value => (String)
:pos => (Wxruby2::Point)
:size => (Wxruby2::Size)
:style => (Fixnum)
:validator => (Wxruby2::Validator)
:name => (String)
from guimc.rb:8:in `on_init''
from guimc.rb:15:in `main_loop''
from guimc.rb:15
Before, I could use a ''Frame'' class as the parent window, but
now its
having issues. I''ve followed it right off of the API docs. Any idea
whats wrong/how to fix it?
Thanks in advance,
Zonbidesu
--
Posted via http://www.ruby-forum.com/.