×

Discussion Board

Results 1 to 5 of 5
  1. #1
    Registered User
    Join Date
    Mar 2003
    Posts
    25

    Is ExecuteLD() method of a dialog leave-safe?

    Should a dialog be put onto the CleanupStack before calling ExecuteLD, since surely ExecuteLD must be performing leaving operations before it deletes the dialog?

  2. #2
    Regular Contributor
    Join Date
    Mar 2003
    Posts
    157

    RE: Is ExecuteLD() method of a dialog leave-safe?

    No the dialog should NOT be put in the CleanupStack before calling ExecuteLD().

    This is because once called, ExecuteLD takes ownership of the dialog and handles the deletion, both in normal and leaving cases.

    A couple of lines from \eikon\src\eikdialg.cpp :

    70 EXPORT_C void CEikDialog::PrepareLC(TInt aResourceId)
    71 {
    72 CleanupStack::PushL(this);
    73 BaseConstructL();
    74 StaticConstructL(aResourceId);
    75 }
    76
    77 EXPORT_C TInt CEikDialog::ExecuteLD(TInt aResourceId)
    78 {
    79 PrepareLC(aResourceId);
    80 return(RunLD());
    81 }


    The dialog is put on the CleanupStack on line 72 so the ExecuteLD method is leave-safe.

  3. #3
    Regular Contributor
    Join Date
    Jun 2004
    Posts
    135

    Re: Is ExecuteLD() method of a dialog leave-safe?

    And how the dialog act , when is modeless (the flag EEikDialogFlagModeless is set) ?

    I really need to use a modeless dialog.

  4. #4
    Registered User
    Join Date
    Jul 2004
    Posts
    93

    Re: Is ExecuteLD() method of a dialog leave-safe?

    where do you get the file \eikon\src\eikdialg.cpp????

    luke

  5. #5
    Regular Contributor
    Join Date
    Oct 2004
    Location
    India
    Posts
    138

    Smile Re: Is ExecuteLD() method of a dialog leave-safe?

    hi, this eikon/src will give a good insight into the architecture of dialogs

Posting Permissions

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