Discussion Board

Results 1 to 1 of 1
  1. #1
    Hello everyone,

    I developped an application for doing Http transaction. I use CAknWaitDialog to indicate the process status. When I tried to cancel the http transaction, the connection could be closed successfully. But the dialog could not be dismissed. The text in the dialog turns to "Application is busy". And I can do nothing to dismiss the dialog any more.

    Here is my source code:
    Code:
    //Constructor, Defines priority for this Active object
    CTelObserver::CTelObserver(CHttpCommunication* aServerComm) : iServerComm(aServerComm)
    	{
    	}
    
    // Two phase construction
    CTelObserver* CTelObserver::NewL(CHttpCommunication* aServerComm)
    	{
    	CTelObserver* self = CTelObserver::NewLC(aServerComm);
    	CleanupStack::Pop(self);
    	return self;
    	}
    
    CTelObserver* CTelObserver::NewLC(CHttpCommunication* aServerComm)
    	{
    	CTelObserver* self = new (ELeave) CTelObserver(aServerComm);
    	CleanupStack::PushL(self);
    	self->ConstructL();
    	return self;
    	}
    
    void CTelObserver::ConstructL()
    	{
    	}
    
    // Destructor
    CTelObserver::~CTelObserver()
    	{
    	}
    
    // Start show waiting dialog
    void CTelObserver::StartWaiting()
    	{
    	if (iWaitNote)
    		{
    		delete iWaitNote;
    		iWaitNote = NULL;
    		}
    
    	CAknWaitDialog* aWaitNote = new (ELeave) CAknWaitDialog(
    			reinterpret_cast<CEikDialog**> (&iWaitNote), ETrue);
    	CleanupStack::PushL(aWaitNote);
    	aWaitNote->SetCallback(this);
    	aWaitNote->PrepareLC(R_HTTP_REQUEST_WAIT_NOTE);
    	CleanupStack::Pop(aWaitNote);
    	iWaitNote = aWaitNote;
    	iWaitNote->RunLD();
    	}
    
    // Change the text in dialog
    void CTelObserver::ChangeWaitNoteTextL(const TDesC& aDesC)
    	{
    	iWaitNote->SetTextL(aDesC);
    	}
    
    // To dismiss wait note
    void CTelObserver::DismissWaitNote()
    	{
    	iWaitNote->ProcessFinishedL();
    	iWaitNote = NULL;
    	}
    
    // From MProgressDialogCallback
    void CTelObserver::DialogDismissedL(TInt aButtonId)
    	{
    	iServerComm->Cancel();
    	iServerComm->CloseConnection();
    	}
    Here is the resource code for dialog:
    Code:
    RESOURCE DIALOG r_http_request_wait_note
    	{
    	flags = EAknWaitNoteFlags | EEikDialogFlagWait |EEikDialogFlagNotifyEsc;
    	buttons=R_AVKON_SOFTKEYS_CANCEL;
    	items =
    		{
    		DLG_LINE
    			{
    			type = EAknCtNote;
    			id = ECidWaitNote;
    			control = AVKON_NOTE
    				{
    				layout = EWaitLayout;
    				singular_label = "Opening Connection..";
    				animation = R_QGN_GRAF_WAIT_BAR_ANIM;
    				};
    			}
    		};
    	}
    Anyone has suggestions? I am really stuck.
    Last edited by charles_happysunny; 2009-03-21 at 22:19.

Similar Threads

  1. Nokie e71: Unable to cancel "call forward if busy" feature
    By mayorq in forum General Development Questions
    Replies: 1
    Last Post: 2008-11-11, 20:04
  2. How to cancel a http connection mid-way
    By capricious28 in forum Mobile Java General
    Replies: 0
    Last Post: 2007-08-10, 10:42
  3. weird CANCEL button behaviour
    By securityfocus in forum Symbian C++
    Replies: 0
    Last Post: 2005-03-18, 14:24
  4. CAknWaitDialog API ? ... ProcessFinishedL ?
    By aesc2 in forum Symbian User Interface
    Replies: 12
    Last Post: 2004-08-14, 09:30
  5. How to get the cancel event In wait Note dialog
    By Waldemar_Arndt in forum Symbian C++
    Replies: 1
    Last Post: 2004-01-10, 11:47

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