×

Discussion Board

Results 1 to 4 of 4
  1. #1
    Registered User
    Join Date
    May 2004
    Posts
    14

    Wait Dialog display crashes!

    Hi Friends,
    I have seen a lot of posts regarding the CAknWaitDialog.

    I am simply not able to display my dialog. Here is my code
    --------------
    Resource file:
    RESOURCE DIALOG r_mywait_dialog
    {
    flags = EAknWaitNoteFlags;
    buttons = R_AVKON_SOFTKEYS_CANCEL;
    items =
    {
    DLG_LINE
    {
    type = EAknCtNote;
    id = EWaitDialogId;
    control= AVKON_NOTE
    {
    layout = EWaitLayout;
    singular_label = qtn_mywait_dlg_text;
    animation = R_QGN_GRAF_WAIT_BAR_ANIM;
    };
    }
    };
    }
    --------------------
    Container.h
    Container does not implement any of the wait/progress dialog callbacks
    -----------------
    Container.cpp

    void CPushToTalkContainer::ShowRegisteringDialog(TBool aVisible)
    {
    if(aVisible)
    {
    iWaitDialog = new (ELeave) CAknWaitDialog((REINTERPRET_CAST(CEikDialog**,&iWaitDialog)));
    iWaitDialog->ExecuteLD(R_MYWAIT_DIALOG);
    }
    else
    {
    iWaitDialog->ProcessFinishedL();
    }
    }
    --------------
    Calling this function from the view class as
    iContainer->ShowRegisteringDialog(ETrue);
    -------------

    This always (I mean always) fails during the call to ExecuteLD()

    Please help me out!

    Thanks,
    Ravi

  2. #2
    Nokia Developer Moderator
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,166
    Hi, please try remembering the write the error description (the note shown when the app crashes), it usually gives very good clue on what is going wrong.

    Anyway, you resource defines cancel buttons, so then your wiat dialog should also have callback that gets called when the cancel button is pressed. so try changing it something like this:

    iWaitDialog = new (ELeave) CAknWaitDialog((REINTERPRET_CAST(CEikDialog**,&iWaitDialog)), ETrue);
    iWaitDialog->PrepareLC(R_WAIT_NOTE_SOFTKEY_CANCEL);
    iWaitDialog->SetCallback(this);
    iWaitDialog->SetTextL(_L("What ever..."));
    iWaitDialog->RunLD();

    and the resource:
    RESOURCE DIALOG r_wait_note_softkey_cancel
    {
    flags = EAknWaitNoteFlags | EEikDialogFlagNotifyEsc;
    buttons = R_AVKON_SOFTKEYS_CANCEL;
    items =
    {
    DLG_LINE
    {
    type = EAknCtNote;
    id = EAknExNoteCtrlIdWaitNote;
    control= AVKON_NOTE
    {
    layout = EWaitLayout;
    animation = R_QGN_GRAF_WAIT_BAR_ANIM;
    };
    }
    };
    }

    yucca

  3. #3
    Registered User
    Join Date
    May 2004
    Posts
    14
    Hi Yucca,

    - Actually I want this dialog to be a non-cancellable one, since the action performed here is required by each n every functionality that follows.

    - Also I dont know how much time this may take as it is a request being made through a connection to the outside world.

    - Also I want this dialog to be displayed as soon as the application starts, hence I am calling this dialog in the first active View's DoActivateL() method based on a flag iIsConnected. (May be this is a problem. Can you help me here?)

    - About the error description, actually there is no note displayed while running the emulator (epoc.exe), it just displays a Microsoft's Dialog saying "epoc.exe has encountered some problems and needs to be closed"
    If I run it from my IDE (Visual Studio), it crashes in some DisAssembly code after the dialog's ExecuteLD() is called. :)

    I have gone through some of the other threads in this forum regarding Wait Dialogs and tried out your suggesstions, but NONE of them have worked for me.

    Regards,
    Ravi

  4. #4
    Nokia Developer Moderator
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,166
    it would be good to make the dialog cancellable, since users sometimes don't want to wait too long, they rather close the app than wait.

    Anyway to make it non-cancellable just change CBA buttons to be empty ones.. simple.

    Anyway I would first try taking any other code away and checking that the wait dialog works, it could be that the problem is in somewhere else than in the dialog. Just thinking about that you said that you tried everything without a success, so maybe it is correct already.

    yucca

Posting Permissions

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