Forum: wxRuby Proper way to use SplashScreen?

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
10ffad34687d0045466c257cb92ff2b3?d=identicon&s=25 Mahlon Smith (mahlon)
on 2009-02-02 21:16
Hey all.  I'm using Wx 1.9.9 on ruby 1.8.6.  I can't seem to instantiate
a SplashScreen without causing a SystemStackError -- am I doing
something wrong?

This code is in my App's on_init() method:

splash_img = Wx::Bitmap.new( '/tmp/image.png', Wx::BITMAP_TYPE_PNG )
Wx::SplashScreen.new( splash_img,
    Wx::SPLASH_CENTRE_ON_SCREEN | Wx::SPLASH_TIMEOUT,
    3000, nil, -1 )

... which produces the following, after the splash times out.

./test:138:in `show': stack level too deep (SystemStackError)
        from ./test:138:in `main_loop'
        from ./test:138


Thanks for any insight.
06f6780c99d4a8dd71f2b474082ea9ce?d=identicon&s=25 Alex Fenton (Guest)
on 2009-02-02 22:52
(Received via mailing list)
Mahlon Smith wrote:
> Hey all.  I'm using Wx 1.9.9 on ruby 1.8.6.  I can't seem to instantiate
> a SplashScreen without causing a SystemStackError -- am I doing
> something wrong?

It's a bug, sorry. Thanks for the report and sample code. It's fixed by
this patch:

http://rubyforge.org/pipermail/wxruby-svn-commit/2...

alex
89f9acdcbc663e41e45ce590cd746d6e?d=identicon&s=25 Fabio Petrucci (biospank)
on 2009-02-03 00:05
(Received via mailing list)
I've got the same error and resolved using SPLASH_NO_TIMEOUT, but i
don't
know why :-/

cheers,

bio.
10ffad34687d0045466c257cb92ff2b3?d=identicon&s=25 Mahlon Smith (mahlon)
on 2009-02-03 19:09
Alex Fenton wrote:
>
> It's a bug, sorry. Thanks for the report and sample code. It's fixed by
> this patch:


Awesome.  Thanks for the speedy reply, Alex!
This topic is locked and can not be replied to.