ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Peter Rolf <indiego@gmx.net>
Subject: Re: Fieldstack Walk
Date: Tue, 18 Apr 2006 23:35:22 +0200	[thread overview]
Message-ID: <44455B9A.9050308@gmx.net> (raw)
In-Reply-To: <4444D39B.8030408@gmx.net>

[-- Attachment #1: Type: text/plain, Size: 2147 bytes --]

Peter Rolf wrote:
> Michal Kvasnička wrote:
>> Good afternoon.
>>
>> Many thanks, this  solves the problem -- at least partially. The frames
>> are `walking' now, but new problems appeared. I found that when I set
>> `clickin=...', it is set it automatically to `clickout' as well, so one
>> mouse click runs the JavaScript code twice. So I've set it this way:
>>
>> \definefieldstack[fgolds2]
>>  [sgolds1,sgolds2a,sgolds2b,sgolds2c,sgolds2d,sgolds2]
>>  [frame=off,option=,clickout=JS(Walk_Field{fgolds3}),clickin=]
>>
>> It's better, but I found that now frames are walking in a strange order.
>> It is rather puzzling, since when it is invoked by \goto{...}[JS(...)],
>> it works well. Moreover, it does different things at AdobeReader 7.x
>> under Linux, and Acrobat 4.x under Windoze.
>>
>> Can you help me to solve it?
> 
> Mhh, looks like you are going new ways with making the fieldstack
> interactive (maybe not intended?). Sorry, but I can't help you any
> further in this direction.
> 
> Another possibility that I can think of is to add an invisible button
> field (same dimensions) behind a normal fieldstack, that calls
> JS(Walk_Field...). Should cause no conflicts with the readonly (non
> interactive) fieldstack [but this is untested!]. You can simply check
> this with a button beside the fieldstack and if this works ok, you can use
> 
> \nointerlineskip
> \smashedvbox{YOUR WALKBUTTON FIELD}%
> \placefigure[here]{none}{\fieldstack[fgolds3]}
> 
> to place it under your fieldstack.
> 
Bad news...
I just tested this and it works only as long as you don't stack the
button and the fieldstack.

The only solution I have found, is to seperate the interaction button
into a pdf layer. Things work as desired (you need a context version not
older than 2 month), but there are still some problems with spurious spaces.

Example is attached.

Greets, Peter


> HTH, Peter
> 
> 
>> Many thanks once more.
>> M.K.
>>
>>
> 
> _______________________________________________
> ntg-context mailing list
> ntg-context@ntg.nl
> http://www.ntg.nl/mailman/listinfo/ntg-context


[-- Attachment #2: test.tex --]
[-- Type: text/plain, Size: 1107 bytes --]

% interface=en output=pdftex
% Time-stamp: <Dienstag, 18 April 2006 23:16:39; test.tex>
%
\setupinteraction[state=start]
\setupcolors[state=start]

\starttext

\switchtobodyfont[ss,32pt]

\def\FS#1{\framed[width=4cm,height=4cm]{#1}}%

\definesymbol[empty][]

\definesymbol[sgolds1][\FS{A}]
\definesymbol[sgolds3a][\FS{B}]
\definesymbol[sgolds3b][\FS{C}]
\definesymbol[sgolds3c][\FS{D}]
\definesymbol[sgolds3][\FS{E}]


\setupfield[hidden][width=4cm,height=4cm,
%  frame=off,
  framecolor=blue,
  clickin=JS(Walk_Field{fgolds3})]

\definefield[Walk][check][hidden][empty][empty]


\definefieldstack[fgolds3]
 [sgolds1,sgolds3a,sgolds3b,sgolds3c,sgolds3]
 [frame=off,clickin=JS(Walk_Field{fgolds3})]


\defineproperty[interaction][layer][title=walkfield, state=start]

%\showmakeup

% can't get rid of the spurious apaces...
\vbox{\forgetall
\nointerlineskip
\smashedvbox{\fieldstack[fgolds3]}%
%
\startproperty[interaction]%
\nointerlineskip
\field[Walk]
\stopproperty%
}

\stoptext


%%% Local Variables:
%%% mode: context
%%% TeX-master: ""
%%% End:

[-- Attachment #3: Type: text/plain, Size: 139 bytes --]

_______________________________________________
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context

  reply	other threads:[~2006-04-18 21:35 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-04-18  9:09 Michal Kvasnička
2006-04-18  9:28 ` Peter Rolf
     [not found]   ` <4444B1C9.1090109@econ.muni.cz>
2006-04-18 10:18     ` Peter Rolf
     [not found]     ` <4444B966.5020108@gmx.net>
2006-04-18 10:39       ` Michal Kvasnička
2006-04-18 11:55         ` Peter Rolf
2006-04-18 21:35           ` Peter Rolf [this message]
2006-04-18 22:03             ` Sanjoy Mahajan
2006-04-19  8:41               ` Peter Rolf
2006-04-19 11:49                 ` Sanjoy Mahajan
2006-04-22 20:01         ` Peter Rolf
2006-04-22 20:09           ` Peter Rolf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=44455B9A.9050308@gmx.net \
    --to=indiego@gmx.net \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).