$ ruby fxbug-bounds-err.rb
fxbug-bounds-err.rb:26:in `setCurrentItem'': table column out of bounds
(IndexError)
from fxbug-bounds-err.rb:26:in `run''
from fxbug-bounds-err.rb:26:in `runme''
from fxbug-bounds-err.rb:29
All it takes to make this happen is to press the down arrow key. Is this
a bug, or should I be preventing it in some way?
--- fxbug-bounds-err.rb ---
require "fox12"
include Fox
class TestWindow < FXMainWindow
def initialize(app)
super(app, "MyTest", nil, nil, DECOR_ALL, 0, 0, 600, 400, 0, 0)
mainFrame = FXVerticalFrame.new(self, LAYOUT_FILL_X|LAYOUT_FILL_Y)
@table = FXTable.new(mainFrame, nil, 0, LAYOUT_FILL_X|LAYOUT_FILL_Y)
@table.setTableSize(10, 1)
@table.setFocus
end
def create
super
show(PLACEMENT_SCREEN)
end
end
def runme
application = FXApp.new("MyTest", "FoxTest")
TestWindow.new(application)
application.create
application.run
end
runme