[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Perlpanel-devel] catching applet exceptions
From: |
Moshe Kaminsky |
Subject: |
[Perlpanel-devel] catching applet exceptions |
Date: |
Sat, 10 Jul 2004 11:49:03 +0300 |
User-agent: |
Mutt/1.5.6i |
Hi,
As I wrote in another mail, I think perlpanel has a problem with
exceptions caused in the applets code.
Naturally, not all applets handle all exceptions that arise in their
code. When such an exception happens, it crashes the whole panel. This
is unfortunate, especially since there is always new applet code to
test.
I believe there is a way to solve it, but I don't know enough about
gtk/glib to know for sure: As far as I understand, all applets are
children of an hbox. What I thought is to put this hbox inside a
Gtk2::EventBox. Now, this widget has a method set_above_child, which
allows it (as I understand it) to get all signals (button clicks, etc.),
instead of the hbox. This EventBox will then pass the signal to the hbox
child inside an eval block, thus trapping exceptions that occur in the
callbacks. In addition, all methods such as configure,
get_default_config, etc. should also, of course, be called inside an
eval.
The only thing is, I don't know if it's possible to install a "universal
callback" for all signals, and how can one pass the signal to another
widget.
At any rate, I believe something should be done.
Moshe
--
I love deadlines. I like the whooshing sound they make as they fly by.
-- Douglas Adams
Moshe Kaminsky <address@hidden>
pgpiHPUzoXBX3.pgp
Description: PGP signature
- [Perlpanel-devel] catching applet exceptions,
Moshe Kaminsky <=