Forum: wxRuby RFC on cleaning Wx::App

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.
4814bd563aa6cf7a06f5cbccca18d340?d=identicon&s=25 Pascal Hurni (phi)
on 2008-11-28 12:07
Hi,

I added a missing feature in Wx::App that let's you handle in one place
exceptions raised in any event handler (without exiting the main_loop,
so that these exceptions may be not fatal to the app).

At that time I found that the docs of Wx::App and the code itself are
not in sync. I'm in the process of creating a ticket with a patch for
this.

Before I complete the patch, I request some comments on these methods:
  #on_fatal_exception
  #on_unhandled_exception
  #on_exception_in_main_loop

As these methods are designed to deal with C++ exceptions, shouldn't we
simply %ignore them in wxRuby? (That's my proposal)

Additionnaly, I found that App.i doesn't %include "wxApp.h" at all, the
class definition is inlined in App.i directly (at the end of file). So
should we get rid of "wxApp.i" ?

Regards,

Pascal
06f6780c99d4a8dd71f2b474082ea9ce?d=identicon&s=25 Alex Fenton (Guest)
on 2008-11-29 16:24
(Received via mailing list)
Pascal Hurni wrote:
> I added a missing feature in Wx::App that let's you handle in one place
> exceptions raised in any event handler (without exiting the main_loop,
> so that these exceptions may be not fatal to the app).
>

That would be good. Ideally something that would work ruby-ishly - eg
rescue.

This discussion is probably better on wxruby-dev.

> simply %ignore them in wxRuby? (That's my proposal)
>

Yes.

> Additionnaly, I found that App.i doesn't %include "wxApp.h" at all, the
> class definition is inlined in App.i directly (at the end of file). So
> should we get rid of "wxApp.i" ?

Probably not - the header files in swig/classes/include work as a list
of the classes available, even if some of them aren't used in building
the wxruby library.

thanks
alex
This topic is locked and can not be replied to.