×

Discussion Board

Results 1 to 5 of 5
  1. #1
    Registered User
    Join Date
    Oct 2009
    Posts
    5

    Exclamation Listbox not working

    this simple code for list box is giving error:
    the code is:

    #Create an instance of Listbox and set it as the application's body
    lb = appuifw.Listbox(items, handle_selection) #line 25
    appuifw.app.body = lb

    line 25,in <module>
    lb = appuifw.Listbox(items, handle_selection)
    SymbianError:[Errno -1]
    KErrNotFound


    also what is the error in:
    for i in fruits and j in items: #fruits and items are lists



    pls help me debug.hoping for a fast reply.

  2. #2
    Regular Contributor
    Join Date
    Sep 2005
    Location
    Finland, Helsinki
    Posts
    323

    Re: Listbox not working

    Please find out how to use CODE tags around code snippets.

    Quote Originally Posted by vaas45 View Post
    this simple code for list box is giving error:
    the code is:

    #Create an instance of Listbox and set it as the application's body
    lb = appuifw.Listbox(items, handle_selection) #line 25
    appuifw.app.body = lb

    line 25,in <module>
    lb = appuifw.Listbox(items, handle_selection)
    SymbianError:[Errno -1]
    KErrNotFound
    It would be helpful to show how you create items and the definition of handle_selection().

    Quote Originally Posted by vaas45 View Post
    also what is the error in:
    for i in fruits and j in items: #fruits and items are lists
    I'd suggest this:

    Code:
    >>> fruits=[1,2,3,4,5]
    >>> items=[9,8,7,6,5]
    >>> for i in fruits:
    ...     for j in items:
    ...         print i, j
    I'll also suggest you to read some Python tutorial.
    --
    Aapo Rista
    http://code.google.com/p/pys60gps/
    http://opennetmap.org/

  3. #3
    Regular Contributor
    Join Date
    Nov 2007
    Posts
    147

    Re: Listbox not working

    KErrNotFound can also be caused by an invalid icon reference. I don't know if you use icons in your item tuple so it's hard to say.
    http://www.bdcsoftware.com/development-blog

  4. #4
    Registered User
    Join Date
    Oct 2009
    Posts
    5

    Re: Listbox not working

    http://wiki.forum.nokia.com/index.ph...tbox_for_PyS60

    even this program for multi selection list is giving the same error.
    Last edited by vaas45; 2009-12-05 at 04:04.

  5. #5
    Registered User
    Join Date
    Oct 2009
    Posts
    5

    Re: Listbox not working

    i am not asking about nested for loop.it is like
    for(i=0,j=12;i<12,j<78;i++,j++) of c++ .here variable j is not nested .i want to write this in a single line.

Similar Threads

  1. CAknGrid, listbox and single click
    By spol in forum Symbian User Interface
    Replies: 3
    Last Post: 2009-05-26, 10:25
  2. how to display the Listbox
    By arungupta_2jan in forum Symbian
    Replies: 4
    Last Post: 2009-03-03, 21:10
  3. No rule to male target
    By arayappan_it in forum Carbide.c++ IDE and plug-ins (Closed)
    Replies: 4
    Last Post: 2008-02-28, 10:49
  4. Compile problem on Create dynamically a listbox
    By aferrario in forum Symbian
    Replies: 1
    Last Post: 2006-07-19, 04:45
  5. listbox and model
    By stenlik in forum Symbian
    Replies: 1
    Last Post: 2004-05-27, 07:27

Posting Permissions

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