[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Perlpanel-devel] catching applet exceptions
From: |
Gavin Brown |
Subject: |
Re: [Perlpanel-devel] catching applet exceptions |
Date: |
Thu, 15 Jul 2004 22:25:39 +0100 |
Hi Moshe, sorry for taking so long to reply, I'm very busy just now.
> > > 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 think this is less of a problem for a "standard user", who will only
> > use the applets that ship with PerlPanel.
>
> Is that really the way you would like it to be? I thought there would be
> some web location where people could contribute their applets. Writing
> an applet is an easy task, probably many would be contributed by various
> people.
You know, I really hadn't thought about it like that. But you're right
PerlPanel would work quite well with a gDesklets style system, and it
would also make my life a lot easier :) The other plus point is that I
feel the urge to be pretty strict about the "quality" of code (as I
define it) going into the main codebase. I will have to think some more
about that.
> (By the
> way, is it true that applets are supposed to derive from
> PerlPanel::Applet?)
No, not really. PerlPanel::Applet was intended as a "template", not a
base class. It was probably a bad idea to give it that name since it
gave that impression, and I have thought about removing it altogether.
My long-term aim is to implement the panel as a subclass of
Gtk2::Window, and have applets as subclasses of Gtk2::Widget, in which
case a base class would be very handy. But I think that it's going to
take a while before we get to that situation.
> BTW, I think that the method that can be used for passing the signal to
> the child is Glib::Object->signal_emit (is there some searchable version
> of the glib/gtk docs?).
You can call signal_emit on widgets and other Glib objects. BTW, I'd
recommend devhelp if you want a way to search/browse the gtk+ docs.
> I've just stumbled upon the Glib::Signal manpage. It appears there is a
> builtin way of doing all of this, using Glib->install_exception_handler
> (at least that's how it reads to me). I wasn't able to get it to work,
> though.
That looks interesting and might be worth looking at. Cheers.
Gavin.
--
Gavin Brown
e: address@hidden
w: http://jodrell.net/
PGP/GPG key ID: 891D8FCA
signature.asc
Description: This is a digitally signed message part