[kepler-users] kepler parameters

Christopher Brooks cxh at eecs.berkeley.edu
Mon Oct 24 20:41:19 PDT 2011


Hi Kianwee,
Yes, to add a parameter, right click on the FileParameter and select 
"Configure Attribute".
Then select "Add".
For the Name field, enter allowFiles or allowDirectories.
For the Default value, enter true or false
Then hit OK.

You were pretty close in your solution, the issue is that true and false 
are booleans, 0 and 1 are integers.  Integers do not losslessly convert 
to booleans.

To get a check box,  right click on the FileParameter and select 
"Configure Attribute"
Then click on "Preferences"
You can then click different styles for the attribute.  Checkbox is one 
such style.

I've attached an xml file that has a simple model.  You will need to 
browse to a local file on your machine,
the model probably has /Users/cxh hard coded into it.

_Christopher

On 10/24/11 8:17 PM, kianwee chen wrote:
> Thanks for the quick reply! I tried looking for the parameter you 
> mentioned, "allowFiles" and "allowDirectories" but I cannot seem to 
> find it on the FileParameter graphic interface. I right click on the 
> file parameter and I can choose the configure attributes, I try to add 
> the 2 parameters in ( although I cannot find a checkbox parameter 
> option for the true false selection you mention below so I just gave 
> it a 0 or 1 ) but it does not seems to be working. The file parameter 
> still behave the same way
>
> thanks
> ckw
>
> On Mon, Oct 24, 2011 at 11:39 PM, Edward A. Lee <eal at eecs.berkeley.edu 
> <mailto:eal at eecs.berkeley.edu>> wrote:
>
>
>     The documentation for FileParameter says:
>
>     "If this attribute contains a parameter named allowFiles with
>     value false, then when a file browser is used to select a file,
>     that file browser will be set to not show files (only directories
>     will be shown). If this attribute contains a parameter named
>     allowDirectories with value true, then the file browser will
>     permit the user to select directories (the default behavior is
>     that when a directory is selected, that directory is opened and
>     its contained files and directories are listed)."
>
>     (I'm not sure about Kepler, but in Ptolemy, just drag in a
>     FileParameter
>     from the Utilities menu, right click on it, and select Documentation.)
>
>     I'm not sure what you mean by "list parameter." Can you cite a
>     specific
>     example?
>
>     Edward
>
>
>
>     On 10/24/11 3:22 AM, kianwee chen wrote:
>
>         Hi everyone, I am trying to create a composite actor and
>         trying to setup
>         the parameters for the composite actor. Thus I have some
>         question on
>         adding parameters in composite actors.
>
>         1.) Directory parameter:
>
>         -I would like to let the users specify a directory on the
>         composite
>         actor parameters interface, I know there is a file parameter
>         but I need
>         a directory parameter. How can I customise a directory parameter ?
>
>         -I have a problem with relative path too, when I setup a file
>         parameter
>         it returns the string of the path relative to my current
>         kepler file
>         that is open. Is there a way to get the base file path ?
>         Something like
>         $CWD, but instead the file path of my currently open file ?
>
>
>         2.) List Parameter:
>         - I have seen some actor have List parameters how do I
>         customise one for
>         my composite actor too ?
>
>         Thanks alot !!
>         ckw
>
>
>         _______________________________________________
>         Kepler-users mailing list
>         Kepler-users at kepler-project.org
>         <mailto:Kepler-users at kepler-project.org>
>         http://lists.nceas.ucsb.edu/kepler/mailman/listinfo/kepler-users
>
>
>
>
> _______________________________________________
> Kepler-users mailing list
> Kepler-users at kepler-project.org
> http://lists.nceas.ucsb.edu/kepler/mailman/listinfo/kepler-users

-- 
Christopher Brooks, PMP                       University of California
CHESS Executive Director                      US Mail: 337 Cory Hall
Programmer/Analyst CHESS/Ptolemy/Trust        Berkeley, CA 94720-1774
ph: 510.643.9841                                (Office: 545Q Cory)
home: (F-Tu) 707.665.0131 cell: 707.332.0670

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nceas.ucsb.edu/kepler/pipermail/kepler-users/attachments/20111024/afd5695b/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: FileParameterAllowDirectory.xml
Type: text/xml
Size: 30873 bytes
Desc: not available
URL: <http://lists.nceas.ucsb.edu/kepler/pipermail/kepler-users/attachments/20111024/afd5695b/attachment.xml>


More information about the Kepler-users mailing list