mirror of
https://github.com/wxWidgets/Phoenix.git
synced 2026-01-04 11:00:07 +01:00
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:
@@ -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 = {
|
||||
|
||||
Reference in New Issue
Block a user