Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

ttk::treeview man page

44 views
Skip to first unread message

Roderick

unread,
Dec 2, 2018, 4:09:16 PM12/2/18
to

We read there:

"""
pathname detach itemList

Unlinks all of the specified items in itemList from the tree. The
items and all of their descendants are still present and may be reinserted
at another point in the tree with the move operation, but will not be
displayed until that is done. The root item may not be detached. See also:
delete.
"""

But it seems, itemList can also be reinserted under item with:

pathname children item itemList

Can one rely on this undocumented feature?

Rodrigo

Rich

unread,
Dec 2, 2018, 4:24:48 PM12/2/18
to
In what way do you find it undocumented. You left off the
documentation of "pathname children" where this feature *is*
documented:

pathname children item ?newchildren?
If newchildren is not specified, returns the list of children
belonging to item.

If newchildren is specified, replaces item's child list with
newchildren. Items in the old child list not present in the new
child list are detached from the tree. None of the items in
newchildren may be an ancestor of item.

It is behaving exactly as documented, in the documentation for the
"pathname children" subcommand.

Roderick

unread,
Dec 3, 2018, 1:31:51 PM12/3/18
to


On Sun, 2 Dec 2018, Rich wrote:

> In what way do you find it undocumented.

It is clearly documented that detached items can be attached with the move
subcommand. The documentation of children subcommand does not speak about
detached items. At least, it is not clear to me.

Rodrigo

Rich

unread,
Dec 3, 2018, 4:04:16 PM12/3/18
to
Why should the children subcommand speak about detached items? The
last parameber to the children command takes a list of item identifers.
As long as you have item identifiers of valid items (meaning the items
referenced have not been deleted), the children subcommand does not
care if they are attached or detached (because both are effectively
identical from the children subcommand's perspective).

Don't think in terms of "attached" vs "detached". Think in terms of
"list of item identifiers".

Roderick

unread,
Dec 3, 2018, 4:44:20 PM12/3/18
to

On Mon, 3 Dec 2018, Rich wrote:

> Don't think in terms of "attached" vs "detached". Think in terms of
> "list of item identifiers".

OK. It is a question of interpretation, but not anyone reading man
pages is a philologist.

If the "detach" subcommand mentions "move" to attach again, it
would be perhaps a question of literary style to also mention
"childeren" for doing that. Only that was my point.

Rodrigo

Rich

unread,
Dec 3, 2018, 6:57:22 PM12/3/18
to
That would be a reasonable edit. Perhaps file a patch wherever the
fossil repo is for Tk?
0 new messages