[PD-dev] Re: [PD] PDContainers alpha release

Frank Barknecht fbar at footils.org
Tue Oct 26 11:20:36 CEST 2004


Hallo,

(switching to pd-dev mode.)

Georg Holzmann hat gesagt: // Georg Holzmann wrote:

> > I will, as soon as I get a deeper look. However I also have found one
> > bug, see attached patch, but unfortunatly no solution yet. Maybe you
> > can find out, why this is happening.
> Thanks, just fixed and again on http://puredata.info/Members/holzi/ !

I see your fix, which as you comment is a bit hairy. ;) 

Actually I think, that maybe throwing an exception would be a cleaner
way here and in other places, where something tries to access
non-existing Elements (like the other "Element &get()" methods.
However then all uses of get() will need to catch possible exceptions.
I implemented an example of this in attached files. There, the right
outlet gets a bang in the catch block, if an exception occurs, but
that's just for illustration and should  be removed, as the list is
not empty in fact, when the exception is thrown.

Ciao
-- 
 Frank Barknecht                               _ ______footils.org__
-------------- next part --------------
#N canvas 0 0 450 300 10;
#X obj 113 208 h_list;
#X msg 113 140 get;
#X msg 152 140 insert 23;
#X obj 113 93 t b b;
#X obj 113 55 bng 32 250 50 0 empty empty crash_me 0 -6 0 8 -258699
-1 -1;
#X obj 150 240 bng 15 250 50 0 empty empty bangs_even_at_exception!
0 -6 0 8 -262144 -1 -1;
#X connect 0 2 5 0;
#X connect 1 0 0 0;
#X connect 2 0 0 0;
#X connect 3 0 1 0;
#X connect 3 1 2 0;
#X connect 4 0 3 0;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: HList.h
Type: text/x-chdr
Size: 5170 bytes
Desc: not available
URL: <http://lists.puredata.info/pipermail/pd-dev/attachments/20041026/a7f8e6b9/attachment.h>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: h_list.cpp
Type: text/x-c++src
Size: 9179 bytes
Desc: not available
URL: <http://lists.puredata.info/pipermail/pd-dev/attachments/20041026/a7f8e6b9/attachment.cpp>


More information about the Pd-dev mailing list