Changeset 3050

Show
Ignore:
Timestamp:
04/10/2007 05:49:51 PM (1 year ago)
Author:
nate
Message:

Refactored the ui test init some more.

dSearchBox is DONE. This commit resolves ticket #1042. Here are the things fixed between now and last commit.

1) List is now a list. You send a list of the string captions you want in the dropdown menu to it and it will automatically create the menu and update it for you. You can still access the dMenu object using the Menu property.

2) Fixed the memory leak thing going on with the wx functions ShowSearchButton? and ShowCancelButton?. The leak pops up when you initialize either property in the constructor or initProperties (otherwise it's fine). Now, you can set either in the constructor and not get an error.

3) Figured out what was up with the ShowButtonVisible? property not hiding the button. Directly related to #2. Solved.

Note there are now 2 more events:

I included a demo very similar to the dTextBox demo.

Let me know what you think. Remember, you need to use the NateBranch? branch to access this until it is merged with the trunk.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/NateBranch/tests/unitTests/ui/UIwx/__init__.py

    r3049 r3050  
    1515testForm = dabo.ui.dForm() 
    1616 
     17#Setup utilities 
     18def loadTestModule(module): 
     19    suiteList.append(unittest.TestLoader().loadTestsFromModule(module)) 
     20    module.App = App 
     21    module.testForm = testForm 
    1722 
    1823#suiteList should contain all of the suite that are recieved from the modules and TestCases 
     
    2429#import TestCase suites and add to list here 
    2530import Test_dTextBox 
    26 suiteList.append(unittest.TestLoader().loadTestsFromModule(Test_dTextBox)) 
    27 Test_dTextBox.App = App 
    28 Test_dTextBox.testForm = testForm 
    29  
    30 #import Test_dSearchBox 
    31 #suiteList.append(unittest.TestLoader().loadTestsFromModule(Test_dSearchBox)) 
    32 #Test_dSearchBox.App = App 
    33 #Test_dSearchBox.testForm = testForm 
     31loadTestModule(Test_dTextBox) 
     32import Test_dSearchBox 
     33loadTestModule(Test_dSearchBox) 
    3434 
    3535#setup a suite and return it