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
Hallo, Frank Barknecht hat gesagt: // Frank Barknecht wrote:
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.
Or maybe it should not be removed? It depends on what the right outlet should indicate: an empty list or the "end" iterator of a container. Thinking of how [textfile] and [qlist] use the right outlet, banging it at "EOF" would also be sensible, IMO.
Ciao