473,387 Members | 1,398 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

wxPython - Event processing order arbitrary across platforms?

Greetings,

For user actions on a wxWidget that trigger multiple events for that
wxWidget, is the order those events are processed in undefined,
and therefore arbitrary from one platform (ie Windows) to the next
(ie Linux)?

Specifically, I have a convience aggregate class that combines
a wxStaticText with a wxComboBox, as I often need those two
at the same time. The aggregate catches events from the wxComboBox
and stores them in it's own class. The calling parent then catches
the event, uses the stored values and set's any variables and
does any processing it needs.

But I had a slight bug, which I didn't catch until a recent upgrade.
Suddenly, this technique still worked under windows - and didn't
under Linux. The bug? the wxComboBox and the parents were catching
two different events - oops. (I was catching the EVT_COMBOBOX in the
child widget - and EVT_TEXT in the parent methods - thanks to
cut'n'paste an error I managed to propagate through most of my
code. Duh)

The reason the Windows version works, is because apparently the
EVT_COMBOBOX is processed first. By the time the parent catches
the EVT_TEXT evt, the aggregate widget has already caught the
EVT_COMBOBOX and set its local values. Under Linux, however, it
appears that the EVT_TEXT is processed first - before the
aggregate catches the EVT_COMBOBOX and has had a chance to set
it's values - boom.

Hence the above question.

I know that the event propagation for any single event is pretty
well defined, crawling up through the superclasses, and for wxCommand-
derived events, up through the container heirarchy. But I really
haven't found any docs that guarantee which events are processed
first when a user action fires multiple events.

My bug is fixed - but curiosity and coding go hand in hand.

Cheers,

Conrad
Aug 2 '06 #1
0 1422

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

25
by: James Goldwater | last post by:
I'm starting a new hopfully-commercial project soon, and I face a dilemma about whether Python with wxPython would be appropriate. The project has 3 main areas: a) manipulation of lists and...
4
by: jblazi | last post by:
I am having this problem: I use Python for my teaching and right now we are trying to implement some sort of very simple graphical game the pupils can play across the Internet. For this, we use...
15
by: Grant Edwards | last post by:
Can anybody recommend a good book on wxPython? Are there any books on wxPython? I've been trying to learn wxPython and/or wax for a few weeks, and I'm just not getting it. wxWindows seems...
5
by: fooooo | last post by:
This is a network app, written in wxPython and the socket module. This is what I want to happen: GUI app starts. User clicks a button to 'start' the work of the app. When start is pressed, a new...
9
by: perchef | last post by:
Hi, I have several files to download and a GUI to update. I know this is a frequently asked question but i can't find an appropriate solution. My Downloader extends threading.Thread and update a...
9
by: zxo102 | last post by:
Hi everyone, I am using a python socket server to collect data from a socket client and then control a image location ( wxpython) with the data, i.e. moving the image around in the wxpython frame....
44
by: bg_ie | last post by:
Hi, I'm in the process of writing some code and noticed a strange problem while doing so. I'm working with PythonWin 210 built for Python 2.5. I noticed the problem for the last py file...
4
by: Jimmy | last post by:
hi, all I'm having a problem with creating custom events in wxpython. I have a class A handling some data processing work and another class B of GUI matter. I need GUI to display information...
16
by: Andrea Gavana | last post by:
Hi Diez & All, Do you mind explaining "why" you find it *buttugly*? I am asking just out of curiosity, obviously. I am so biased towards wxPython that I won't make any comment on this thread...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.