ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Why?
@ 1999-06-03 20:20 David Arnold
  1999-06-03 22:48 ` Why? Hans Hagen
  0 siblings, 1 reply; 2+ messages in thread
From: David Arnold @ 1999-06-03 20:20 UTC (permalink / raw)


All,

Progressing slowly.

I got the \goto in this file  to work (pictures available upon request):

%output=pdf

\setupinteraction
  [state=start]

\setupcolors
  [state=start]

\starttext

\definefield [Logos] [radio] [LogoSetup] [ConTeXt,PPCHTEX,TeXUtil] [PPCHTEX]

Click each of these boxes to see what happens.

\definesubfield [ConTeXt] [] [ConTeXtLogo]
\definesubfield [PPCHTEX] [] [PPCHTEXLogo]
\definesubfield [TeXUtil] [] [TeXUtilLogo]

\definesymbol [ConTeXtLogo] [{\externalfigure[clown]}]
\definesymbol [PPCHTEXLogo] [{\externalfigure[StringArt.1]}]
\definesymbol [TeXUtilLogo] [{\externalfigure[barbara]}]

\setupfield [LogoSetup] [width=4cm,height=4cm,frame=off,background=screen]

\hbox to \hsize
{\hss\field[ConTeXt]\hss\field[PPCHTEX]\hss\field[TeXUtil]\hss}

\goto {forget everything and exit}
[JS(Forget_Changes),CloseDocument]

\stoptext

But the \goto in this one won't work.

%output=pdf

\setupinteraction
  [state=start]

\setupcolors
  [state=start]

\starttext

Some text.

 \goto{forget everything and exit}[JS(Forget_Changes),CloseDocument]

\stoptext

I am totally curious. Why doesn't the second one work?


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Why?
  1999-06-03 20:20 Why? David Arnold
@ 1999-06-03 22:48 ` Hans Hagen
  0 siblings, 0 replies; 2+ messages in thread
From: Hans Hagen @ 1999-06-03 22:48 UTC (permalink / raw)
  Cc: ntg-context

David Arnold wrote:

> \setupinteraction [state=start]
> \setupcolors  [state=start]
> 
> \starttext
>   \goto{forget everything and exit}[JS(Forget_Changes),CloseDocument]
> \stoptext
> 
> I am totally curious. Why doesn't the second one work?

Got you. Forget_Changes only makes sense when you use fields. These js
scripts are collected in java-fld.tex. They are loaded as soon as the
first field is typeset. You can force loading by: 

\useJSscripts[fld]

(One day I will extend the JS part, more neutral. It already is able to
filter functions and thereby limiting the number of definitions needed.)

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
-----------------------------------------------------------------


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~1999-06-03 22:48 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-06-03 20:20 Why? David Arnold
1999-06-03 22:48 ` Why? Hans Hagen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).