Skip to content

OnChange function since v0.1

Given a property name, returns a special key which connects to that property's change events. It should be used with a handler callback, which may accept the new value of the property.

(propertyName: string) -> SpecialKey


  • propertyName - The name of the property to listen for changes to.


A special key which runs at the observer stage. When applied to an instance, it connects to the property change signal on the instance for the given property. The handler is run with the property's value after every change.

Example Usage

New "TextBox" {
    [OnChange "Text"] = function(newText)
        print("You typed:", newText)
Back to top