Trying a custom handler for several math fields
Klaus major-k
klaus at major-k.de
Fri Sep 13 12:17:40 EDT 2013
Hi Vaughn,
Am 13.09.2013 um 17:54 schrieb Vaughn Clement <vclement at gmail.com>:
> Hi All
>
> Well my first attempt ever to use a custom handler (OK :- (
> Well I thought I understood what to do, but as things go I didn't get the
> expected result:
> In the card control field, I put this pass call;
>
> on doMath
> pass doMath
> end doMath
you need to TRIGGER this somehow, maybe "on closefield"?
on closefield
doMath
end closefield
Try this, it will work :-)
See below for other EVENTS that may trigger your doMath handler in a field
> in the card script I put this script;
>
> on doMath
> put field "Loan Balance 1" + field "Loan Balance 2" into field "Loan
> Balance Total"
> -- set the numberFormat to "#.00" -- dollar format testing to see if it
> worked "No"
> end doMath
Correct!
> The fields both had the pass call to send the math to the card handler.
See above, do not PASS, just "EVOKE" the handler when something happens,
like RETUNRIFIELD, ENTERINFIELD or CLOSEFIELD.
Otherwise nothing will happen, EVER! ;-)
> Thank you
>
> Vaughn Clement
Best
Klaus
--
Klaus Major
http://www.major-k.de
klaus at major-k.de
More information about the use-livecode
mailing list