Suppresing events to avoid fibrillation
- From: Roedy Green <see_website@xxxxxxxxxxxxxxxxxxxx>
- Date: Wed, 30 Dec 2009 15:44:16 -0800
I run into this problem frequently. I call it fibrillation.
Lets say I do a setText on some component. This triggers an event on
it. That event handler then might do setText's on other components.
If you are really unlucky, you get a circularity.
What would like to do is a sneaky programmatic setText that does NOT
trigger any events, other than perhaps a repaint.
What I have been doing is somewhat klutzy. I have some ad hoc
booleans. When I don't want an event to be acted on, I set the
boolean, then detect it in the event handler, and turn it off.
You need one boolean for each possible event that might be triggered.
If it is not triggered, the event improperly stays suppressed.
Is there a clean way to do this?
Roedy Green Canadian Mind Products
If you give someone a program, you will frustrate them for a day; if you teach them how to program, you will frustrate them for a lifetime.
- Prev by Date: vacancy's for fresh\exp apply resumes
- Next by Date: Re: Suppresing events to avoid fibrillation
- Previous by thread: vacancy's for fresh\exp apply resumes
- Next by thread: Re: Suppresing events to avoid fibrillation