Please help on wxPython/Gtk issue

Did you already tried wxYield()?

Ricardo

Ah! On the lack of StaticText controls not being refreshed -- it was not
that at all. They were behind a panel. My mistake. But on Windows, the
StaticText controls were in front of the panel -- and they should not
have been as far as I can tell from the way I did the layout. So the
identical code behaves differently on Windows vs. Linux in regards to
what windows are on top. I guess the moral of the story is to develop on
Linux first and then port to Windows, as the Windows seems more
(erroneously) forgiving.

Bruce

···

-----Original Message-----
From: Ricardo Pedroso [mailto:ricardo.pedroso@netvisao.pt]
Sent: Monday, September 26, 2005 3:22 PM
To: wxPython-users@lists.wxwidgets.org
Subject: Re: [wxPython-users] Please help on wxPython/Gtk issue

On Mon, 2005-09-26 at 13:06 -0600, brucedickey@micron.com wrote:

Hi All,

I have a rather large app that was developed on Windows and worked
fine. After moving over to Red Hat, I see an issue, and it's hard to
know exactly in what area. I get a CORBA callback, post a msg to the
GUI and in the handler update a TextCtrl. The new text is displayed,
somethines I get a GTK error saying that it attempted to install an
idle handler twice.

StaticText controls I am attempting to update are not refreshed on the
GUI. I tried added an explicit Refresh() to them but got the above
"idle handle twice" error. They are however being set because I can
read back the new text via GetLabel().

brucedickey@micron.com wrote:

I guess the moral of the story is to develop on
Linux first and then port to Windows, as the Windows seems more
(erroneously) forgiving.

Despite being a Linux fanatic, I'm not sure this is true. They are just different, I don't know that either is more forgiving. so the moral is to test on all platforms as you go. Also to read the docs carefully, and make sure to use recommended methods.

As for Yield(), there is a parameter you can pass to Yield ( I think True, but maybe False, check the docs) that means "Yield only if needed", though that may not have been there in 2.4. 2.4 might have had a wxSafeYield(), however.

-Chris

···

--
Christopher Barker, Ph.D.
Oceanographer
                                         
NOAA/OR&R/HAZMAT (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception

Chris.Barker@noaa.gov

Chris Barker wrote:

I guess the moral of the story is to develop on
Linux first and then port to Windows, as the Windows seems more
(erroneously) forgiving.

Despite being a Linux fanatic, I'm not sure this is true. They are just different, I don't know that either is more forgiving. so the moral is to test on all platforms as you go. Also to read the docs carefully, and make sure to use recommended methods.

I agree, it isn't true. What is true is that whatever platform you develop on is the platform that will have the fewest bugs for you, since you are getting instant feedback from your platform as you develop. Linux is more forgiving in lots of ways, and Windows in others. Mac seems to be the least forgiving of the three.

But, in my experience there are very few things that require platform-specific coding. You just need to test on all three platforms when you find some inconsistency. Typically my checkins in such cases will be many, and the logs will look like:

"On Mac, making my recent changes to foo work."
"Back on Linux, needed to fix blah."
"Back on Mac, mostly good but here's another tweak."
"Testing on Windows, the bar event needs to be explicitly raised."

Followed by a general message "I can confirm that my recent changes to foo are working on all three platforms now.".

It's just the way it is. I'm fortunate that my wife is a Mac fanatic, so I can use her computer when I need to do such testing.

···

brucedickey@micron.com wrote:

--
Paul McNett
http://paulmcnett.com
http://dabodev.com