Re: hang on leopard

Hi Alex,

An update:

The error messages do not happen if I do not do show/hide the 2 dialog
boxes.

Is there anything that I should do before calling show(false) and
show(true)?

Thanks in advance!

----- Original Message ----
From: Zhang P. [email protected]
To: General discussion of wxRuby [email protected]
Sent: Monday, February 18, 2008 4:04:56 PM
Subject: Re: [wxruby-users] hang on leopard

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

  Be a better friend, newshound, and

know-it-all with Yahoo! Mobile. Try it now.

-----Inline Attachment Follows-----


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

Zhang P. wrote:

The error messages do not happen if I do not do show/hide the 2 dialog
boxes.

Is there anything that I should do before calling show(false) and
show(true)?
Not that I can think of. It might be worth checking the first argument
to Dialog.new - I would recommend that the Dialogs are given the frame
as the parent, not nil. You may be doing this already.

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.

I haven’t seen this error message before. If you’re able to isolate the
error, please post the code as I use Leopard as my main OS and could
give try it out.

thanks
alex