×

Discussion Board

Results 1 to 6 of 6
  1. #1
    jp4symbian
    Guest

    Unhappy WaitDialog during synchronous process

    Hey folks,

    I have developed an application which performs some Xml parsing from a file.
    If the file is too large, this conversion process takes very long during which my
    screen gets dimmed.

    I have been trying to put a WaitDialog while the above process takes place.
    I am forcing the dialog to appear on the screen by calling:
    iWaitDialog->DrawNow();
    iWaitDialog->ActivateL();

    But the dialog does not get displayed properly. It does appear on the screen but the animation gets displayed for a second only after the conversion process gets finished!!!

    Is it that WaitDialog can only be displayed for an asynchronously running background process? Is there any workaround for synchronous process?

    I have been searching for long but haven't found the right solution. I do not understand how to run the dialog asynchronously bcoz its not possible to make my conversion process asynchronous...

    Please suggest me a viable solution.

    Thanks in advance....

    jp

  2. #2
    Super Contributor
    Join Date
    Jun 2004
    Location
    SymbianLand
    Posts
    763

    Re: WaitDialog during synchronous process

    Yes ultimately the dialog requires some CPU to draw itself on the screen.The XML parser just does not relieve the CPU for the dialog to draw itself and when it does,which is at the end of the xml parsing,the dialog is ultimately shown.
    Possible solutions:
    1. Make the parsing process async.
    2. Put in a timer and start the dialog and when the timer expires,start the parsing process.I haven't tried this one,but logically this should work.
    Do let us know if it works.
    --Mayur.

  3. #3
    jp4symbian
    Guest

    Smile Re: WaitDialog during synchronous process

    hi mayur,

    Thanks a lot for the reply. I actually know the problem but was not able to come up with a solution.

    At present, i don't think i can make the parsing process async, but i think i will have to give it a try...
    I am not sure of the timer solution that u have given but it really sounds worth trying.....
    i shall surely try it and post the results here as soon as i implement it..

    Thanks again!

    Quote Originally Posted by mayur_24
    Yes ultimately the dialog requires some CPU to draw itself on the screen.The XML parser just does not relieve the CPU for the dialog to draw itself and when it does,which is at the end of the xml parsing,the dialog is ultimately shown.
    Possible solutions:
    1. Make the parsing process async.
    2. Put in a timer and start the dialog and when the timer expires,start the parsing process.I haven't tried this one,but logically this should work.
    Do let us know if it works.
    --Mayur.

  4. #4
    jp4symbian
    Guest

    Thumbs up Re: WaitDialog during synchronous process

    Hi Mayur,

    Your solution has worked wonders!!!
    I am actually able to display the wait dialog while the conversion is taking place...

    I did exactly as u said, started my conversion after canceling the timer of the wait dialog, i.e. i called the conversion method in the WaitNoteTimeoutL() function.

    Though it has changed the flow of my code and made it a little bit jumbled up but its really worth it since the dialog is getting displayed so well!!

    Thanks a million!! My problem has been solved once n for all!!

  5. #5
    Regular Contributor
    Join Date
    Mar 2003
    Posts
    131

    Wink Re: WaitDialog during synchronous process

    Quote Originally Posted by jp4symbian View Post
    Hi Mayur,

    Your solution has worked wonders!!!
    I am actually able to display the wait dialog while the conversion is taking place...

    I did exactly as u said, started my conversion after canceling the timer of the wait dialog, i.e. i called the conversion method in the WaitNoteTimeoutL() function.

    Though it has changed the flow of my code and made it a little bit jumbled up but its really worth it since the dialog is getting displayed so well!!

    Thanks a million!! My problem has been solved once n for all!!
    hi i think i'm facing similar problem, can u help share in more details how u solved it?
    thanks

  6. #6
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Budapest, Hungary
    Posts
    28,572

    Re: WaitDialog during synchronous process

    There is a multi-threaded progress dialog example in the Wiki (simply search for progress to find it), and you can probably apply that to CAknWaitDialog-s too (you can also find examples about that, search for wait or the class - CAknWaitDialog - itself).

Similar Threads

  1. Process termination check
    By prasanta_sadhukhan in forum Symbian
    Replies: 3
    Last Post: 2007-03-31, 16:27
  2. launching a new process in Series 60 3rd
    By tal.shahar@mobile-mx.com in forum Symbian
    Replies: 0
    Last Post: 2006-11-01, 08:28
  3. Getting Ram usage of a process
    By Bernd42 in forum Symbian
    Replies: 0
    Last Post: 2004-02-17, 13:33
  4. Replies: 0
    Last Post: 2003-09-24, 06:27
  5. Replies: 0
    Last Post: 2002-05-30, 06:53

Posting Permissions

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