From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/1463 Path: main.gmane.org!not-for-mail From: Hans Hagen Newsgroups: gmane.comp.tex.context Subject: Re: calculate in forms Date: Wed, 22 Dec 1999 22:47:26 +0100 Sender: owner-ntg-context@let.uu.nl Message-ID: <3.0.6.32.19991222224726.0085d500@pop.wxs.nl> References: <0F3313EC125AD311981100105AB3A75D1EA563@N0795.mdf.fvbb.de> NNTP-Posting-Host: coloc-standby.netfonds.no Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" X-Trace: main.gmane.org 1035392288 530 80.91.224.250 (23 Oct 2002 16:58:08 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Wed, 23 Oct 2002 16:58:08 +0000 (UTC) Cc: ntg-context@ntg.nl Original-To: "Haseloff, Lutz" In-Reply-To: <0F3313EC125AD311981100105AB3A75D1EA563@N0795.mdf.fvbb.de> Xref: main.gmane.org gmane.comp.tex.context:1463 X-Report-Spam: http://spam.gmane.org/gmane.comp.tex.context:1463 Hi Lutz, >All scripts are at the right places in the pdf-file (tested with Acrobat) >and the format and afterkey >scripts work very fine. >Only the calculation does not work. For proper testing I need a complete file. >Is it possible that the missing "/CO [...]" near /Fields is the Reason? >In the PDF Specification the "Calculate Order" is required. I wonder if this entry is really needed. I want to test it first. This calculate thing is rather fuzzy. It's often best to do it manually, i.e. code it. \startJSpreamble {Calculate} used now function Calculate () { v = getField("Ergebnis") ; v.value = 0 ; v.value += getField("Summand1").value ; v.value += getField("Summand2").value } \stopJSpreamble \startJScode{Format} AFNumber_Format(2, 3, 0, 0, "", true) ; Calculate() ; \stopJScode \startJScode{Keystroke} AFNumber_Keystroke(2, 3, 0, 0, "", true) ; Calculate() ; \stopJScode In due time I will cook up some proper auxiliary functions. Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.nl -----------------------------------------------------------------