Discussion Board

Results 1 to 9 of 9
  1. #1
    Registered User kambamsu's Avatar
    Join Date
    Aug 2009
    Posts
    22
    Hi,
    I'm facing a problem with regards to setting the default access point. Initially when i set it for the main thread, its all fine. But when i spawn a new thread to do a little work, the access point which was set initially doesn't seem to apply to the second thread. Also, when i try to do a socket.set_default_access_point in the second thread, my app hangs. I'm not sure how to proceed with this.

    Any help/suggestions is appreciated.

    Thanks

  2. #2
    Nokia Developer Champion gaba88's Avatar
    Join Date
    Feb 2008
    Location
    Ahmedabad, Gujarat, India
    Posts
    3,692
    Quote Originally Posted by kambamsu View Post
    Hi,
    I'm facing a problem with regards to setting the default access point. Initially when i set it for the main thread, its all fine. But when i spawn a new thread to do a little work, the access point which was set initially doesn't seem to apply to the second thread. Also, when i try to do a socket.set_default_access_point in the second thread, my app hangs. I'm not sure how to proceed with this.

    Any help/suggestions is appreciated.

    Thanks
    hello kambamsu

    i guess that you are using some appuifw framework classes which is causing the thread to get hanged up. So use something which is not using the appuifw class in any manner.

    If you can show the code for setting default access point i can make you understand that even better.

    Regards,

  3. #3
    Registered User kambamsu's Avatar
    Join Date
    Aug 2009
    Posts
    22
    Code:
    sock = socket.access_point(socket.select_access_point())
    socket.set_default_access_point(sock)
    That is all i use. It seems pretty simple and basic.

  4. #4
    Nokia Developer Champion gaba88's Avatar
    Join Date
    Feb 2008
    Location
    Ahmedabad, Gujarat, India
    Posts
    3,692
    Quote Originally Posted by kambamsu View Post
    Code:
    sock = socket.access_point(socket.select_access_point())
    socket.set_default_access_point(sock)
    That is all i use. It seems pretty simple and basic.
    ok have you gone through this thread a helpful one , but if you are using in thread then dont use the appuifw based function that will hand the script instead try using Globalui class i have checked that doesnt hang up the script.

  5. #5
    Registered User kambamsu's Avatar
    Join Date
    Aug 2009
    Posts
    22
    I went through that thread, but the solution suggested there still seems to hang my app. By using globalui, do u mean I replace all my ui components with globalui instead of appuifw ? The ones running in my main thread too?

  6. #6
    Nokia Developer Champion gaba88's Avatar
    Join Date
    Feb 2008
    Location
    Ahmedabad, Gujarat, India
    Posts
    3,692
    Quote Originally Posted by kambamsu View Post
    I went through that thread, but the solution suggested there still seems to hang my app. By using globalui, do u mean I replace all my ui components with globalui instead of appuifw ? The ones running in my main thread too?
    ya you got me now try doing that, for sure thats going to help you.

    Regards,

  7. #7
    Registered User kambamsu's Avatar
    Join Date
    Aug 2009
    Posts
    22
    Oh..i guess that wouldn't be possible for me. I already have a 2k line script using appuifw. Is there no other way to avoid this?

  8. #8
    Nokia Developer Champion gaba88's Avatar
    Join Date
    Feb 2008
    Location
    Ahmedabad, Gujarat, India
    Posts
    3,692
    Quote Originally Posted by kambamsu View Post
    Oh..i guess that wouldn't be possible for me. I already have a 2k line script using appuifw. Is there no other way to avoid this?
    hello kambamsu

    sorry but AFAIK if you are using appuifw with threads than it will definetly hang your script, now i am out of suggestions for you.

  9. #9
    Regular Contributor raf1hh's Avatar
    Join Date
    Nov 2007
    Posts
    147
    What works for me is the following:

    1. Query for available access points
    2. Present a list to the user to select a default access point (don't use the built in method, just build one yourself)
    3. remember the choice
    4. Set default access point based on the user choice

    Now in your thread you can access the ap object that the user chose and just set it again as default access point.

    Hope it helps

    raf
    http://www.bdcsoftware.com/development-blog

Similar Threads

  1. S60 5th Edition Emulator Crashes
    By Yagiza in forum Symbian Tools & SDKs
    Replies: 26
    Last Post: 2010-08-07, 21:24
  2. How to set the MMS access point programatically?
    By suiying0792 in forum Symbian C++
    Replies: 0
    Last Post: 2009-10-27, 09:40
  3. 为什么会启动这么多的线程
    By shaojieli in forum Symbian
    Replies: 1
    Last Post: 2008-08-19, 05:34
  4. Replies: 4
    Last Post: 2006-08-17, 10:05

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