×

Discussion Board

Results 1 to 13 of 13
  1. #1
    Regular Contributor
    Join Date
    Mar 2003
    Posts
    52

    Problem with listbox

    Hi guys. I'm a italian new developer. I just try to create a simple application whit a listbox. I start from the simple application HelloWord and I have try to implements the view.cpp whit the code for create a listbox at run time. The compilator show me 3 errors:

    Specified file 'Prova2.lib' not found
    Udefined symbol: 'CDesC16ArrayFlat::CDesC16ArrayFlat(int)
    Undefined symbol: 'void CDesC16Array::AppendL(class TDesC16 const &)

    I use Carbide.c++ with SDK S60 2nd version FP3.

    Thanks to all that will help me.
    Sorry for my english!!!

  2. #2
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Budapest, Hungary
    Posts
    28,752

    Re: Problem with listbox

    Quote Originally Posted by MAD4NOKIA
    Specified file 'Prova2.lib' not found
    This means that Prove2.lib is not found (I have no idea what it could be)
    Udefined symbol: 'CDesC16ArrayFlat::CDesC16ArrayFlat(int)
    Undefined symbol: 'void CDesC16Array::AppendL(class TDesC16 const &)
    These mean that you have not opened the SDK Help and checked the page of CDesC16ArrayFlat (use Index or Search) to find out which library is needed for handling descriptor arrays.
    You can add libraries via the project properties page in Carbide. Look for linker settings.

  3. #3
    Regular Contributor
    Join Date
    Mar 2003
    Posts
    52

    Re: Problem with listbox

    I have import the class badesca.h like the SDK help say to do...but the error is still the same.

  4. #4
    Regular Contributor
    Join Date
    Mar 2003
    Posts
    52

    Re: Problem with listbox

    I have tried to create the listbox from the resurce reader too...but when i run the application from the emulator, the application exit automatically.

    Here is the code:

    void CMyContainer::ConstructL(const TRect& aRect)
    {
    // Create listbox
    iListBox = new ( ELeave ) CAknSingleStyleListBox(); // markable
    iListBox->SetContainerWindowL( *this );

    // Initialize resource reader, passing resource id as parameter
    TResourceReader rr;
    iEikonEnv->CreateResourceReaderLC( rr , R_LISTBOX );
    // Load and construct listbox
    iListBox->ConstructFromResourceL( rr );
    CleanupStack::PopAndDestroy(); // rr
    // Activate listbox
    iListBox->SetRect( Rect() );
    iListBox->ActivateL();
    }

    I have implements CountComponentControls, ComponentControl and SizeChanged.

    Please help my I'm desperate!!!

  5. #5
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Budapest, Hungary
    Posts
    28,752

    Re: Problem with listbox

    Quote Originally Posted by MAD4NOKIA
    I have import the class badesca.h like the SDK help say to do...but the error is still the same.
    Your error is a linker error. badesca.h is not a library file.

  6. #6
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Budapest, Hungary
    Posts
    28,752

    Re: Problem with listbox

    As I remember, you have to use ConstructL even if you are using ConstructFromResourceL; although I am not sure.

  7. #7
    Regular Contributor
    Join Date
    Mar 2003
    Posts
    52

    Re: Problem with listbox

    You say that i must import the bafl.lib?
    How can I do that?

  8. #8
    Regular Contributor
    Join Date
    Mar 2003
    Posts
    52

    Re: Problem with listbox

    Quote Originally Posted by wizard_hu_
    As I remember, you have to use ConstructL even if you are using ConstructFromResourceL; although I am not sure.
    I don't understand what i say...please make me understand your words.

  9. #9
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Budapest, Hungary
    Posts
    28,752

    Re: Problem with listbox

    Quote Originally Posted by MAD4NOKIA
    You say that i must import the bafl.lib?
    How can I do that?
    Feel free to read my first post in this thread. I cannot check, since I have no Carbide here. You should open Properties, go down in the tree until you suddenly see a lots of settings (3rd or 4th item, maybe C/C++ Build or something very close to that), look for Linker settings, and on the right there should be some list already containing libraries such as euser, avkon, and some other. There you can add bafl.lib.

  10. #10
    Regular Contributor
    Join Date
    Mar 2003
    Posts
    52

    Re: Problem with listbox

    Thank you very much!! You're my savior!!

  11. #11
    Regular Contributor
    Join Date
    Mar 2003
    Posts
    52

    Re: Problem with listbox

    Ok i have create the listbox...but the higligth indicator won't move. What i have to do for make it move on the listbox?

  12. #12
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Budapest, Hungary
    Posts
    28,752

    Re: Problem with listbox

    Implement CMyContainer::OfferKeyEventL and forward events to iListBox. Also make sure that you put your CMyContainer to the control stack in the AppUi (AddToStackL in ConstructL after instantiation and RemoveFromStack in the destructor).
    Check the correct syntax of these methods in the SDK Help.

  13. #13
    Regular Contributor
    Join Date
    Mar 2003
    Posts
    52

    Re: Problem with listbox

    No, i had forgot to implement the SetMopParent function in MyAppUi.
    However thanks for your help!!!

Similar Threads

  1. Replies: 2
    Last Post: 2007-04-05, 06:22
  2. plz help .....listbox problem
    By Kapil Kaushik in forum Symbian
    Replies: 3
    Last Post: 2006-02-23, 13:49
  3. Problem with Multiselection Listbox in DIALOG ( checkbox )
    By vemulakiran in forum Symbian User Interface
    Replies: 0
    Last Post: 2006-01-12, 12:59
  4. listbox problem (series 80)
    By jokerbirot in forum Symbian
    Replies: 3
    Last Post: 2005-02-18, 09:35
  5. Problem with listbox
    By elenabonetti in forum Symbian
    Replies: 1
    Last Post: 2003-02-07, 20:03

Posting Permissions

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