On May 26, 2013, at 11:09 PM, Denis Kudriashov <
dionisiydk@gmail.com> wrote:
> Hello.
>
> I finish edit validation logic. So new version 1.0 is available:
>
> Gofer it
> � � � � url: '
http://www.smalltalkhub.com/#!/~sig/TxText';
> � � � � package: 'ConfigurationOfTxText';
> � � � � load.
>
> ((Smalltalk at: #ConfigurationOfTxText) project version: '1.0') load:
> #('ALL').
>
> TxEditValidator is introduced for TxEditor. It validates changes performed by given block.
> It asks editor to try changes from this block. And if changed text satisfied text spec validator executes given block to apply changes.
>
> Few text specs implemented:
> -TxAnyTextSpec
> -TxDigitalTextSpec
> -TxDecimalTextSpec
>
> More example of text specs are at TxTextMorph class side:
> - mask with digits only
> - smart numbers which accept only decimal numbers:
>
> � � m := TxTextMorph new.
> � � m editDecorator: TxSingleLineEditDecorator smartNumbers.
> � � m textSpec: (TxDecimalTextSpec maxDecimalDigits: 3).
> � � m newTextContents: '10000000'.
> � � m addCursor.
> � � m beEditable.
> � � m openInHand
>
> Best regards.
> Denis.
>
>