Hi,

I was trying to make a report for my job last year. I did some
javascript things to put a clock at each page of my presentation
to make sure I'll finish it in time.

But I found some tricky conflicting between my script and
the one in java-stp.tex

OK, here is my test file (it's a little too long):
================================
\usemodule      [pre-60]

\setuppapersize[S6][S6]
\setuppagenumbering[state=start,location=]
\setuptolerance[verytolerant,stretch]

\setupinteractionscreen [option=max]
\setupinteraction[state=start,click=no,menu=on]
\startJSpreamble functions used now
  font.Digital = "Courier-Bold" ;
  function start_clock()
{ this.getField("time.clock").value = util.printd("HH:MM:ss", new Date());
  this.getField("time.clock").readonly = true ;
  this.getField("time.clock ").textColor = color.red ;
  this.getField("time.clock").textSize = 13 ;
  this.getField("time.clock").textFont = font.Digital ;
  this.dirty = false  }
  var timeout = app.setInterval ("start_clock()",1000);
\stopJSpreamble

% Field of clock
\useJSscripts[fld]
\definefield [time.clock] [line] [TimeLogo]
\setupfield  [TimeLogo]  [horizontal,frame]
  [width=fit,height=25pt,background=,
   backgroundcolor=,frame=off]
  [width=5.2cm,frame=off]
  [width=5.2cm,frame=off,style=type]
\dorecurse{\totalnumberofpages}{\copyfield[time.clock][clock::\recurselevel]}
\def\clock{\field[clock::\pagenumber]}


\setupfootertexts[{\color[white]\tfxx \midaligned{\rlap{\currentdate} \hfill TITLE\hfill \llap{AUTHOR}}}]


\setuplayout[bottomspace=.8cm,
             bottom=12pt]

\startinteractionmenu[bottom]
{\interactionbar[alternative=f,width=\makeupwidth,height=1ex]}
\stopinteractionmenu

\setupfooter[state=start]


\starttext
\field[time.clock]
\field[clock::\pagenumber]

page number is \pagenumber.

% \StartSteps

% \starttabulate
% \NC test \FlushStep \NC test \FlushStep \NC \NR
% \NC test \FlushStep \NC test \FlushStep \NC \NR
% \NC test \FlushStep \NC test \FlushStep \NC \NR
% \stoptabulate

% \StopSteps

\page

\field[clock::\pagenumber]

page number is \pagenumber.

\page

\field[clock::\pagenumber]

page number is \pagenumber.

\page

\field[clock::\pagenumber]

page number is \pagenumber.

\stoptext
================================

This is just a test file, I will put those fields into \setupfootertexts
or somewhere else to make every page a clock.

If I uncomment the \StartSteps . . . \StopSteps part, some PDF
layer kind of error will show and nothing is generated.

Do I have to remove the clock to make the fancy stepwise thing
or keep the clock but lost the stepwise function of ConTeXt?

--
Best Regards
Chen
----------------------------------------------------------------

         Zhi-chu Chen | Shanghai Synchrotron Radiation Facility
        No. 2019 | Jialuo Rd. | Jiading | Shanghai | P.R. China
            tel: 086 21 5955 3405 | zhichu.chen.googlepages.com
                                              | www.sinap.ac.cn
----------------------------------------------------------------