Discussion Board

Results 1 to 4 of 4
  1. #1
    Registered User wchunming's Avatar
    Join Date
    Jan 2009
    Posts
    15
    I'll describe a problem I come across during tesing Qt feature. And post my explanation to this behavior.
    I wanted to send my app to background. I was done in a button("mybutton") handler as follow:
    TApaTask myRunningTask( CCoeEnv::Static()->WsSession() );
    RWindowGroup& rg = CCoeEnv::Static()->RootWin();
    myRunningTask.SetWgId( rg.Identifier() );
    myRunningTask.SendToBackground();

    CActiveScheduler::Start();

    The app was send to background as I wished. When I switch to it again, everything seems ok except that the right-bottom "cancel" button cannot be used to quit the app.

    When I debug the source code in emulator, I found that it is cause by nested wait loop problem. The app start a waiting loop in current thread, and in the handler or some event(such as button click), I start one more waiting loop. When I press the "cancel" button, the exit command is generated and the status of the app is set to quit, but the current thread is still waiting for the "mybutton" handling process to be done. So I can never quit the app after starting a second waiting loop without stop it.
    Maybe A possible solution is: when I switch to the app manually, the main widget handle some event indicating the app is front again(stop the waiting loop start by me).
    Hope this will be helpful to those who are testing CActiveScheduler.
    This thread is also supposed to be an answer for my previous post: how to bring an app to back ground
    -Revv

  2. #2
    Regular Contributor jakoskin's Avatar
    Join Date
    Sep 2008
    Posts
    286
    Thanks for the detailed description.
    Creating a perfect event loop seems to be pretty difficult in mixed environment

  3. #3
    Registered User katroll's Avatar
    Join Date
    Nov 2008
    Posts
    3
    It may be that I'm completely misunderstanding the problem, but as far as I can see, this is expected behavior. If you start an instance of the active scheduler, you also have to stop it. Qt will not do that for you (nor should it). If you call exit() from within a nested loop, Qt will terminate all the event loops that it owns, but it won't terminate CActiveScheduler loops, since it doesn't own those.

  4. #4
    Registered User wchunming's Avatar
    Join Date
    Jan 2009
    Posts
    15
    I know what you meant. It is not the fault of Qt or S60 api, it is a problem of how to use S60 api properly with Qt. Qt did make a pretty good wrapper over S60 api. But the design of S60 api seems not so easily understood, sometimes they are even error-proned(Maybe it is only a problem of my own).

Similar Threads

  1. Changing App Mgr settings from J2ME app
    By ddbhasin in forum Mobile Java General
    Replies: 6
    Last Post: 2007-09-21, 07:18
  2. symbian signed testing problem.
    By anglina in forum Symbian C++
    Replies: 0
    Last Post: 2007-02-01, 10:15
  3. App in Background and Wait Dialog
    By ianratcliffe in forum Symbian C++
    Replies: 1
    Last Post: 2006-02-22, 03:46
  4. Dialog's clipping area (again). Nokia experts, please help
    By synov in forum Symbian User Interface
    Replies: 0
    Last Post: 2004-06-26, 14:35
  5. Launching an app from pJava..
    By krajag in forum PersonalJava
    Replies: 0
    Last Post: 2002-10-10, 19:57

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