refresh behavior in Interface

I want to know the internal mechanism of local variable refreshing in an interface. When a local variable is refreshing, what is the underlying logic of the behavior? Is all code re-executed? Can you give me a conclusion and provide a demo to prove the conclusion.

  Discussion posts and replies are publicly visible

Parents Reply
  • Play around the code to verify

    a!localVariables(
      local!counter:0,
      local!randomValue:a!refreshVariable(
        value: rand()
        /*refreshInterval: 0.5*/ /*Refresh every 30 seconds*/
        /*refreshOnReferencedVarChange: local!counter*/  /*Refresh when value of counter changes. Click on Add and see the change*/
        /*refreshAlways: true */  /* Refresh always*/
      ),
      {
        a!linkField(
          links: a!dynamicLink(
            label: "Add",
            saveInto: {
              a!save(
                local!counter,
                local!counter+1
              )
            }
          )
        ),
        a!textField(
          value: local!randomValue
        )
      }
    )

Children
No Data