User Tools

This is an old revision of the document!


Chataigne

object

var myObject = {
  "myprop1":"value",
  "myprop2":"second",
  "myMethod": function(params) {
    this.myprop1 = params[0];
  }
}
var my_instance = new myObject();
script.log(my_instance.myprop1);
my_instance.mymethod(["test","one","two"]);
script.log(my_instance.myprop1);

Values in script

When adding a value parameter in a module, only the parameter is saved between sessions/projects. If you want to keep the value content, use setAttribute(“saveValueOnly”,false)

var mycontainer = local.values.addContainer("toto");
var myint1 = mycontainer.addIntParameter("myint", "",0,1,65536);
myint1.setAttribute("saveValueOnly",false);

This website uses cookies. By using the website, you agree with storing cookies on your computer. Also, you acknowledge that you have read and understand our Privacy Policy. If you do not agree, please leave the website.

More information