wxListCtrl Virtual List Issue

I have an issue with wxListCtrl that I'm finding difficult to explain
well and / or troubleshoot. I've subclassed ListCtrl to create a
Virtual List. Instances of the list are associated with Data Sources
which retrieve data from a Firebird Database. I have two of these
pairs already functioning in my application.

In a third instance of my list, the column at index 1 selectively
refuses to display the values for all items. It appears to be related
to the value of the Column Header, though I realize that probably
isn't actually quite right as far as an explanation is concerned.

For example, if the list that represents the Column Headers for the
third instance of my Virtual List is ['Device Id', 'Path',
'Credentials', 'Type', 'Status', 'Max Use'] then the Path column is
blank for all rows. If I remove the 'Device Id' column, Path, which
now resides at column 0, is populated properly for all rows.
Credentials, which now resides at Column 1, is blank for all rows.
Credentials displayed properly when it resided at Column 2, and will
display properly at Column 0. From the list of available columns
above Path, Credentials, and Status refuse to display in Column 1.
They display properly in any other column. My OnGetItemText is
defined like so:

  def OnGetItemText(self, item, col):
    return self.datasource.GetItem(item, self.columns[col])

The GetItem method for the datasource is:

  def GetItem(self, item, field):
    return self.data[self._keys[item]][field]

In the datasource, data is an Ordered Dictionary of Dictionaries and
_keys is a cached copy of data.keys(). If I add print statements to
OnGetItemText and attempt to print the value that would return it
displays properly on my console. I'm (reasonably) confident that my
Virtual List and Datasource classes work like they should as witnessed
by the other working instances in my application.

Any help or direction would be much appreciated. Thanks,

--Dan

Platform and version? Please make a small runnable sample that demonstrates the problem. MakingSampleApps - wxPyWiki

···

On 5/28/10 8:31 AM, g.d.d.c wrote:

I have an issue with wxListCtrl that I'm finding difficult to explain
well and / or troubleshoot. I've subclassed ListCtrl to create a
Virtual List. Instances of the list are associated with Data Sources
which retrieve data from a Firebird Database. I have two of these
pairs already functioning in my application.

In a third instance of my list, the column at index 1 selectively
refuses to display the values for all items. It appears to be related
to the value of the Column Header, though I realize that probably
isn't actually quite right as far as an explanation is concerned.

For example, if the list that represents the Column Headers for the
third instance of my Virtual List is ['Device Id', 'Path',
'Credentials', 'Type', 'Status', 'Max Use'] then the Path column is
blank for all rows. If I remove the 'Device Id' column, Path, which
now resides at column 0, is populated properly for all rows.
Credentials, which now resides at Column 1, is blank for all rows.
Credentials displayed properly when it resided at Column 2, and will
display properly at Column 0. From the list of available columns
above Path, Credentials, and Status refuse to display in Column 1.
They display properly in any other column. My OnGetItemText is
defined like so:

   def OnGetItemText(self, item, col):
     return self.datasource.GetItem(item, self.columns[col])

The GetItem method for the datasource is:

   def GetItem(self, item, field):
     return self.data[self._keys[item]][field]

In the datasource, data is an Ordered Dictionary of Dictionaries and
_keys is a cached copy of data.keys(). If I add print statements to
OnGetItemText and attempt to print the value that would return it
displays properly on my console. I'm (reasonably) confident that my
Virtual List and Datasource classes work like they should as witnessed
by the other working instances in my application.

Any help or direction would be much appreciated. Thanks,

--
Robin Dunn
Software Craftsman

Windows XP 64-bit. Python 2.6.2. Wx 2.8.10.1 (msw-unicode). I'll
try to put together a sample app shortly. Is there a standard place
to store said sample app?

···

On May 28, 12:57 pm, Robin Dunn <ro...@alldunn.com> wrote:

On 5/28/10 8:31 AM, g.d.d.c wrote:

> I have an issue with wxListCtrl that I'm finding difficult to explain
> well and / or troubleshoot. I've subclassed ListCtrl to create a
> Virtual List. Instances of the list are associated with Data Sources
> which retrieve data from a Firebird Database. I have two of these
> pairs already functioning in my application.

> In a third instance of my list, the column at index 1 selectively
> refuses to display the values for all items. It appears to be related
> to the value of the Column Header, though I realize that probably
> isn't actually quite right as far as an explanation is concerned.

> For example, if the list that represents the Column Headers for the
> third instance of my Virtual List is ['Device Id', 'Path',
> 'Credentials', 'Type', 'Status', 'Max Use'] then the Path column is
> blank for all rows. If I remove the 'Device Id' column, Path, which
> now resides at column 0, is populated properly for all rows.
> Credentials, which now resides at Column 1, is blank for all rows.
> Credentials displayed properly when it resided at Column 2, and will
> display properly at Column 0. From the list of available columns
> above Path, Credentials, and Status refuse to display in Column 1.
> They display properly in any other column. My OnGetItemText is
> defined like so:

> def OnGetItemText(self, item, col):
> return self.datasource.GetItem(item, self.columns[col])

> The GetItem method for the datasource is:

> def GetItem(self, item, field):
> return self.data[self._keys[item]][field]

> In the datasource, data is an Ordered Dictionary of Dictionaries and
> _keys is a cached copy of data.keys(). If I add print statements to
> OnGetItemText and attempt to print the value that would return it
> displays properly on my console. I'm (reasonably) confident that my
> Virtual List and Datasource classes work like they should as witnessed
> by the other working instances in my application.

> Any help or direction would be much appreciated. Thanks,

Platform and version? Please make a small runnable sample that
demonstrates the problem.MakingSampleApps - wxPyWiki

--
Robin Dunn
Software Craftsmanhttp://wxPython.org

Attach it to an email message sent to this list.

···

On 5/28/10 12:06 PM, g.d.d.c wrote:

Windows XP 64-bit. Python 2.6.2. Wx 2.8.10.1 (msw-unicode). I'll
try to put together a sample app shortly. Is there a standard place
to store said sample app?

--
Robin Dunn
Software Craftsman

I haven't had a chance to create a stand alone sample yet, but I also
have a post about this over at Stack Overflow:
python - wxPython ListCtrl Column Ignores Specific Fields - Stack Overflow.
I've noticed that the values are not displayed in Column 1 if they are
strings. Integers display normally. I am not in front of the code,
but I'll provide the full class definition the next time I am.

···

On May 28, 1:07 pm, Robin Dunn <ro...@alldunn.com> wrote:

On 5/28/10 12:06 PM, g.d.d.c wrote:

> Windows XP 64-bit. Python 2.6.2. Wx 2.8.10.1 (msw-unicode). I'll
> try to put together a sample app shortly. Is there a standard place
> to store said sample app?

Attach it to an email message sent to this list.

--
Robin Dunn
Software Craftsmanhttp://wxPython.org

I've added a full class definition to the post on this issue at Stack
Overflow. I'm working on a stand alone sample, but haven't had time
yet to create one that does not require database access. I'll try to
get that completed and sent today. Hopefully the issue will be
reproducible using static data. I'm not 100% confident a stand alone
sample will demonstrate the issue as it's only present in the third
instance of my class in my application, but I'm willing to try.

···

On May 31, 8:56 am, "g.d.d.c" <dancas...@gmail.com> wrote:

I haven't had a chance to create a stand alone sample yet, but I also
have a post about this over at Stack Overflow:python - wxPython ListCtrl Column Ignores Specific Fields - Stack Overflow
I've noticed that the values are not displayed in Column 1 if they are
strings. Integers display normally. I am not in front of the code,
but I'll provide the full class definition the next time I am.

On May 28, 1:07 pm, Robin Dunn <ro...@alldunn.com> wrote:

> On 5/28/10 12:06 PM, g.d.d.c wrote:

> > Windows XP 64-bit. Python 2.6.2. Wx 2.8.10.1 (msw-unicode). I'll
> > try to put together a sample app shortly. Is there a standard place
> > to store said sample app?

> Attach it to an email message sent to this list.

> --
> Robin Dunn
> Software Craftsmanhttp://wxPython.org