Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Difference between setContext and Var?
#1
Both setContext and Var use to assign value to a variable. But if we are using Var, we can not use the Variable outside the particular scripting area(Component/Connection). At the same time, setContext can be used anywhere in the Dashboard.
 
Ie, if we are setting a context in Dashboard script, we can utilize the assigned value in any other component or connection scripting area using getContext.
 
Eg:
sdk.setContext( 'age_val', 1 );         --> In dashboard Script
var a = sdk.getContext( 'age_val' ); -->In component Script
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)