Using CAknWaitDialog in Document?
| Fri, 2006-03-10 14:43 | |
|
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 |
|






Forum posts: 131
Try to use CAknGlobalNote. If you want to see a progress bar, use CAknGlobalWaitNote flag in ShowNoteL.