mixin

Text

@Js
@Gen
const mixin Text

Text wraps a string for display with localization macro support.

Localization "$<key>"       // for keys in "pi" pod itself
Localization "$<pod::key>"  // for keys in other pods

constructors fromStr

Create from string value

fields empty

Empty string

methods defVal

Same as empty

dis

Text to display

fromData

Coerce from any value

fromDict

Map text from record or meta dict

isBlank

Is this the blank / empty string

pattern

Text pattern

toStr

Return pattern (not dis)

defVal static Text defVal()

Same as empty

dis abstract Str dis()

Text to display

empty const static Text : empty

Empty string

fromData static Text fromData(Obj? val, Dict? meta := null)

Coerce from any value:

fromDict static Text? fromDict(Dict dict, Str? def := null)

Map text from record or meta dict:

  • look for text tag, only use it if not empty
  • fallback to def if provided
  • fallback to Dict.dis

fromStr static new fromStr(Str s)

Create from string value

isBlank Bool isBlank()

Is this the blank / empty string

pattern abstract Str pattern()

Text pattern

toStr Str toStr()

Return pattern (not dis)

Haxall 4.0.7 ∙ 27-Oct-2026 09:10 EDT