Hi Tristan,
Your model looks something like

Const: 100L  ---->  Expression: "..." + time + "..." ----> Display

Where the input port to the Expression actor is a port named "time"
The output is
...0.0...

In this case "time" is a parameter of type double, not a port.
If you change the name to something else, it should work for you.

The Expression actor documentation says:

 <p> The expression language understood by this actor is the same as
 <a href="../../../../expressions.htm">that used to set any
 parameter value</a>, with the exception that the expressions
 evaluated by this actor can refer to the values of inputs, and to
 the current time by the identifier name "time", and to the current
 iteration count by the identifier named "iteration."

This one had me going for a little while . . .

I checked in a change to Expression.initialize() so that we now
throw an exception if the port name is "time" or "iterations".

_Christopher

----------
    I've come across a problem where passing a long value into an Expression 
    actor and trying to concatenate it with a string, the long value is 
    reverted to "0.0".
    
    I've attached an example workflow made in kepler which shows the problem.
    
    Am I doing something wrong? or is something broken?
    
    Thanks
    --Tristan
    
    -- 
    Tristan King                            | Ph: (07) 4781 6911
    DART project team                       | Email: [EMAIL PROTECTED]
    James Cook University                   | Web: http://dart.edu.au
    Townsville QLD 4814                     | http://plone.jcu.edu.au/dart/
    Australia                               |

----------------------------------------------------------------------------
Posted to the ptolemy-hackers mailing list.  Please send administrative
mail for this list to: [EMAIL PROTECTED]

Reply via email to