Info about the CAknDialog::ExecuteLD function

Login to reply to this topic.
Wed, 2004-11-03 13:54
Joined: 2004-09-06
Forum posts: 349
Sometimes the documentation can be quite extraordinary bad. This is what I found when trying to know what the ExecuteLD function really does and returns. From CAknQueryDialog:

"IMPORT_C TInt CAknQueryDialog::ExecuteLD  (  TInt  aResourceId   )  
Reimplemented from CAknDialog."

And this is what I found in the CAknDialog base class:

"IMPORT_C TInt CAknDialog::ExecuteLD  (  TInt  aResourceId   )  
Reimplemented in CAknQueryDialog."

Can someone tell me what executeLD really does and what it returns?

I have the following code, which not shows the R_CONTACT_DIALOG, but only shows it in the background when the CAknQueryDialog is shown (the query dialog is not supposed to be shown at all). What can be wrong?
Code:
CTerminalAppContactForm* contactForm = CTerminalAppContactForm::NewL(contactInfo);
if (!contactForm->ExecuteLD(R_CONTACT_DIALOG)) {
//WHY IS THE FORM SHOWN HERE BUT DISAPPEARS AFTER CLICKED OK ON THE FOLLOWING DIALOG??????????
CAknMessageQueryDialog* dlg2 = CAknMessageQueryDialog::NewL(_L("APA"));
dlg2->PrepareLC(R_MESSAGE_POPUP_INFO);
dlg2->QueryHeading()->SetTextL(_L("DET GICK FEL VID ÖPPNING!"));
dlg2->RunLD();
}


//Frustrated programmer Cry

Wed, 2004-11-03 15:20
Joined: 2004-07-28
Forum posts: 1379
Info about the CAknDialog::ExecuteLD function
ExecuteLD calls PrepareLC then RunLD...

It returns the resource ID of the button you pressed so you would do:

if(dlg->ExecuteLD(...) == EAknSoftkeyOk) etc.

didster

Wed, 2004-11-03 16:36
Joined: 2004-09-06
Forum posts: 349
Info about the CAknDialog::ExecuteLD function
Thanks,

I also found out that you have to have the EEikDialogFlagWait flag set for a dialog to stay visible:

Code:
RESOURCE DIALOG r_contact_dialog
   {
   flags = EEikDialogFlagNoDrag | EEikDialogFlagFillAppClientRect | EEikDialogFlagWait
         | EEikDialogFlagButtonsRight | EEikDialogFlagNoTitleBar
         | EEikDialogFlagCbaButtons /*| EEikDialogFlagModeless */;
   buttons =  R_AVKON_SOFTKEYS_OPTIONS_DONE;
   form = r_contact_form;
   }
  • Login to reply to this topic.