Re: New Canvas

On 4 Aug, 15:06, Torsten Berg <b...@xxxxxxxxxxxxxxxx> wrote:
Hi Mats,

I now tested a few apps where I normally use the canvas widget. They
just look so much better now (MacOS X)! Smooth letters and lines
everywhere. But I had two issues. I sometimes use [$canvas delete all]
to clean the canvas and start from scratch. This will give me the
error "the root item cannot be deleted". While this behaviour is sort
of documented, it breaks canvas compatibility, where you can delete
all items. I understand the new hierachical model with the root item
always being there, so is there a way around this?

We, roger and I, have had some discussions on handling the tag "all"
and I think I just ignore the root item when finding all matching
items to tag "all".

I have a lot of items on the canvas with the tag "bead". When I do
[$canvas delete bead], I get the error

malformed bucket chain in Tcl_DeleteHashEntry
Abort trap

It works in the simple case of

% package require tkpath
% tkp::canvas .c
% pack .c
% .c create oval 0 0 10 10 -tags bead
% .c delete bead

but fails in my app. I wasn't able to construct a simple case, where
it fails.

There is currently an issue when items are deleted where an item
already deleted implictly via a group is tried to be deleted once
more, which obviously fails (crashes). Instead I think I need to
"flatten out" all items before deleting them so this wont happen (?).


PS: with "flatten out" I mean to make them direct children of the