You Are Here:

Community: Developer Discussion Boards

#1 Old ValueError: Listbox type mismatch - 2009-02-01, 19:58

Join Date: Mar 2003
Posts: 936
Location: Espoo, Finland
JOM's Avatar
JOM
Offline
Forum Nokia Champion
Hi,

Just checking, if anyone knows what this error means: ValueError: Listbox type mismatch?

I get it when I try to set a 2-row-item list into Listbox item, which was initialized with 1-row-item list (or vice versa). I saw nothing in manual warning about this... Well, guess I have to create minimum 2 different Listbox items and carefully select which one to reuse

Wondering,

--jouni
Reply With Quote

#2 Old Re: ValueError: Listbox type mismatch - 2009-02-01, 21:11

Join Date: Feb 2008
Posts: 743
Location: Belo Horizonte, Brazil
Send a message via Skype™ to Rafael T.
Rafael T.'s Avatar
Rafael T.
Offline
Forum Nokia Champion
Quote:
Originally Posted by JOM View Post
Hi,

Just checking, if anyone knows what this error means: ValueError: Listbox type mismatch?

I get it when I try to set a 2-row-item list into Listbox item, which was initialized with 1-row-item list (or vice versa). I saw nothing in manual warning about this... Well, guess I have to create minimum 2 different Listbox items and carefully select which one to reuse

Wondering,

--jouni
Well, I also faced this problem some days ago.

It seems it's about how you initialize the list. You need to initialize it in the same way you will use.

Example:

Code:
lb = appuifw.Listbox([u""], callback)
If you initialize it like this, it understands you'll have a 1 row listbox. So, if you try to set it into 2 row after initializing like that, you'll get that ValueError.

The solution is initializing it as a 2 row listbox already:

Code:
lb = appuifw.Listbox([(u"", u"")], callback)
This will prepare the listbox to receive an item and its description. Now you can set the list normally:

Code:
my_list = [(item, decription)]

lb.set_list(my_list)

Hope it helps,

Rafael.
Reply With Quote

#3 Old Re: ValueError: Listbox type mismatch - 2009-02-01, 22:27

Join Date: Mar 2003
Posts: 936
Location: Espoo, Finland
JOM's Avatar
JOM
Offline
Forum Nokia Champion
Quote:
Originally Posted by Rafael T. View Post
Code:
lb = appuifw.Listbox([u""], callback)
If you initialize it like this, it understands you'll have a 1 row listbox. So, if you try to set it into 2 row after initializing like that, you'll get that ValueError.
Thanx for confirmation, I was suspecting that Since my current app-under-progress has nothing but listboxes (so far), then I'll have to create both types in advance.

Thanx,

--jouni wondering how to get this documented into official manual
Reply With Quote
Reply « Previous Thread | Next Thread »
Display Modes
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

Posting Rules

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

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump
Similar Threads
Thread Thread Starter Forum Replies Last Post
How to remove type mismatch compile error gloria799 Symbian Tools & SDKs 3 2008-07-09 04:29
D211 with RH7.3 fiveam Multimodecards 3 2003-02-24 10:06
D211 : Compiling the user interface for Linux...? franz_meyer Multimodecards 1 2002-12-09 12:48
Problem with Nokia D211 Linux Drivers fiveam Multimodecards 1 1970-01-01 02:00

Rate This

 
Bookmark this page: DeliciousDiggFacebookGoogleYahooStumbleUponRedditDiigoTechnocratiTwitter  Share this page Share this page Print this Page Print this page Invite a friend Invite a friend
京ICP备05048969号    Email Newsletters Press Terms & Conditions Privacy Policy Sitemap Contact Us © 2009 Nokia 
RDF Facets: qdcZidentifierQSxhttpE3aE2fE2fdiscussionE2eforumE2enokiaE2ecomhttpE3aE2fE2fdiscussionE2eforumE2enokiaE2ecomE2fforumE2fshowthreadE2ephpE3ftE3d81449X qdcZtypeQUqfnZE45E78cludedFromGeneralE4cistingsQ qdcZtypeQUqfntypeZCommunityContentQ qdcZtypeQUqfntypeZE44iscussionQ qdcZtypeQUqfntypeZE44iscussionContentQ qdcZtypeQUqfntypeZE52esourceQ qdcZtypeQUqfntypeZWebpageQ qdcZtypeQUqmarsZManagedE52esourceQ qdcZtypeQUqwebZInformationE52esourceQ qdcZtypeQUqwebZPageQ qdcZtypeQUqwebZE52esourceQ qdcZtypeQUqrdfsZE52esourceQ qfnZtopicQUqfnTopicZpythonQ qfnZtypeQUqfntypeZCommunityContentQ qfnZtypeQUqfntypeZE44iscussionQ qfnZtypeQUqfntypeZE44iscussionContentQ qfnZtypeQUqfntypeZE52esourceQ qfnZtypeQUqfntypeZWebpageQ qfnZuserE5ftagQSxpythonX qmarsZlanguageQUxhttpE3aE2fE2fswE2enokiaE2ecomE2flanguageE2d1E2fenX qrdfZtypeQUqfnZE45E78cludedFromGeneralE4cistingsQ qrdfZtypeQUqfntypeZCommunityContentQ qrdfZtypeQUqfntypeZE44iscussionQ qrdfZtypeQUqfntypeZE44iscussionContentQ qrdfZtypeQUqfntypeZE52esourceQ qrdfZtypeQUqfntypeZWebpageQ qrdfZtypeQUqmarsZManagedE52esourceQ qrdfZtypeQUqwebZInformationE52esourceQ qrdfZtypeQUqwebZPageQ qrdfZtypeQUqwebZE52esourceQ qrdfZtypeQUqrdfsZE52esourceQ