We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.

Errors with “list from text” after loading text with “load data”

Home Forums Programming Errors with “list from text” after loading text with “load data”

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #82329
    vklein
    Customer

    At start I’m loading a text file “shorttexts.txt” with “Load data” with content like:
    teyt1;text2;text3
    on “once ready do” I assign a “list from text”<-“loaded data” with delimeter “;” to the variable
    here a console print of the variable and it’s length is giving me good values
    BUT I’m getting errors on using the variable later.
    It looks like on usage of the variable the variable isn’t loaded yet.
    I can’t put anything into “once ready do”, I’m using the variable in multiple tabs.
    Is there any way to make sure the file has been loaded into the variable BEVORE I use it?

    #82330

    Hi,

    Loading data from network requires some time, so the variable won’t be available right away. The code should be triggered by “once ready do” but it’s not necessary to place everything inside this slot. If you need to place your logic in a different tab, create a function and execute it inside “once ready do”.

    Alternatively, you can create a custom event listener with add event listener and dispatch this custom event from “once ready do” by using the dispatch event puzzle.

    Soft8Soft Tech Chief
    X | FB | LinkedIn

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.