×

Discussion Board

Results 1 to 2 of 2
  1. #1
    Regular Contributor
    Join Date
    Nov 2006
    Location
    Brebes, Indonesia
    Posts
    129

    Problem in wait note

    I have multi view application, and was insert wait note to first of view. But panic always occur while wait note be called be command. some one please help me.

    this my code
    first container view
    #define KListPosition TPoint(0,0)
    #define KNumberStepToComplete 10

    const TInt KNumberOfStepsToSaveGame(5);
    void CWAPServContainerApplication::ConstructL(const TRect& aRect)
    {
    iTimeWaster.CreateLocal();

    CreateWindowL();

    iItemList = new (ELeave) CAknDoubleStyleListBox();

    iItemList->SetContainerWindowL(*this);
    iItemList->SetMopParent(this);
    iItemList->ConstructL(this,EAknListBoxViewerFlags);

    InitListBox(); // my function to prepare the list box with txt file.

    iItemList->MakeVisible(true);
    iItemList->SetRect(aRect);
    iItemList->ActivateL();
    iItemList->DrawNow();

    SetRect(aRect);
    ActivateL();
    }
    TInt CWAPServContainerApplication::CountComponentControls() const
    {
    return 1;
    }

    CCoeControl* CWAPServContainerApplication::ComponentControl(TInt aIndex) const
    {
    switch (aIndex)
    {
    case 0:
    return iItemList;
    default:
    return NULL;
    }
    }

    void CWAPServContainerApplication::Draw(const TRect& /*aRect*/) const
    {
    // Get the standard graphics context
    CWindowGc& gc = SystemGc();

    // Gets the control's extent
    TRect rect = Rect();

    // Clears the screen
    gc.Clear(rect);
    }

    CWAPServContainerApplication::~CWAPServContainerApplication()
    {
    delete iItemList;
    iTimeWaster.Close();
    }

    void CWAPServContainerApplication::SizeChanged()
    {
    iItemList->SetExtent (KListPosition, iItemList->MinimumSize());
    }
    void CWAPServContainerApplication::StartingProgram()
    {
    CAknWaitNoteWrapper* waitNoteWrapper = CAknWaitNoteWrapper::NewL();
    CleanupStack::PushL(reinterpret_cast<CBase*>(waitNoteWrapper)); // Required reinterpret_cast as CAknWaitNoteWrapper inherits privately from CActive
    waitNoteWrapper->ExecuteL(R_WAPSERV_STARTING_PROGRAM, *this);
    CleanupStack::PopAndDestroy(waitNoteWrapper);
    }

    void CWAPServContainerApplication::DialogDismissedL(TInt /*aButtonId*/)
    {
    //no implementationrequire
    }

    TBool CWAPServContainerApplication::IsProcessDone() const
    {
    return (iStepsCompleted == KNumberStepToComplete);
    }

    void CWAPServContainerApplication::ProcessFinished()
    {
    iTimeWaster.Cancel();

    iStepsCompleted = 0;
    }

    void CWAPServContainerApplication::StepL()
    {
    TRequestStatus status;
    TInt delay = 1000000; // 1 second
    iTimeWaster.After(status, delay);
    User::WaitForRequest(status);

    iStepsCompleted++;
    }
    my first of view code
    void CWAPServViewApplication::HandleCommandL(TInt aCommand)
    {
    if (aCommand == EWAPServSettingApplication)
    {
    AppUi()->ActivateLocalViewL(TUid::Uid(EWAPServViewSettingId));
    }
    else if(aCommand == EWAPServRefreshStatus)
    {
    iContainer->ReAssignListBox();
    }
    else if(aCommand == EWAPServRefreshStatus)
    {
    iContainer->StartingProgram();
    }
    else
    {
    AppUi()->HandleCommandL(aCommand);
    }
    }
    My AppUi code
    // handle any menu commands
    void CWAPServAppUi::HandleCommandL(TInt aCommand)
    {
    switch(aCommand)
    {
    case EEikCmdExit:
    case EAknSoftkeyExit:
    {
    Exit();
    break;
    }
    case EWAPServStopApplication:
    {
    _LIT(stopMessage,"Stop");
    CAknInformationNote* stopNote = new (ELeave) CAknInformationNote;
    stopNote->ExecuteLD(stopMessage);
    break;
    }
    default:
    {
    Panic(KPanicBasicAppUI,EWAPServBasicUi);
    break;
    }
    }
    }
    http://blogehendrawan.blogspot.com - Kembangin symbian di Indonesia yukk....

  2. #2
    Regular Contributor
    Join Date
    Nov 2006
    Location
    Brebes, Indonesia
    Posts
    129

    Re: Problem in wait note

    Thanks all, i have solved the problem i just assign EWaitId = 1 in my hrh file.
    http://blogehendrawan.blogspot.com - Kembangin symbian di Indonesia yukk....

Similar Threads

  1. Problem MMC+USB Connection
    By Fede81 in forum Symbian
    Replies: 1
    Last Post: 2007-06-14, 06:13
  2. Format Conversion from RTTTL to Nokia Binary
    By marrami in forum Smart Messaging
    Replies: 6
    Last Post: 2006-08-22, 14:47
  3. another Null pointer exception
    By kvchen1985 in forum Mobile Java Tools & SDKs
    Replies: 1
    Last Post: 2004-06-28, 15:33
  4. problem with wait note
    By Rx-lee in forum Symbian
    Replies: 3
    Last Post: 2004-04-21, 13:22
  5. How to get the cancel event In wait Note dialog
    By Waldemar_Arndt in forum Symbian
    Replies: 1
    Last Post: 2004-01-10, 11:47

Posting Permissions

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