Widget


 * This article is about the XML object. For a general definition, see Widget (definition).

The widget block is a required block of a .KON file. All elements defined in XML should be defined within this block.

author
The author property lets you specify a string for the author of the widget. This is currently used in the security dialogs when a Widget is run for the first time, and may be used in other places in the future.

company
The company property lets you specify a string for the company that created the widget. This is currently used in the security dialogs when a Widget is run for the first time, and may be used in other places in the future.

copyright
The copyright property lets you specify a string to be used as a copyright message. This is not currently used, but will be used in future versions of Konfabulator.

debug
The debug property allows Widget developers to view output that is useful for debugging purposes. It can be set to one of the following values:
 * off - no debug window is shown.
 * *errors - the debug window isn't shown when a Widget starts up, but will open if a Konfabulator runtime or JavaScript error is encountered. This is the default setting.
 * on - the debug window is always visible and will show output from print and log statements in addition to errors.
 * verbose - the debug window is always visible and will show all the output for the on setting as well as additional information about triggers.

defaultTracking
The defaultTracking property specifies the default value for the tracking property of Image objects. There are two valid values:
 * *opacity - only parts of an image that aren't completely transparent generate mouse events. This is the default setting.
 * rectangle - a bounding rectangle is used to generate mouse events.

minimumVersion
The minimumVersion</tt> property specifies the minimum version of Konfabulator that is required to run a particular Widget. If a user attempts to open a Widget with a higher minimumVersion than the version of Konfabulator the user is running, then they will receive an error message.

The minimumVersion</tt> property also controls behavioral changes. As changes are made to the engine, it is undesirable to break older Widgets by forcing the new behavior on them. But if the engine sees the minimumVersion</tt> is set to a specific version, it is assumed that the Widget author has modified their Widget to work with said version, and therefore has adapted their stuff to work with the new behaviors. These behavioral changes are referenced in the official Reference Guide.

option
The option</tt> property allows for special options to be set on a per-Widget basis that affect the way Konfabulator loads a Widget. Any combination of the following options may be included:
 * allowArbitraryXML - this disables error checking for the XML in a .KON file. It is rare that a developer would need to do this, though (generally, one would include any custom XML in a separate file).
 * allowCustomAttributes - JavaScript objects can have custom properties. The default behavior is to throw an error when JavaScript code attempts to access a property that doesn't exist, which can be useful for debugging. Include this option if you wish to change that behavior and include custom properties in the Konfabulator objects.
 * dontRememberWindowPosition - this disables the automatic saving and loading of a Widget's screen position.

version
The version</tt> property lets you set a version number for your Widget. This will be shown in the about-box if you have a version-text object.