[kepler-dev] references to Java properties from within StringParameter entry fields
Edward A. Lee
eal at eecs.berkeley.edu
Thu May 28 14:01:39 PDT 2009
If you use a FileParameter, then I know you can say
$PTII/demos/...
Maybe $KEPLER will work too. If it doesn't, perhaps we should fix
it so it does.
Edward
Timothy McPhillips wrote:
> Hi Christopher,
>
> Is there a convenient way to access the values of Java properties from
> within the entry field for a StringParameter?
>
> For a plain Parameter it appears one can refer to Java properties in
> this manner:
>
> Image:
> property("KEPLER")+"/demos/getting-started/species-distribution.jpg"
>
> But this requires using quotes to signify a string value. In a
> StringParameter one can refer to the values of other Variables in scope
> (e.g., a Parameter defined on the workflow canvas) using the $ symbol,
> and no quotes are needed. For example, if I define a Parameter on the
> canvas named 'Directory' that refers to the value of the Java property
> 'COMAD_TESTS':
>
> Directory: property("COMAD_TESTS")
>
> ..then in a StringParameter of an actor on that canvas I can refer to
> the value of that Directory parameter:
>
> File: $Directory/test-files/TestCollectionReader_new.xml
>
> What I can't seem to do is refer to the Java property directly in the
> entry for the StringParameter, e.g. entering
>
> $property("COMAD_TESTS")/test-files/TestCollectionReader_new.xml
>
> gives the exception:
>
> ptolemy.kernel.util.IllegalActionException: Error evaluating expression:
> $property("COMAD_TESTS")/test-files/TestCollectionReader_new.xml
> in .TestCollectionReader_test.CollectionReader_New.File
> Because:
> The ID property is undefined.
>
>
> Is there an easy way to do this?
>
> Thanks!
>
> Tim
>
>
>
>
> _______________________________________________
> Kepler-dev mailing list
> Kepler-dev at kepler-project.org
> http://mercury.nceas.ucsb.edu/kepler/mailman/listinfo/kepler-dev
-------------- next part --------------
A non-text attachment was scrubbed...
Name: eal.vcf
Type: text/x-vcard
Size: 351 bytes
Desc: not available
URL: <http://mercury.nceas.ucsb.edu/kepler/pipermail/kepler-dev/attachments/20090528/2887eae1/attachment.vcf>
More information about the Kepler-dev
mailing list