[kepler-users] Optional Parameter

SIGNORET Jacqueline 139795 Jacqueline.SIGNORET at cea.fr
Mon Dec 3 01:31:28 PST 2012


Many thanks for your answer.
In fact, I thought to a workaround : I can have only one string Parameter with three choices instead of two : "none", "create", "update". But it is not so "pretty" as what I want!

Many thanks to Edward for your comment about the parameter names / fields names : I did not know this constraint.

Best regards,
Jacqueline

De : Christopher Brooks [mailto:cxh at eecs.berkeley.edu]
Envoyé : vendredi 30 novembre 2012 20:55
À : SIGNORET Jacqueline 139795
Cc : kepler-users at kepler-project.org
Objet : Re: [kepler-users] Optional Parameter

As Edward says, there is no easy way to do this.
One idea would be to set the visibility to expert:

method.setVisibility(Settable.EXPERT);

You would do this in attributeChanged().
This would make method not visible the next time the
EditParameters dialog was rendered.  This is not really what
you want.

_Christopher

On 11/30/12 10:13 AM, Edward A. Lee wrote:

There is no way that I know of to do this easily...

A couple of notes:

The parameter names should match the field names.
Otherwise, you will have problems if you use the actor
in actor-oriented classes. If you want the user to see
a different name, I suggest:

enableOperation = new Parameter(this, "enableOperation");
enableOperation.setDisplayName("enableCatalogUpdate");

Edward


On 11/30/12 1:42 AM, SIGNORET Jacqueline 139795 wrote:

Dear All,

I am a beginner trying to develop an actor. I apologize for asking a
silly question.

I need two parameter : the first is a Boolean and the second one a String :

public Parameter enableOperation;

public StringParameter method;

enableOperation = new Parameter(this, "enableCatalogUpdate");

enableOperation.setTypeEquals(BaseType.BOOLEAN);

enableOperation.setExpression("false");

method = new StringParameter(this, "populationRequest");

method.setTypeEquals(BaseType.STRING);

method.setExpression("create");

method.addChoice("create");

method.addChoice("update");

I should like that the second parameter be available only when the user
checks the first one. Is it possible to do that easily?

Many thanks for any help.

Jacqueline



_______________________________________________
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<mailto: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/20121203/0eb2ec11/attachment.html>


More information about the Kepler-users mailing list