Deleting a char inside a textField via code
Richmond Mathewson
richmondmathewson at gmail.com
Fri Aug 31 11:53:46 EDT 2018
To make things more complicated:
if one has this:
put numToCodePoint(7418) after the selectedText
put numToCodePoint(7418) after the selectedText
delete the last char of fld "XYZ"
it is the target glyph that is deleted and NOT the useless square
(ie. it is NOT the last char that is deleted).
On 31/8/2018 6:44 pm, Richmond Mathewson wrote:
> Normally, if one were typing into a textField and made a mistake one
> would hit the back delete key
> and the mistake would vanish.
>
> How does one do this "programmatically"?
>
> Here's the (admittedly odd scenario):
>
> Unicode behaves inconsistently in various marginal cases with
> Devanagari script,
> and what happens is that the first time one sends this:
>
> put numToCodePoint(7418) after the selectedText
>
> one ends up with a useless square.
>
> But if one does this:
>
> put numToCodePoint(7418) after the selectedText
> put numToCodePoint(7418) after the selectedText
>
> one ends up with the useless square PRECEDED by the target glyph.
>
> So, the 'clever' work around might be to do this:
>
> put numToCodePoint(7418) after the selectedText
> put numToCodePoint(7418) after the selectedText
>
> followed by deleting the useless square
>
> However doing this:
>
> put numToCodePoint(65288) after the selectedText
>
> results in another useless square.
>
> Richmond.
More information about the use-livecode
mailing list