FieldVariable

@objcMembers public final class FieldVariable: Field

An input for specifying a variable.

  • The variable in this field

    Declaration

    Swift

    public private(set) var variable: String
  • Initializes the variable field.

    Declaration

    Swift

    public init(name: String, variable: String)
  • Checks whether a string is a valid name.

    Declaration

    Swift

    public class func isValidName(_ name: String) -> Bool
  • Sets the variable to a name.

    Throws

    BlocklyError: Occurs if the name is invalid. Currently, the only invalid name is an empty string.

    Declaration

    Swift

    public func setVariable(_ name: String) throws