Am 21.11.14 20:31, schrieb Robert Hanson:
> It seems it is better to give your hover callbacks new IDs:
>
>
> function hoverAction(action) {
> *   timeout off;*
>     print "action=" + action + "  _atomhovered=" + _atomhovered;
>     if (action == "start") {
> *     set hoverlabel @{"hover " + now()}
>       timeout ID @{"hoverEnd"+ now()} 2.0 "hoverAction('end')";
>
> *
>     } else {
>       set hoverlabel ""
>     }
> }
> set hoverCallback "jmolscript: hoverAction('start');";
>
So the problem is that timeout IDs must be unique and cannot be reused, 
even if the timeout is already switched off?

This information should be added to the 'timeout' documentation.

Since I don't want to loose the option to set other timeouts besides 
'hover' I tried to store the ID in a variable and to switch off only the 
timeout with the stored ID. This also seems to work. Although I havn't 
tried setting another timout in parallel.

Regards,
Rolf


------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk
_______________________________________________
Jmol-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jmol-users

Reply via email to