[kepler-dev] Using PortParameter as StringParameter

Edward A. Lee eal at eecs.berkeley.edu
Mon Nov 8 15:38:06 PST 2004


All you have to do is call

         setStringMode(true);

on the PortParameter.  If you look at the StringParameter class, you
will see:

     public StringParameter(NamedObj container, String name)
             throws IllegalActionException, NameDuplicationException {
         super(container, name);
         setStringMode(true);
     }

The docs to this (very tiny) class say:

"This subclass is provided mainly
    so that string-mode parameters can be specified in MoML."

Edward

At 03:27 PM 11/8/2004 -0800, Ilkay Altintas wrote:

>Hi,
>
>I was wondering if there is a way to use the parameter part of a 
>PortParameter as a StringParameter, meaning a parameter that I don't have 
>to put quotes around the string.
>
>Thanks,
>Ilkay
>
>_______________________________________________
>kepler-dev mailing list
>kepler-dev at ecoinformatics.org
>http://www.ecoinformatics.org/mailman/listinfo/kepler-dev

------------
Edward A. Lee, Professor
518 Cory Hall, UC Berkeley, Berkeley, CA 94720
phone: 510-642-0455, fax: 510-642-2718
eal at eecs.Berkeley.EDU, http://ptolemy.eecs.berkeley.edu/~eal




More information about the Kepler-dev mailing list