• Issue with TreeCtrl

    From Alexandru@21:1/5 to All on Tue May 24 10:10:36 2022
    Using the TreeCtrl package I just stumbled upon an error when doing something like:

    $tree item id [list 0 descendants tag {test(1)^.inp}]

    The error sounds:

    Invalid boolean operator in tag search expression

    If I either omit the parentheses or the ^, the error is gone.

    The problem is that I add names of real files to the tree tags, so I cannot avoid this error.
    Is there a fix for this?

    Many thanks.

    Best regards
    Alexandru

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From saitology9@gmail.com@21:1/5 to Alexandru on Tue May 24 13:26:40 2022
    On 5/24/22 1:19 PM, Alexandru wrote:
    Alexandru schrieb am Dienstag, 24. Mai 2022 um 19:10:38 UTC+2:
    Using the TreeCtrl package I just stumbled upon an error when doing something like:

    $tree item id [list 0 descendants tag {test(1)^.inp}]

    The error sounds:

    Invalid boolean operator in tag search expression

    If I either omit the parentheses or the ^, the error is gone.

    The problem is that I add names of real files to the tree tags, so I cannot avoid this error.
    Is there a fix for this?

    Many thanks.

    Best regards
    Alexandru
    Here is the very fast answer from Tim Baker:

    Tag operators may be bypassed completely by setting the -columntagexpr and -itemtagexpr options. This can be useful if your application has column or item tags containing arbitrary text.
    .t configure -itemtagexpr false
    .t item delete "tag a&&b"

    Hope this is helpfull to others having the same issue.


    Hello,

    While this option works, it may not be much help if you need to search
    by partial file names. Perhaps a better option would be to escape the characters that are special to the search expression. You can do this
    easily by string mapping, e.g., "^" to "\^".

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Alexandru@21:1/5 to Alexandru on Tue May 24 10:19:55 2022
    Alexandru schrieb am Dienstag, 24. Mai 2022 um 19:10:38 UTC+2:
    Using the TreeCtrl package I just stumbled upon an error when doing something like:

    $tree item id [list 0 descendants tag {test(1)^.inp}]

    The error sounds:

    Invalid boolean operator in tag search expression

    If I either omit the parentheses or the ^, the error is gone.

    The problem is that I add names of real files to the tree tags, so I cannot avoid this error.
    Is there a fix for this?

    Many thanks.

    Best regards
    Alexandru
    Here is the very fast answer from Tim Baker:

    Tag operators may be bypassed completely by setting the -columntagexpr and -itemtagexpr options. This can be useful if your application has column or item tags containing arbitrary text.
    .t configure -itemtagexpr false
    .t item delete "tag a&&b"

    Hope this is helpfull to others having the same issue.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)