[kepler-users] Optional Parameter

Christopher Brooks cxh at eecs.berkeley.edu
Fri Nov 30 11:55:14 PST 2012


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
>> 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/20121130/fccefc16/attachment.html>


More information about the Kepler-users mailing list