[kepler-dev] Reordering actor attributes and dynamically added parameters

Bertram Ludaescher ludaesch at sdsc.edu
Sun Jul 25 10:12:09 PDT 2004


>>>>> "EAL" == Edward A Lee <eal at eecs.berkeley.edu> writes:
EAL> 
EAL> I've been looking for a mechanism for doing this also because it
EAL> is needed for editing icons... Turns out an icon's visual components
EAL> are represented by attributes and are rendered in attribute order.
EAL> If you want to move an object to the foreground or background, you
EAL> need to be able to affect this order.
EAL> 
EAL> I will do this... But again, it will require better synchronizing
EAL> the cvs trees for kepler and Ptolemy II...

yep -- I think this is in the making.. (Kepler-ites: right?)

Bertram

EAL> 
EAL> Edward
EAL> 
EAL> 
EAL> At 03:43 PM 7/23/2004 -0700, Efrat Jaeger wrote:
>> Hi all,
>> 
>> I have an actor that extends another actor thus its inherited parameters 
>> appear first. I was wondering if it was possible to reorder an actors' 
>> parameters, e.g. by accessing the attributeList (but at what stage?). I 
>> tried to override these parameters in the constructor, but I get a name 
>> duplication exception, as the parent class' constructor must be called 
>> first. I could write the actor from scratch, but it's not object 
>> oriented.. Anybody has any suggestions?
>> 
>> Another thing I was messing with is I created an actor which dynamically 
>> adds/removes its output port according to a parameter value. I declare 
>> this port within the constructor and set it's type to be a 'string' (as 
>> shown below). When I drag this actor from the library its output type is 
>> initially set to unknown. I have to change the dependent parameter back 
>> and forth to get the correct output type. The same happens after saving 
>> and reloading the workflow (thus I get a type mismatch when executing and 
>> have to update it first). Please let me know what I should do in this case 
>> to get the desired port type as a default.
>> 
>> //constructor
>> output = new TypedIOPort(this, "output", false, true);
>> output.setTypeEquals(BaseType.STRING);
>> output.setContainer(this);
>> xPar.setExpression(true);
>> 
>> //attributeChanged
>> if (x) {
>> try {
>> output.setContainer(this);
>> output.setTypeEquals(BaseType.STRING);
>> ...
>> } else {
>> ....
>> if (p.getName().equals("output")) {
>> p.setContainer(null);
>> }
>> ...
>> }
>> 
>> Thanks,
>> 
>> Efrat
EAL> 
EAL> ------------
EAL> Edward A. Lee, Professor
EAL> 518 Cory Hall, UC Berkeley, Berkeley, CA 94720
EAL> phone: 510-642-0455, fax: 510-642-2739
EAL> eal at eecs.Berkeley.EDU, http://ptolemy.eecs.berkeley.edu/~eal
EAL> 
EAL> _______________________________________________
EAL> kepler-dev mailing list
EAL> kepler-dev at ecoinformatics.org
EAL> http://www.ecoinformatics.org/mailman/listinfo/kepler-dev



More information about the Kepler-dev mailing list