Switched to using True/False in the wxPython lib and demo instead of
true/false or TRUE/FALSE to prepare for the new boolean type and constants being added to Python. Added code to wx.py to test for the existence of the new constants and to create suitable values if not present. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@19335 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -87,16 +87,16 @@ class MyCellEditor(wxPyGridCellEditor):
|
||||
|
||||
def EndEdit(self, row, col, grid):
|
||||
"""
|
||||
Complete the editing of the current cell. Returns true if the value
|
||||
Complete the editing of the current cell. Returns True if the value
|
||||
has changed. If necessary, the control may be destroyed.
|
||||
*Must Override*
|
||||
"""
|
||||
self.log.write("MyCellEditor: EndEdit (%d,%d)\n" % (row, col))
|
||||
changed = false
|
||||
changed = False
|
||||
|
||||
val = self._tc.GetValue()
|
||||
if val != self.startValue:
|
||||
changed = true
|
||||
changed = True
|
||||
grid.GetTable().SetValue(row, col, val) # update the table
|
||||
|
||||
self.startValue = ''
|
||||
@@ -116,7 +116,7 @@ class MyCellEditor(wxPyGridCellEditor):
|
||||
|
||||
def IsAcceptedKey(self, evt):
|
||||
"""
|
||||
Return TRUE to allow the given key to start editing: the base class
|
||||
Return True to allow the given key to start editing: the base class
|
||||
version only checks that the event has no modifiers. F2 is special
|
||||
and will always start the editor.
|
||||
"""
|
||||
@@ -228,7 +228,7 @@ if __name__ == '__main__':
|
||||
import sys
|
||||
app = wxPySimpleApp()
|
||||
frame = TestFrame(None, sys.stdout)
|
||||
frame.Show(true)
|
||||
frame.Show(True)
|
||||
app.MainLoop()
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user