Discussion Board
Is ExecuteLD() method of a dialog leave-safe?
2001-12-10, 16:13
#1
Registered User
Should a dialog be put onto the CleanupStack before calling ExecuteLD, since surely ExecuteLD must be performing leaving operations before it deletes the dialog?
RE: Is ExecuteLD() method of a dialog leave-safe?
2001-12-10, 17:27
#2
Regular Contributor
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.
Re: Is ExecuteLD() method of a dialog leave-safe?
2005-11-22, 13:08
#3
Regular Contributor
And how the dialog act , when is modeless (the flag EEikDialogFlagModeless is set) ?
I really need to use a modeless dialog.
Re: Is ExecuteLD() method of a dialog leave-safe?
2005-11-23, 19:27
#4
Registered User
where do you get the file \eikon\src\eikdialg.cpp????
luke
Re: Is ExecuteLD() method of a dialog leave-safe?
2005-11-24, 05:33
#5
Regular Contributor
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
Forum Rules