Skip to content

Out function since v0.2

Given a property name, returns a special key which outputs the value of properties with that name. It should be used with a value.

(propertyName: string) -> SpecialKey

Parameters

  • propertyName - The name of the property to output the value of.

Returns

A special key which runs at the observer stage. When applied to an instance, it sets the value object equal to the property with the given name. It then listens for further changes and updates the value object accordingly.


Example Usage

local userText = Value()

New "TextBox" {
    [Out "Text"] = userText
}

Observer(userText):onChange(function()
    print("The user typed:", userText:get())
end)
Back to top