You Are Here:

Community: Developer Discussion Boards

#1 Old understanding setCurrent() - 2003-08-13, 16:08

Join Date: Jun 2003
Posts: 2
RalfHupfer
Offline
Registered User
Hi,

I do have difficulties in understanding the behaviour of the setCurrent() method when switching forms.

Consider an application with two forms, form1 and form2, with form1 initially beeing shown, and the following lines of code:

myDisplay.setCurrent (form2);
... // doing some calculations
myDisplay.setCurrent (form1);

The code is executed by a separate thread. In most cases (but not always) form2 is visible afterwards. Since the calls to setCurrent() are simple messages posted to the thread doing the display stuff (the main thread?), this is weird. I could understand if form2 was never been shown, cause the time in-between the calls might be to short, but the last call should prevail over all preceding ones.

Since the effect is not always reproducable, I suspect a concurrency problem here. Can anyone explain this?

Thanks
Ralf
Reply With Quote
Reply « Previous Thread | Next Thread »
Display Modes
Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules

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

vB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Forum Jump

Rate This

 
Bookmark this page: DeliciousDiggFacebookGoogleYahooStumbleUponRedditDiigoTechnocratiTwitter  Share this page Share this page Print this Page Print this page Invite a friend Invite a friend
京ICP备05048969号    Email Newsletters Press Terms & Conditions Privacy Policy Sitemap Contact Us © 2009 Nokia