Skip to content

Usability suggestion for canvas delete and bbox methods + after and destroy functions #14

@mrtodd

Description

@mrtodd

One of the first difficulties I had when using this crate was trying to figure out how to destroy a widget. Somehow using a tuple to represent an arbitrary number of widgets (including a solitary one) to be deleted was not near the top of my list of things to try. It seems to me that instead of forcing the HomoTuple construct on the user, it might be better to present an interface that allows the user to supply arguments that are a bit more intuitive. What I have done in the case of the functions/methods listed in the title is change the argument for the TagOrId, Widgets, Scripts only to require Into<Obj>. I think this change will not effect any existing application code, but will allow the user to specify just a single tag, widget or script command if they don't require a collection of items. As a bonus a Vec (which is what first comes to mind for me when trying to represent an arbitrary number of items) will also be accepted if a collection is required.

I have included a list of the differences in the attached file (the change shown for 'tcl/src/obj.rs' can be ignored) if you care to consider my suggestion.

-- Todd

diffs.txt

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions