User Tools

Site Tools


dictionary:unitinformation:xtsetdata

XT Set Data

This is a debugging command and has the potential to corrupt the database entry for a Unit. It should not be used under normal circumstances but can be useful especially for plugin development.

This command sets a keyed value in the low level database for a unit. Supported data types are integers, floats and doubles, Strings or Text, booleans and dates. If a database entry for this key does not exist it will be created, if it already holds a value that will be updated to the new value that you pass. Note that if the unit is assigned to an Interface and the interface is enabled and you are changing the type of the database value from say a string to an integer you may get an error logged from the plugin process as this is not normally done. The error can be ignored. If the plugin process does not pick up on the new value in that case disable and re-enable the interface to get everything back to normal again.

The command is not part of the regular AppleScript Dictionary nor a property of the xUnit class but rather a handler that needs to be inside of a tell block.

tell xUnit “name of the unit” to xtSetData( “the database key”, “the new value”)
-- or if the value is numeric quotes are not necessary
tell xUnit “name of the unit” to xtSetData( “key of numeric data”, 45)

See Also:

dictionary/unitinformation/xtsetdata.txt · Last modified: 2023/02/13 14:52 by 127.0.0.1