Re: SimpleList->new_from_treeview



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.

-- 
   )   (       Jaap Karssenberg || Pardus [Larus]
   :   :       http://pardus-larus.student.utwente.nl/~pardus
 )  \ /  (    
 ",.*'*.,"     Proud owner of "Perl6 Essentials" 1st edition :)



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]