# cp.ui.TextField.Builder

Defines a TextField Builder.


# API Overview

Methods - API calls which can only be made on an object returned by a constructor

  • convertingGet
  • convertingSet

# API Documentation

# Methods

# convertingGet

Signature cp.ui.TextField.Builder:convertingGet(getter) -> cp.ui.TextField.Builder
Type Method
Description Specifies a function that will convert the result of the TextField:value() getter to a different type.
Parameters
  • getter - A function that will be called to get the value from the TextField.
Returns
  • The TextField.Builder
Notes
  • The getter will be called with the string value from the TextField as its only parameter.
Examples None
Source src/extensions/cp/ui/TextField.lua line 25

# convertingSet

Signature cp.ui.TextField.Builder:convertingSet(setter) -> cp.ui.TextField.Builder
Type Method
Description Specifies a function to convert the value before setting it in the TextField.
Parameters
  • setter - A function that will be called to set the value in the TextField.
Returns
  • The TextField.Builder
Notes
  • The setter will be called with the input value from a TextField:value(...) call as its only parameter.
  • It should return a string to be saved into the TextField.
Examples None
Source src/extensions/cp/ui/TextField.lua line 38