Using CAknWaitDialog in Document?

Login to reply to this topic.
Fri, 2006-03-10 14:43
Joined: 2003-12-17
Forum posts: 39
I have following situation: my Document-class owns a pretty large database, which needs to run a pretty long initialization when the application starts. Since nothing appears on the screen during this initialization, I should add a Progress dialog so, that the user will know the wait is expectable.

The problem: I haven't been able to display a such dialog from Document::ConstructL() (where the database is initialized). It looks like I would need to have AppUI already constructed if I want to display this dialog. Are there any ways to by-pass this?

My current (non-working) code:
Code:
void myDocument::ConstructL()
{
    iWaitDialog = new(ELeave)CAknWaitDialog(
    REINTERPRET_CAST(CEikDialog**, &iWaitDialog));
    //iWaitDialog->SetCallBack(this);
    iWaitDialog->ExecuteLD(R_WAIT_DIALOG_DATABASE);
   
    iDatabase = CMyDatabase::NewL(); // runs initialization in ConstructL()
   
    iWaitDialog->ProcessFinishedL();
    iWaitDialog = NULL;
}

/Cir

Sat, 2006-03-11 03:44
Joined: 2005-06-04
Forum posts: 131
Re: Using CAknWaitDialog in Document?
Hi,

Try to use CAknGlobalNote. If you want to see a progress bar, use CAknGlobalWaitNote flag in ShowNoteL.
  • Login to reply to this topic.