attaching "metadata" to a single character
josh at dvcreators.net
Thu Sep 21 13:37:31 EDT 2006
I have a text field, with blocks of text deliniated with the "\"
I am trying to figure out the best way to attach "metadata" to this
The first thing I thought of is that I could alter the color of the
character, that would give me three data values up to 255 each (which
would probably be enough, but might look weird). I could use the
"blue" value to point to a separate numbered group of data with
multiple fields, for example, but this complicates the overall
scheme, perhaps needlessly.
I can't use the position of the character or the order of the
delimiters as an absolute, because the user will be typing and
deleting in the field, copying and pasting sections of the text, so
each "\" character will be moved around quite a bit, but I need it to
retain special info.
I need the character to be visible so the user doesn't accidentally
highlight a section, cut it and paste it elsewhere without grabbing
the "\" character.
I might go the direction of experimenting with the htmlText of the
field, to see if I can put custom tags in without affecting the
display, and see if the tags care copied and pasted properly... but
I'm not sure what dangers might arise if I mess with the htmlText too
I need something like custom properties of a single character...
More information about the Use-livecode