Yes, that is correct. When a function is being used in a math expression,
all delays are disabled. Otherwise the script would hang in the middle of a
mathematics expression, and while that might be possible in Java, that
would be totally impossible to recover from in the asynchronous environment
of JavaScript. Sorry if that is not documented.
You'll have to consider that a feature.
Bob
On Wed, Jan 22, 2014 at 1:03 PM, Ron Mignery <[email protected]> wrote:
> Is calling a user function for a return value broken in Jmol application
> 14.0.4?
> Delay, rotateSelected etc. seem to fail in the function only when called
> for the return value
>
> function xyz {
> print now(xxx)
> delay 1
> print now(xxx)
> return true
> }
> function test {
> xxx=now()
> xyz
> z=xyz
> }
>
> test
> 0 \ ~1 sec = ok
> 1047 /
> 1047 \ ~0 sec = not ok
> 1112 /
>
>
>
>
> ------------------------------------------------------------------------------
> CenturyLink Cloud: The Leader in Enterprise Cloud Services.
> Learn Why More Businesses Are Choosing CenturyLink Cloud For
> Critical Workloads, Development Environments & Everything In Between.
> Get a Quote or Start a Free Trial Today.
>
> http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
> _______________________________________________
> Jmol-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/jmol-users
>
>
--
Robert M. Hanson
Larson-Anderson Professor of Chemistry
St. Olaf College
Northfield, MN
http://www.stolaf.edu/people/hansonr
If nature does not answer first what we want,
it is better to take what answer we get.
-- Josiah Willard Gibbs, Lecture XXX, Monday, February 5, 1900
------------------------------------------------------------------------------
CenturyLink Cloud: The Leader in Enterprise Cloud Services.
Learn Why More Businesses Are Choosing CenturyLink Cloud For
Critical Workloads, Development Environments & Everything In Between.
Get a Quote or Start a Free Trial Today.
http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
_______________________________________________
Jmol-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jmol-users