Discussion Board

Results 1 to 5 of 5
  1. #1
    Registered User cl_fragen's Avatar
    Join Date
    Mar 2003
    Posts
    25
    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 OSXDev's Avatar
    Join Date
    Mar 2003
    Posts
    157
    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 GeKI's Avatar
    Join Date
    Jun 2004
    Posts
    135
    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 lukedau's Avatar
    Join Date
    Jul 2004
    Posts
    93
    where do you get the file \eikon\src\eikdialg.cpp????

    luke

  5. #5
    Regular Contributor ruchaitu's Avatar
    Join Date
    Oct 2004
    Location
    India
    Posts
    138
    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
  •  
Nokia Developer aims to help you create apps and publish them so you can connect with users around the world.

京ICP备05048969号  © Copyright Nokia 2013 All rights reserved