[kepler-dev] Using PortParameter and ParameterPort

Christopher Brooks cxh at eecs.berkeley.edu
Tue Dec 13 19:57:31 PST 2005


Hi Jianting,
Did you get to the bottom of this?
The trick is to quote the string with "

For example,
ptII/ptolemy/actor/lib/hoc/test/auto/IterateOverArray10.xml
has
         <property name="step" class="ptolemy.actor.parameters.PortParameter" value="&quot;a&quot;">

_Christopher
    
    Hi, 
    
    I was trying to use PortParameter/ParameterPort to specify the
   data type an d initial value of a port representing a parameter of
   a command line module.  When I use
    
    "<property name="units" class="ptolemy.actor.parameters.PortParameter"
    value="meters"/>",
    
     there is an error saying "The ID meters is undefined.". It is ok if I
    change "meters" to a number like "10". 
    
     It seems that the value was getting parsed. Is there any way to
    use string instead of numbers when combined with PortParameter?
    Just like
    
    "<property name="comments" class="ptolemy.data.expr.StringParameter"
    value="... ">. 
    
     
    
    Thanks 
    
     
    
    Jianting
    


More information about the Kepler-dev mailing list