app.Pending, app.Dispatch, OSX and 2.9

Do you have a typical platform dependent issue you're battling with ? Ask it here. Make sure you mention your platform, compiler, and wxWidgets version.
Post Reply
rppass
Earned a small fee
Earned a small fee
Posts: 23
Joined: Sun Apr 29, 2007 11:39 pm
Location: Massachusetts, USA
Contact:

app.Pending, app.Dispatch, OSX and 2.9

Post by rppass » Fri Oct 14, 2011 6:56 pm

Prior to 2.9 I would frequently have logic like:


while (app.Pending())
{
app.Dispatch();
}

to release control.

With 2.9 and OSX the while loop never exits.

1. Was my logic wrong before 2.9 and now is showing a latent bug?
2. Is this a bug in the implementation of wxWidgets 2.9 for OSX


Thanks,
Ralph Pass

Auria
Site Admin
Site Admin
Posts: 6695
Joined: Thu Sep 28, 2006 12:23 am
Contact:

Re: app.Pending, app.Dispatch, OSX and 2.9

Post by Auria » Fri Oct 14, 2011 11:09 pm

This piece of code is something I have never seen and I think it's quite edgy. I'm not sure what you mean by "release control", but for basic control release you should use wxYield
"Keyboard not detected. Press F1 to continue"
-- Windows

tmsorensen
In need of some credit
In need of some credit
Posts: 9
Joined: Wed Feb 27, 2008 9:44 am
Location: Denmark

Re: app.Pending, app.Dispatch, OSX and 2.9

Post by tmsorensen » Thu May 31, 2012 1:12 pm

We have used this construction in our project as well (and it still works on MS Windows with 2.9.3). However, app.SafeYield() did almost the same as this in 2.8.4 - and it works with 2.9.3 so that seems to be the solution to your (and our) problem :-)

BTW wxYield() is deprecated in 2.9.3 ;-)

Cheers,
Thomas

Post Reply