• Display a text string in a text window?

    From snosniv@21:1/5 to All on Sun Nov 13 06:47:38 2022
    So, I have a few procs that write a list to a global variable called zdat, and just the workout "type" to a global called znam

    Below is a sample
    puts $zdat
    {WARM 5 0 120 140 80} {BLCK 20 0 180 90} {COOL 5 0 130 100 85}
    puts $znam
    WARM BLCK COOL

    I'd like to display one of them (or both maybe) somewhere in another frame in my GUI.
    I have 5 frames that ADD stuff, WARM (warm-up), BLCK (Steady Block), COOL (cool-down), INTV (Intervals)! & MBLK (multi-block), each one can add the the vars zdat & znam.
    Each time new data is added to zdat I'd like to refresh what's shown
    It will help with tracking what is being built as my zwift workout.

    I have a working script, but adding this display text feature will make it easier to track what's been added so far. (There will probably only be 6 or 7 max in zdat/znam

    TIA, Kev P.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Rich@21:1/5 to snosniv on Sun Nov 13 15:20:45 2022
    snosniv <nivparsons@gmail.com> wrote:
    Each time new data is added to zdat I'd like to refresh what's shown
    It will help with tracking what is being built as my zwift workout.

    Look into adding a write trace on zdat that calls a proc that uses the
    zdat contents to "insert" text lines into a text widget (whether you
    clear the widget first is up to you).

    Once setup, every time a write happens to the zdat variable, your proc
    will refresh the contents of the text widget.

    Do be careful about "too much data" (which will probably take you some
    time to encounter) but if you end up needing to insert many thousands
    of lines then this can become a bit of a performance issue.

    Where to "place/pack/grid" the text widget is also up to you.

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