I can't send a message with a field to another handler

Dr. Hawkins dochawk at gmail.com
Thu Aug 2 15:24:05 EDT 2012

I've written functions/handlers to convert between pennies and
formatted dollars.

I'm trying to write a function or handler that can add them, but am
getting caught up in the parsing.

I've tried a handler  like

on dlrAdd amt, tgt
   put dlrStr(dlrVal(amt) + dlrVal(  "fld " & quote & tgt & quote))
into field the long name of fld tgt

end dlrAdd

but this only works when the target is on the same page--a tgt name
like "myTot of Card 1" results in an unfound error (it's looking for a
field with that name on the current page, i believe)

I've tried

on dlrAdd amt
   --send to a field to add a dollar amount to it
   put dlrStr(dlrVal(amt) + dlrVal(the target)) into the target
end dlrAdd

and then

send  "dlrAdd" && field sbFld  to fld  ("sbt_" & sbFld)

to get the target field to add the amount to itself, but this doesn't
get the field amount passed.

I'm trying to have a single handler here to make this all maintainable.

The Hawkins Law Firm
Richard E. Hawkins, Esq.
(702) 508-8462
HawkinsLawFirm at gmail.com
3025 S. Maryland Parkway
Suite A
Las Vegas, NV  89109

More information about the Use-livecode mailing list