Hi Alex,
Thanks. I’ll look into it.
BTW, just an FYI: The “hang” problem disappears after I restart my
leopard machine, and I’m back to my original issues where I kept
getting the following message at random times (the code works, however):
2008-02-18 16:00:06.129 ruby[686:10b] *** Exception handlers were not
properly removed. Some code has jumped or returned out of an
NS_DURING…NS_HANDLER region without using the NS_VOIDRETURN or
NS_VALUERETURN macros.
Mon Feb 18 16:00:06 djonli-djonlis-macbook-pro-17.local ruby[686]
: CGContextRestoreGState: invalid context
What could I had done wrong?
Regards … Djonli.
----- Original Message ----
From: Alex F. [email protected]
To: General discussion of wxRuby [email protected]
Sent: Monday, February 18, 2008 11:24:21 AM
Subject: Re: [wxruby-users] hang on leopard
Zhang
Zhang
Peng
wrote:
A
dialog
box
that
shows
numbers
in
flashing
fashion.
This
dialog
has
a
number
thread
that
shows
a
number,
sleep,
show
next
number,
sleep,
…
A
dialog
box
that
shows
running
time
(one
thread),
and
another
thread
running
waiting
for
the
number
thread
to
finish
showing
the
numbers,
and
wait
for
a
user
to
type
in
the
result
of
adding
up
those
numbers.
It
sounds
like
you
are
using
the
Threads
just
to
time
events
rather
than
carry
out
more
complex
background
tasks.
In
this
case
I
would
strongly
recommend
that
you
use
Wx::Timer
directly.
This
will
give
you
more
accurate
timing
than
using
threads
and
sleep,
and
will
avoid
the
complexity
of
using
threads
as
well.
As
of
1.9.4,
there’s
simple
idioms
for
using
Timer:
Wx::Timer.every(milliseconds)
do
repeated
event
end
Wx::Timer.after(milliseconds)
do
delayed
event
end
There’s
an
example
of
a
ticking
clock
in
bigdemo/wxStatusBar.rbw
in
the
samples,
which
uses
Wx::Timer.
This
might
be
helpful.
cheers
alex
wxruby-users
mailing
list
[email protected]
http://rubyforge.org/mailman/listinfo/wxruby-users
____________________________________________________________________________________
Looking for last minute shopping deals?
Find them fast with Yahoo! Search.
http://tools.search.yahoo.com/newsearch/category.php?category=shopping