All About Symbian - Nokia (S60) and Sony Ericsson (UIQ) smartphones unwrapped

  #1  
Old 27-06-2003, 12:15 PM
dalore dalore is offline
Registered User
 
Join Date: Jun 2003
Posts: 5
dalore is on a distinguished road
query dialog in thread

Hello,

here is some code I use to display a query dialog.

[code:1]
CAknQueryDialog* dlg;
dlg = CAknQueryDialog::NewL( CAknQueryDialog::EConfirmationTone );
CleanupStack::PushL(dlg);
dlg->SetPromptL(msgprompt);
CleanupStack::Pop();

// show dialog
TBool result = dlg->ExecuteLD( R_MINO_NEWMESSAGES );
[/code:1]

This code works fine when I dont use threads, but if i try this code in a thread i get a KERN-EXEC 3 error.
The error occurs on this line:
[code:1]
dlg = CAknQueryDialog::NewL( CAknQueryDialog::EConfirmationTone );
[/code:1]

Whats causing this error, and why does it work outside the thread.

The thread shares the heap with the parent thread. Surely it must be possible to show a query dialog from a child thread?

Thanks
Dalore
Ads

  #2  
Old 21-09-2004, 08:30 AM
ian_symbian
Guest
 
Posts: n/a
This panic will always occur if an exception is not handled within any thread. Use a trap harness to catch your exception.

Quote:
Originally Posted by dalore
Hello,

here is some code I use to display a query dialog.

[code:1]
CAknQueryDialog* dlg;
dlg = CAknQueryDialog::NewL( CAknQueryDialog::EConfirmationTone );
CleanupStack::PushL(dlg);
dlg->SetPromptL(msgprompt);
CleanupStack::Pop();

// show dialog
TBool result = dlg->ExecuteLD( R_MINO_NEWMESSAGES );
[/code:1]

This code works fine when I dont use threads, but if i try this code in a thread i get a KERN-EXEC 3 error.
The error occurs on this line:
[code:1]
dlg = CAknQueryDialog::NewL( CAknQueryDialog::EConfirmationTone );
[/code:1]

Whats causing this error, and why does it work outside the thread.

The thread shares the heap with the parent thread. Surely it must be possible to show a query dialog from a child thread?

Thanks
Dalore
 

Bookmarks

Tags
dialog, query, thread

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



All times are GMT. The time now is 01:23 AM.


vBulletin skins developed by: eXtremepixels
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Copyright Notes || Contact Us || Privacy Policy