8.2  <prefs>

The root element of the preferences dialog. It has to be a child tag of the <display> tag.

8.2.1  Attributes

Name Type Default Value Description
callback function A callback function which is called every time a preferences value changes. The callback takes the name of the bound property and the new value as arguments.

8.2.2  Examples

...

<prefs callback="mycallback">

  <string label="Name:" bind="myname"/>

</prefs>


<script>

  # the initial default value
  myname = "No Name"

  def mycallback(key, value):
      if (key == "myname"): print "Name changed to:", value

</script>

...