search for: ctrlcontainerframe

Displaying 4 results from an estimated 4 matches for "ctrlcontainerframe".

2006 Nov 21
0
[744] trunk/wxruby2: get_data support & mem mgmt to all ControlWithItems types, using more
...<ins>+require ''test/unit'' +require ''test/unit/ui/console/testrunner'' +require ''wx'' + +class TestApp < Wx::App + attr_accessor :test_class + def on_init + Test::Unit::UI::Console::TestRunner.run(self.test_class) + end +end + +class CtrlContainerFrame < Wx::Frame + attr_accessor :control + def initialize(ctrl_class, *args) + super(nil, -1, ''Test '' + ctrl_class.name) + self.control = ctrl_class.new(self, -1, *args) + end +end + +class TestItemData < Test::Unit::TestCase + def assert_retrievable_data(ctrl, n, test...
2006 Nov 30
0
[765] trunk/wxruby2: Fixed item_data functions for ListCtrl, plus test
...5) </span><span class="lines">@@ -52,6 +52,34 @@ </span><span class="cx"> f.close(true) </span><span class="cx"> end </span><span class="cx"> </span><ins>+ def test_listctrl_itemdata + f = CtrlContainerFrame.new(Wx::ListCtrl) + lc = f.control + assert_equal(nil, lc.get_item_data(-7)) + assert_equal(nil, lc.get_item_data(0)) + assert_equal(nil, lc.get_item_data(118)) + + lc.insert_item(0, ''string'') + assert_equal(nil, lc.get_item_data(0)) + + lc.set_item_data(0, ...
2006 Dec 01
0
[767] trunk/wxruby2: Added CheckListBox to item_data test, note to explain why fixes are not needed
...@@ -105,6 +105,13 @@ </span><span class="cx"> do_control_with_items_assertions(f) </span><span class="cx"> f.close(true) </span><span class="cx"> end </span><ins>+ + def test_checklistbox_itemdata + f = CtrlContainerFrame.new(Wx::CheckListBox, Wx::DEFAULT_POSITION, + Wx::DEFAULT_SIZE, %w[hash string float]) + do_control_with_items_assertions(f) + f.close(true) + end </ins><span class="cx"> end </span><span class="cx"> </span>...
2006 Dec 01
0
[766] trunk/wxruby2: Added item_data aliases for client_data functions, update doc & tests;
...quot;> def do_control_with_items_assertions(f) </span><span class="lines">@@ -34,21 +34,26 @@ </span><span class="cx"> </span><span class="cx"> def test_treectrl_itemdata </span><span class="cx"> f = CtrlContainerFrame.new(Wx::TreeCtrl) </span><del>- root = f.control.add_root(''foo'') </del><ins>+ tree = f.control + root = tree.add_root(''foo'') + assert_nil(tree.get_item_data( tree.get_root_item)) </ins><span class="cx"> &...