<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Hi Kianwee,<br>
Yes, to add a parameter, right click on the FileParameter and select
"Configure Attribute".<br>
Then select "Add".<br>
For the Name field, enter allowFiles or allowDirectories.<br>
For the Default value, enter true or false<br>
Then hit OK.<br>
<br>
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.<br>
<br>
To get a check box, right click on the FileParameter and select
"Configure Attribute"<br>
Then click on "Preferences"<br>
You can then click different styles for the attribute. Checkbox is
one such style.<br>
<br>
I've attached an xml file that has a simple model. You will need to
browse to a local file on your machine,<br>
the model probably has /Users/cxh hard coded into it.<br>
<br>
_Christopher<br>
<br>
On 10/24/11 8:17 PM, kianwee chen wrote:
<blockquote
cite="mid:CAHwgn_yZwvZrgPEhDZ4keW8ACgZsQmWirbiT4qeoU-8FnaW_BQ@mail.gmail.com"
type="cite">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 <br>
<br>
thanks <br>
ckw <br>
<br>
<div class="gmail_quote">On Mon, Oct 24, 2011 at 11:39 PM, Edward
A. Lee <span dir="ltr"><<a moz-do-not-send="true"
href="mailto:eal@eecs.berkeley.edu">eal@eecs.berkeley.edu</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex;">
<br>
The documentation for FileParameter says:<br>
<br>
"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)."<br>
<br>
(I'm not sure about Kepler, but in Ptolemy, just drag in a
FileParameter<br>
from the Utilities menu, right click on it, and select
Documentation.)<br>
<br>
I'm not sure what you mean by "list parameter." Can you cite a
specific<br>
example?<br>
<br>
Edward
<div>
<div class="h5"><br>
<br>
<br>
On 10/24/11 3:22 AM, kianwee chen wrote:<br>
</div>
</div>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">
<div>
<div class="h5">
Hi everyone, I am trying to create a composite actor and
trying to setup<br>
the parameters for the composite actor. Thus I have some
question on<br>
adding parameters in composite actors.<br>
<br>
1.) Directory parameter:<br>
<br>
-I would like to let the users specify a directory on
the composite<br>
actor parameters interface, I know there is a file
parameter but I need<br>
a directory parameter. How can I customise a directory
parameter ?<br>
<br>
-I have a problem with relative path too, when I setup a
file parameter<br>
it returns the string of the path relative to my current
kepler file<br>
that is open. Is there a way to get the base file path ?
Something like<br>
$CWD, but instead the file path of my currently open
file ?<br>
<br>
<br>
2.) List Parameter:<br>
- I have seen some actor have List parameters how do I
customise one for<br>
my composite actor too ?<br>
<br>
Thanks alot !!<br>
ckw<br>
<br>
<br>
</div>
</div>
_______________________________________________<br>
Kepler-users mailing list<br>
<a moz-do-not-send="true"
href="mailto:Kepler-users@kepler-project.org"
target="_blank">Kepler-users@kepler-project.org</a><br>
<a moz-do-not-send="true"
href="http://lists.nceas.ucsb.edu/kepler/mailman/listinfo/kepler-users"
target="_blank">http://lists.nceas.ucsb.edu/kepler/mailman/listinfo/kepler-users</a><br>
</blockquote>
</blockquote>
</div>
<br>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
Kepler-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Kepler-users@kepler-project.org">Kepler-users@kepler-project.org</a>
<a class="moz-txt-link-freetext" href="http://lists.nceas.ucsb.edu/kepler/mailman/listinfo/kepler-users">http://lists.nceas.ucsb.edu/kepler/mailman/listinfo/kepler-users</a>
</pre>
</blockquote>
<br>
<pre class="moz-signature" cols="72">--
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 </pre>
</body>
</html>