customProperties or similar for words in a field?
Dr. Hawkins
dochawk at gmail.com
Sat Oct 10 21:09:01 EDT 2015
On Sat, Oct 10, 2015 at 5:34 PM, J. Landman Gay <jacque at hyperactivesw.com>
wrote:
> I can't think of anything elegant offhand. What popped into my head was a
> "madlibs" approach where you put up a dialog requesting the various data
> items and save the responses. Not pretty.
>
I'm partway there.
I parse each input line looking for the ## delimiter. I set the text
color to empty when not a variable, and to green for the variables. I also
save the start/end charPos for each green section.
Then when the user edits the field, they could change the boilerplate,
which I could save separately for use other cases or save to the individual
debtor's database, or they could change a rendered green section--and I
could tell which by the color of the insertion point. Or, on mouseMove, I
could put up an entry over the text (although stuff with line breaks could
get weird . . .).
I've also toyed with the custom html tags suggested by Scott, but wasn't
sure whether they would cause rendering issues with live code. In that
version, I could have something like
needs to have <dhVar hisAdr>123 E. West St.</dhVar>
--but I think I'd have to do all/most of the same things to backtrack from
the position of entry.
I also toyed with a custom url, like
<a href=dhvar:hisAdr>123 E. West St.</a>
-- but *that* goes into areas I know even less about . . .
Anyway, as I build the output, I maintain the start and end of each piece
for both the input and output.
Now I need to find something like the hlookup()/vlookup() spreadsheet
functions, where the next lowest value is returned for values not in the
list--eg, lookup(5,"3 4 7 8") would return 4.
--
Dr. Richard E. Hawkins, Esq.
(702) 508-8462
More information about the use-livecode
mailing list