Workaround For No selectionChanged Message?

Scott Rossi scott at tactilemedia.com
Wed Oct 13 04:35:18 EDT 2010


Recently, I wrote:

> I have recently begun to struggle again with a simple text editor project
> and it seems when the contents of a field are selected via script (select
> text of fld 1), no selectionChanged message is sent.

On a related note, how do folks handle maintaining text selections?

I currently have text formatting controls in a palette, separate from a
mainstack that contains the text to be edited.  When clicking on the
palette, the text selection is lost in the mainstack, so I add backColor to
the selected text while the palette has focus; when focus is shifted back to
the mainstack, the backColor is removed and the previously unselected text
is reselected (!).

The issue here is the appearances do not match: text selected by LiveCode
has a different appearance than text with a backColor applied.  The only way
I can see around this is to always use the backColor selection and never
allow "true" selection of text.  What a pain.  There's got to be an easier
way.

Is there one?

Thanks & Regards,

Scott Rossi
Creative Director
Tactile Media, UX Design





More information about the use-livecode mailing list