×

Discussion Board

Results 1 to 3 of 3
  1. #1
    Registered User
    Join Date
    Apr 2006
    Posts
    23

    What is wrong with this code? (resource file)

    hey!

    SDK version: 2ed 2fp series 60

    I'm trying to learn symbian programming. So now I'm trying to create a static list. The code below gives 3 build error (Carbide.C++ marks these lines red: LBUF { txt = ListBox_Item; }, - so I assume it is some errors with these items )...

    I don't know what is causing these errors

    Any suggestions?

    RESOURCE LISTBOX r_test_listbox
    {
    array_id = r_test_listbox_items;
    flags = EAknListBoxSelectionList;
    }

    RESOURCE ARRAY r_test_listbox_items
    {
    items = {
    LBUF { txt = ListBox_Item1; },
    LBUF { txt = ListBox_Item2; },
    LBUF { txt = ListBox_Item3; }
    };
    }

  2. #2
    Registered User
    Join Date
    Feb 2007
    Location
    India
    Posts
    1,128

    Re: What is wrong with this code? (resource file)

    Quote Originally Posted by Audun Holme
    hey!

    SDK version: 2ed 2fp series 60

    I'm trying to learn symbian programming. So now I'm trying to create a static list. The code below gives 3 build error (Carbide.C++ marks these lines red: LBUF { txt = ListBox_Item; }, - so I assume it is some errors with these items )...

    I don't know what is causing these errors

    Any suggestions?

    RESOURCE LISTBOX r_test_listbox
    {
    array_id = r_test_listbox_items;
    flags = EAknListBoxSelectionList;
    }

    RESOURCE ARRAY r_test_listbox_items
    {
    items = {
    LBUF { txt = ListBox_Item1; },
    LBUF { txt = ListBox_Item2; },
    LBUF { txt = ListBox_Item3; }
    };
    }
    hi Audun Holme,

    I think, U can write in this way....

    RESOURCE ARRAY r_test_listbox_items
    {
    items = {
    LBUF { txt = "ListBox_Item1"; },
    LBUF { txt = "ListBox_Item2"; },
    LBUF { txt = "ListBox_Item3"; }
    };

    }

    If your problem will solve then ok otherwise You go through this link it will help you.

    http://www.symbiantutorial.org/en/sp...urces/List+box

    Have a nice day..!

  3. #3
    Nokia Developer Champion
    Join Date
    Mar 2006
    Location
    Helsinki, Finland
    Posts
    8,347

    Smile Re: What is wrong with this code? (resource file)

    Quote Originally Posted by Audun Holme
    ...
    RESOURCE ARRAY r_test_listbox_items
    {
    items = {
    LBUF { txt = ListBox_Item1; },
    LBUF { txt = ListBox_Item2; },
    LBUF { txt = ListBox_Item3; }
    };
    }
    You are missing quotation mark and something more.
    Refer to this wiki page: Listbox creation using resource

    Kiran.

Similar Threads

  1. [announce] PyUIQ. Python for UIQ 2.1 and 3.x
    By OscarBernabeu in forum Symbian
    Replies: 35
    Last Post: 2008-01-17, 09:12
  2. dynamic drive name in resource file
    By twlai in forum Symbian
    Replies: 1
    Last Post: 2007-04-12, 07:14
  3. Common problem: wrong file format "exception"
    By lukaszpl in forum Mobile Java General
    Replies: 0
    Last Post: 2005-12-05, 17:09
  4. Strings from resource file
    By Danack in forum Mobile Java General
    Replies: 2
    Last Post: 2003-06-05, 01:54
  5. how to create a list from the resource file
    By zhang_guoqing in forum Symbian User Interface
    Replies: 1
    Last Post: 2003-03-17, 00:45

Posting Permissions

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