Re: Flashing label
- From: muppet <scott asofyet org>
- To: Gtk-Perl-List <gtk-perl-list gnome org>
- Subject: Re: Flashing label
- Date: Wed, 14 Jul 2004 08:40:34 -0400
On Jul 14, 2004, at 2:16 AM, Daniel Kasak wrote:
What would be involved in making a label flash?
we've discussed this before, actually:
http://mail.gnome.org/archives/gtk-perl-list/2004-April/msg00021.html
that example sets up a short number of flashes. if you want it to
flash slowly until the user acknowledges somehow, set the timeout to a
slower value (half a second, one second, etc), and store the timeout
tag so you can remove the timeout externally when you know the user has
responded.
I'd have to do something like create a new thread that wakes up every
so often and alternates the colour of the label, right?
...
Suggestions? ie is this more hassle than it's worth? Are there any
decent alternatives?
yes, nine times out of ten threads are more trouble than they are
worth, and cause more problems than they solve. for this type of
problem, the appropriate solution is to use the event loop and
timeouts.
--
"the ternary operator makes it a bit less ugly."
-- kaffee
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]