I believe your using Ruby 1.9.2, and if so, it no longer references the
current directory, or rather the directory from where the script is
launched
from, as a path in which to look for files to require in. You can do
one of
two things, you can either do:
require ‘wx’
require ‘./trap’
or you could do:
$:.unshift “.”
requrie ‘wx’
require ‘trap’
Either of these methods will work to get trap.rb to load up under 1.9.2.
This isn’t so much a wxRuby Problem, as it is a design change by Ruby
1.9
core.
evt_button (next_btn) {next_go} # HERE
Exsys.new.show()
end
I need to start an def next_go, if I click button next_btn (see HERE
places in the code). It doesn’t work, see the attached image.
The next_btn should actually be accessable through @next_btn, since you
are
inheriting the TFB class in your Exsys class.
Try doing: evt_button(@next_btn) { next_go }
How I can read a value from ComboBox?
See http://wxruby.rubyforge.org/doc/combobox.html Specifically #get_value
and #get_current_selection. Since ComboBox has a TextEntry and a Choice
setup with it, you need to compare between the TextEntry and Choice to
ensure you are getting the correct value out of it.
How I can disable and enable Sizer?
First you need to get the sizer, by using Window#get_containing_sizer,
then
you can use Window#hide, or Window#show to hide/show a Sizer, and
Window#disable or Window#enable to disable/enable a set of controls.
There’s no physical way to disable a Sizer to prevent the sizer from
resizing in the window. You can only either hide / show it, or
enable/disable the controls within it.
I tend to not get much time to respond to emails, as I’m trying to run
through everything. Could you send me attached a copy of your XRC, and
Ruby
Source files, so I can see where the problem may be in the code?