PR64: Various Phoenix and Py3 fixes for the demo and library

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@75720 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
2014-01-28 04:48:21 +00:00
parent 74ddaf3d64
commit a9595b241a
29 changed files with 236 additions and 220 deletions

View File

@@ -71,15 +71,13 @@ class MyTreeListModel(dv.PyDataViewModel):
self.data = data
self.log = log
# The objmapper is an instance of DataViewItemObjectMapper and is used
# to help associate Python objects with DataViewItem objects. Normally
# a dictionary is used so any Python object can be used as data nodes.
# If the data nodes are weak-referencable then the objmapper can use a
# WeakValueDictionary instead. Each PyDataViewModel automagically has
# an instance of DataViewItemObjectMapper preassigned. This
# self.objmapper is used by the self.ObjectToItem and
# self.ItemToObject methods used below.
self.objmapper.UseWeakRefs(True)
# The PyDataViewModel derives from both DataViewModel and from
# DataViewItemObjectMapper, which has methods that help associate
# data view items with Python objects. Normally a dictionary is used
# so any Python object can be used as data nodes. If the data nodes
# are weak-referencable then the objmapper can use a
# WeakValueDictionary instead.
self.UseWeakRefs(True)
# Report how many columns this model provides data for.
@@ -305,8 +303,7 @@ def runTest(frame, nb, log):
# Reuse the music data in the ListCtrl sample, and put it in a
# hierarchical structure so we can show it as a tree
import ListCtrl
musicdata = ListCtrl.musicdata.items()
musicdata.sort()
musicdata = sorted(ListCtrl.musicdata.items())
## For testing Unicode
#musicdata = {