Re: SimpleList->new_from_treeview
- From: muppet <scott asofyet org>
- To: Jaap Karssenberg <j g karssenberg student utwente nl>
- Cc: gtk-perl mailing list <gtk-perl-list gnome org>
- Subject: Re: SimpleList->new_from_treeview
- Date: 03 Oct 2003 13:35:50 -0400
On Wed, 2003-10-01 at 19:32, Jaap Karssenberg wrote:
On Thu, 2 Oct 2003 01:03:05 +0200 A. Pagaltzis wrote:
: * muppet <scott asofyet org> [2003-10-01 22:35]:
: > > I noticed that new_from_treeview doesn't complain when the
: > > treeview arg doesn't exist - cost me half a day bug hunting
: > > :(( Maybe an argument check could be inserted ?
: >
: > if you supply undef for the widget, it creates a new one.
:
: I'm not sure whether he's talking about passing undef or passing
: nothing at all. That's two different conditions there.
The point is that due to a typo I passed undef both unintended, but
automaticly assuming that new_from_treeview doesn't work without a
treeview I never double checked it. I think it to be good practice to
make constructors like this throw an exception when they get undef.
i've added a bunch of parameter checks (and tests for them). both
constructors will complain if you supply anything less than one column
title=>type pair, if you pass an incomplete pair, if you use an unknown
column type, or if the treeview arg to new_from_treeview is not a
reference descended from Gtk2::TreeView.
--
muppet <scott at asofyet dot org>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]