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
[wxpython-users] wx.ListCtrl Error When Loading Values
by Rich Shepard other posts by this author
May 8 2008 4:59PM messages near this date
Re: [wxpython-users] Re: wx.Panel doubts... | Re: [wxpython-users] wx.ListCtrl Error When Loading Values
I don't see what's causing the error here:

File "/data1/eikos/rulePage.py", line 83, in displayValues
     self.rulesList.InsertStringItem(item, 0, 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: in method 'ListCtrl_InsertStringItem', expected argument 2 of
type 'long'

   Here's the code (with the referenced line 83 marked with a hash):

 	def displayValues(self, event):
 	  for item in self.appData.rules:
 	    self.rulesList.InsertStringItem(item, 0, self.appData.rules[0])
 	    #self.rulesList.InsertStringItem(item, 1, self.appData.rules[1])
 	    self.rulesList.InsertStringItem(item, 2, self.appData.rules[2])
 	    self.rulesList.InsertStringItem(item, 3, self.appData.rules[3])
 	    self.rulesList.InsertStringItem(item, 4, self.appData.rules[4])

   There's only one row in self.appData.rules:

[(u'Variety', u'Fish', u'Wildlife', u'WFV2', u'if variety is high then
goodness is very increased')]

   What I read in the wPIA book is that InsertStringItem() -- without images
-- takes the row (here with the 'item' index), the column, and the string to
be inserted. So, I am not seeing what I've done incorrectly.

   A clue stick is appreciated.

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