• Re: glob not working during startup

    From alexandru@21:1/5 to Alan Grunwald on Mon May 26 12:06:02 2025
    On Mon, 26 May 2025 11:49:14 +0000, Alan Grunwald wrote:

    I have no constructive suggestions, except to ask if you are REALLY SURE
    that this is what's failing? Whenever I come across something like this
    that is so basic it can't possibly be going wrong, it generally turns
    out that it isn't going wrong and the fault is elsewhere.

    I take it that you have confirmed that homedir is set to what you expect before executing the command you quote and that paths is set to
    something you don't expect after executing it.

    Other than the above, I can only offer sympathy and best wishes.

    Alan

    Many thanks Alan.
    I just dicovered, that there is more to it and probably it's not the
    glob commands fault at all.
    I need to dig deeper...

    --

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From rene@21:1/5 to All on Mon May 26 12:09:38 2025
    Hello

    which tcl/tk version you are using?
    I did also have problems with 9.0 (see "glob problem" on tcl-core
    mailing list)

    rene

    --

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From alexandru@21:1/5 to All on Mon May 26 11:33:58 2025
    I have this weird problem with "glob" command, which returns empty list
    during application startup but works as expected afterwards.

    The command is:

    set paths [glob -nocomplain -types f -dir $homedir -- {*.materials}]

    and homedir ist C:/Users/Public on Windows OS.

    The command is so basic, I have no idea were to start debugging.

    Any saving ideas?

    Many thanks
    Alexandru

    --

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From alexandru@21:1/5 to All on Mon May 26 13:05:31 2025
    Problem solved. The issue was elsere but very well hidden.

    --

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Harald Oehlmann@21:1/5 to All on Tue May 27 09:06:48 2025
    Am 27.05.2025 um 08:43 schrieb Christian Gollwitzer:
    Am 26.05.25 um 14:06 schrieb alexandru:
    On Mon, 26 May 2025 11:49:14 +0000, Alan Grunwald wrote:

    I have no constructive suggestions, except to ask if you are REALLY SURE >>> that this is what's failing? Whenever I come across something like this
    I just dicovered, that there is more to it and probably it's not the
    glob commands fault at all.
    I need to dig deeper...

    Hint for debugging: Whenever you assume that it is failing, try this:

    trace add execution glob enter echo

    and if running outside of tkcon:

    proc echo args  { puts "TRACE: $args" }


    This way, you'll see exactly how it is called and if e.g. homedir is
    simply empty etc.

               Christian

    Great trick, thanks Christian !

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Christian Gollwitzer@21:1/5 to All on Tue May 27 08:43:26 2025
    Am 26.05.25 um 14:06 schrieb alexandru:
    On Mon, 26 May 2025 11:49:14 +0000, Alan Grunwald wrote:

    I have no constructive suggestions, except to ask if you are REALLY SURE
    that this is what's failing? Whenever I come across something like this
    I just dicovered, that there is more to it and probably it's not the
    glob commands fault at all.
    I need to dig deeper...

    Hint for debugging: Whenever you assume that it is failing, try this:

    trace add execution glob enter echo

    and if running outside of tkcon:

    proc echo args { puts "TRACE: $args" }


    This way, you'll see exactly how it is called and if e.g. homedir is
    simply empty etc.

    Christian

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