Thank you all for getting me over this issue! I used the techniques you prescribed with great success.
(format-wish "~a delete {~a}" (widget-path canvas) tag)
And set the tag attribute like so to attach a "line" attribute to lines (so other shapes are preserved on deletion). (itemconfigure canvas line-instance "tag" "line")
I'm working on a 2D diagramming tool for light personal use.
On 10/13/2016 12:44 PM, Matthew Stickney wrote:
Sorry, was going from memory and mis-copied it. You want LTK:WIDGET-PATH instead.
Ltk is really good about being easy to extend, which is useful for things like starkits or tcl extensions that don't really belong in a tk binding. I've found that the major drawback to Tk is that it's tricky to build new parts out of existing widgets[0]. It's got the most straightforward and least bizarre widget API I've seen in any GUI toolkit, though -- worthy of emulation, IMO.
[0] Technically, Tk widgets don't really exhibit "closure" -- you can't build a widget out of other widgets, without resorting to one of the object-based shims around Tk. There is some information about creating so-called "megawidgets", but it's not as simple as you would hope.
On Wed, Oct 12, 2016 at 7:29 PM, Ryan pixeloutlaw@gmail.com wrote:
Hmm I seem to be missing
(wish-pathname ...)
Is it a standard LTk function? Thanks for confirming that LTk is indeed missing the "delete by tag" command. The format-wish is a nice little option until people can officially add the newest features. I really like Tk conceptually. It is nice to have a universal GUI shell that is language agnostic and not browser based.
On 10/12/2016 02:03 PM, Matthew Stickney wrote:
On Wed, Oct 12, 2016 at 4:02 PM, Matthew Stickney mtstickney@gmail.com wrote:
then open up the tk source and search around for strings that could be that command
Sorry, I mean the LTK source. Having to read the tk source itself would be considerably more involved.