LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 04-22-2004, 05:40 PM   #1
Dark Carnival
Member
 
Registered: Jun 2003
Posts: 166

Rep: Reputation: 30
wxPython ListCTRL problems (stumbling in the dark)


Heya!
No doubt python is nice (really nice!). No doubt wxPython certainly has features and it's nice looking too. But the main problem I have with it, is the lack of documentation.

www.spido.dk/hostile/listctrl.py

I try to make this small list work but at lines 48-56 it barfs all over the place. This is one of the lines:
self.list_ctrl_1.SetStringItem(x, 1, data[1])

The error I get is:
------------------------------------------------------
Traceback (most recent call last):
File "blaze.py", line 79, in ?
app = MyApp(0)
File "/usr/lib/python2.3/site-packages/wxPython/wx.py", line 1951, in __init__ _wxStart(self.OnInit)
File "blaze.py", line 71, in OnInit
listname = list(None, -1, "")
File "blaze.py", line 25, in __init__
self.__do_layout()
File "blaze.py", line 48, in __do_layout
self.list_ctrl_1.SetStringItem(x, 1, data[1])
File "/usr/lib/python2.3/site-packages/wxPython/controls2.py", line 474, in SetStringItem
val = controls2c.wxListCtrl_SetStringItem(self, *_args, **_kwargs)
wxPython.wxc.wxPyAssertionError: C++ assertion "wxAssertFailure" failed in /usr/src/redhat/BUILD/wxPythonSrc-2.4.2.4/src/generic/listctrl.cpp(3856): invalid item index in SetItem
-----------------------------------------------------

Now I've been in trouble before, and eventually (most of the time) you can figure it out. But this is bugging me since I can't make much sense of that error, nor do I have much luck finding any documentation of a proper usage of wxlistctrl (apart from the wxpythondemo example which I certainly try to build a bit after, but as with many of the examples, it's way too loaded with extra features IMHO)

I'm really hoping someone has had a mess with this before and can see the mistake(s) I've made, and most importantly, -explain what it is and how I should be doing.

Thanks in advance!
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Problems during installing wxPython ivanatora Linux - Software 2 10-08-2005 09:54 AM
vi too dark colors alaios Linux - Software 2 05-19-2005 11:24 AM
Sim City 4 with Cedega stumbling TarrasQ Linux - Games 5 01-26-2005 05:16 PM
Screen is very dark Imerion Linux - Laptop and Netbook 19 01-23-2005 04:07 PM
Computing in the dark? MasterC General 33 07-30-2003 07:11 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 02:54 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration