×

Discussion Board

Results 1 to 11 of 11
  1. #1
    Registered User
    Join Date
    Apr 2006
    Posts
    10

    I can't run the application because of listbox

    I'm using Carbide.c++ and trying to create listbox in my application. But after I enter this code, the application can't run and close automatically..

    void CMobiHomeAppView::ConstructL( const TRect& aRect )
    {
    // Create a window for this application view
    CreateWindowL();
    SetRect( aRect );
    iListBox = new (ELeave) CAknSingleStyleListBox();
    iListBox->SetContainerWindowL(*this);
    TResourceReader reader;
    iEikonEnv->CreateResourceReaderLC(reader, R_DEMO_LISTBOX);
    iListBox->ConstructFromResourceL(reader);
    CleanupStack::PopAndDestroy();
    // Activate the window, which makes it ready to be drawn
    ActivateL();
    }

    void CMobiHomeAppUi::ConstructL()
    {
    // Initialise app UI with standard value.
    BaseConstructL(CAknAppUi::EAknEnableSkin);
    iAppView = CMobiHomeAppView::NewL(ClientRect());
    iAppView->SetMopParent(this);
    iAppView->ConstructL( ClientRect() );
    AddToStackL( iAppView );
    }

    Somebody please help me..

  2. #2
    Super Contributor
    Join Date
    May 2005
    Location
    Hyderabad,India
    Posts
    704

    Re: I can't run the application because of listbox

    Hi,

    Check your CountComponentControl(), ComponentControl() and SizeChanged() functions in your view clas. Check listbox example in SDK


    regards
    eswar

  3. #3
    Registered User
    Join Date
    Apr 2006
    Posts
    10

    Re: I can't run the application because of listbox

    Thanx eswar for the information but it is still the same.. Where can I get the listbox examples? Can u give me the link of the example?

  4. #4
    Registered User
    Join Date
    Apr 2005
    Location
    Barcelona
    Posts
    1,678

    Re: I can't run the application because of listbox

    Check the sdk examples.

  5. #5
    Super Contributor
    Join Date
    May 2005
    Location
    Hyderabad,India
    Posts
    704

    Re: I can't run the application because of listbox

    Hi,


    go to this site and download emcc examples, it can useful
    http://ncsp.forum.nokia.com/csp/?body=detail;aid=11463

    regards,
    eswar

  6. #6
    Nokia Developer Expert
    Join Date
    Jan 2006
    Posts
    11

    Lightbulb Re: I can't run the application because of listbox

    In a nutshell your listbox is not implemented correctly. I would recommend using emcc example of a listbox I think 'SimpleList' example implementation is pretty good and simple. Then you can modify it and incorporate into your app.

  7. #7
    Registered User
    Join Date
    Apr 2006
    Posts
    10

    Re: I can't run the application because of listbox

    Thanx guys for the feedback.. I've got 2 errors when I try to build my listbox.

    First error:
    Undefined symbol: 'class CEikScrollBarFrame * CEikListBox::CreateScrollBarFrameL(int) (?CreateScrollBarFrameL@CEikListBox@@QAEPAVCEikScrollBarFrame@@H@Z)' referenced from 'void CListBoxAppView::ConstructL(class TRect const &) (?ConstructL@CListBoxAppView@@AAEXABVTRect@@@Z)' in ListBoxAppView.cpp:62

    Second error:
    Undefined symbol: 'class CEikScrollBarFrame * const CEikListBox::ScrollBarFrame(void) (?ScrollBarFrame@CEikListBox@@QAEQAVCEikScrollBarFrame@@XZ)' referenced from 'void CListBoxAppView::ConstructL(class TRect const &) (?ConstructL@CListBoxAppView@@AAEXABVTRect@@@Z)' in ListBoxAppView.cpp:63


    void CListBoxAppView::ConstructL( const TRect& aRect )
    {
    // Create a window for this application view
    CreateWindowL();

    iListBox= new ( ELeave ) CAknSingleStyleListBox;
    iListBox->SetContainerWindowL(*this);
    TResourceReader reader;
    iEikonEnv->CreateResourceReaderLC(reader,R_LISTBOX);
    CleanupStack::PopAndDestroy();
    62: iListBox->CreateScrollBarFrameL(ETrue);
    63: iListBox->ScrollBarFrame()->SetScrollBarVisibilityL(CEikScrollBarFrame::EOn, CEikScrollBarFrame::EAuto);

    // Set the windows size
    SetRect( aRect );

    // Activate the window, which makes it ready to be drawn
    ActivateL();
    }


    The errors seem look like cause by the scroll bar coding. Can u please help me again..

  8. #8
    Super Contributor
    Join Date
    May 2005
    Location
    Hyderabad,India
    Posts
    704

    Re: I can't run the application because of listbox

    Hi,

    Add eiksbfrm.h in include files


    regards,
    eswar

  9. #9
    Registered User
    Join Date
    Apr 2006
    Posts
    10

    Re: I can't run the application because of listbox

    Thanks eswar, but i still get the same error. It same goes to CTextListBoxModel, SetItemTextArray and SetItemDimmed. The undefined symbol errors still occured although i've included the required class. What is the problem actually? Can someone help me please...

  10. #10
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,683

    Re: I can't run the application because of listbox

    It is a linker error, add eikcoctl.lib to your mmp/solution.

  11. #11
    Registered User
    Join Date
    Apr 2006
    Posts
    10

    Re: I can't run the application because of listbox

    Thanx wizard_hu.. It really works!

Similar Threads

  1. application to run on the symbian S40, S60, S80
    By tiger zhou in forum Symbian
    Replies: 11
    Last Post: 2006-02-20, 01:45
  2. Why my application doesn't run when some application running in
    By bb_sathya in forum Mobile Java General
    Replies: 1
    Last Post: 2005-12-03, 15:30
  3. Why my application doesn't run when some application running in back graound.
    By bb_sathya in forum Mobile Java Networking & Messaging & Security
    Replies: 0
    Last Post: 2005-12-03, 05:31
  4. Replies: 0
    Last Post: 2003-06-09, 04:40
  5. Unable to run application error inside the application
    By prakala in forum Mobile Java General
    Replies: 2
    Last Post: 2003-05-27, 22:46

Posting Permissions

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