Class PropertyType

An instance of a PropertyType represents a single property type in the Kanzi property system. A property type exists throughout the lifetime of an application, including the property types that you create during the runtime of an application.

Kanzi Lua API allows you to work with the existing property types. Most Kanzi property types are present in Kanzi Lua API.

Example
-- Disable Snap To Pixel property for the node.
contextNode:setProperty(Node2D.SnapToPixelProperty, false)

To create an instance of PropertyType for the custom property type from your project, see the PropertyType.new() function.

Synopsis

Methods
new()

Creates an instance of the exisitng PropertyType

PropertyType:new(name)

Creates an instance of the exisitng PropertyType. Use this function to create an instance of the custom property type from your project. You can use this function only once and store its result in a global variable.

Example
CustomIntPropertyType = PropertyType:new("project.CustomIntPropertyType")
Parameters
name (string)

A name of the existing property type.

Return Values
(PropertyType)

A new instance of PropertyType.