ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> wxpython-users
wxpython-users
Re: [wxpython-users] wx.ListCtrl Error When Loading Values
by Rich Shepard other posts by this author
May 8 2008 5:47PM messages near this date
Re: [wxpython-users] wx.ListCtrl Error When Loading Values | [wxpython-users] wxGrid - no row labels
On Thu, 8 May 2008, Phil Mayes wrote:

>  This is due to Windows' brain-dead interface design.

Phil,

   If you refer to Microsoft's stuff, we don't touch it. Haven't for more
than a decade now. Strictly linux here. However, if it's a wxPython issue
then that's a different matter.

>  You have to use InsertStringItem for the entry in column 0, and
>  SetStringItem for the rest of the columns.  Do something like:
>         idx = self.list.InsertStringItem(sys.maxint, col0)
>         self.list.SetStringItem(idx, 1, col1)
>         self.list.SetStringItem(idx, 2, col2)
>         self.list.SetStringItem(idx, 3, item.title)

   Ah, so! I do this in the function that adds new rules, but didn't do it
for the function that loads existing rules when the project database is
opened ... just made the adjustment.

   Now I'm getting a different error:

File "/data1/eikos/rulePage.py", line 82, in displayValues
     n = self.rulesList.InsertStringItem(sys.maxint, self.appData.rules[0])
   File
"/usr/lib/python2.4/site-packages/wx-2.8-gtk2-unicode/wx/_controls.py", line
4698, in InsertStringItem
     return _controls_.ListCtrl_InsertStringItem(*args, **kwargs)
TypeError: String or Unicode type required

   And all the items in the tuple _are_ strings. So, closer but still not
there.

Thanks very much,

Rich

-- 
Richard B. Shepard, Ph.D.               |  Integrity            Credibility
Applied Ecosystem Services, Inc.        |            Innovation
<http://www.appl-ecosys.com>      Voice: 503-667-4517      Fax: 503-667-8863
_______________________________________________
wxpython-users mailing list
wxpython-users@[...].org
http://lists.wxwidgets.org/mailman/listinfo/wxpython-users
Thread:
Rich Shepard
Tim Roberts
Rich Shepard
Phil Mayes
Rich Shepard

Privacy Policy | Email Opt-out | Feedback | Syndication
© 2004 ActiveState, a division of Sophos All rights reserved