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

Efrat Jaeger efrat at sdsc.edu
Fri Jul 23 15:43:36 PDT 2004


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mercury.nceas.ucsb.edu/kepler/pipermail/kepler-dev/attachments/20040723/c7ad6b2c/attachment.html>


More information about the Kepler-dev mailing list