I successfully setup a list with the ColumnSorterMixin and it works
fine,
however I want the list to sort automatically when my PopulateList()
method is
run. My problem is what instance to send SortListItems(). It seems if
I try to
send 'self' (my frame) or 'self.list', I get an attribute error:
File "Z:\Colin's Work\Code\spyditor\main.py", line 188, in
PopulateList
ColumnSorterMixin.SortListItems(self.list)
File "C:\Python25\Lib\site-packages\wx-2.8-msw-unicode\wx\lib\mixins
\listctrl.
py", line 78, in SortListItems
oldCol = self._col
AttributeError: 'List' object has no attribute '_col'
Again this is occuring with either my mainframe or my list as a
reference,
and also the sorting is working normally for the column click. What
am I doing
wrong?
On Sep 2, 2:47 pm, Colin Barnette <colin.barne...@gmail.com> wrote:
I successfully setup a list with the ColumnSorterMixin and it works
fine,
however I want the list to sort automatically when my PopulateList()
method is
run. My problem is what instance to send SortListItems(). It seems if
I try to
send 'self' (my frame) or 'self.list', I get an attribute error:
File "Z:\Colin's Work\Code\spyditor\main.py", line 188, in
PopulateList
ColumnSorterMixin.SortListItems(self.list)
File "C:\Python25\Lib\site-packages\wx-2.8-msw-unicode\wx\lib\mixins
\listctrl.
py", line 78, in SortListItems
oldCol = self._col
AttributeError: 'List' object has no attribute '_col'
Again this is occuring with either my mainframe or my list as a
reference,
and also the sorting is working normally for the column click. What
am I doing
wrong?
It looks like the mixin is sorting the ListCtrl itself. If I were you,
I would do the sorting of the data myself before putting it into the
ListCtrl.
I successfully setup a list with the ColumnSorterMixin and it works
fine,
however I want the list to sort automatically when my PopulateList()
method is
run. My problem is what instance to send SortListItems(). It seems if
I try to
send 'self' (my frame) or 'self.list', I get an attribute error:
File "Z:\Colin's Work\Code\spyditor\main.py", line 188, in
PopulateList
ColumnSorterMixin.SortListItems(self.list)
File "C:\Python25\Lib\site-packages\wx-2.8-msw-unicode\wx\lib\mixins
\listctrl.
py", line 78, in SortListItems
oldCol = self._col
AttributeError: 'List' object has no attribute '_col'
Again this is occuring with either my mainframe or my list as a
reference,
and also the sorting is working normally for the column click. What
am I doing
wrong?
"self" is the panel which is inherits from "ColumnSorterMixin",
"lcSortCol" is the zero based index of the column and lcSortOrd is
either True / False.