[kepler-dev] Cloning errors in Kepler with PT CVS
Dan Higgins
higgins at nceas.ucsb.edu
Sat Apr 23 13:38:45 PDT 2005
Hi All,
Well, I thought we had eliminated all the actors which 'hide' ports
by setting their container to 'null' but 2 more have appeared! Namely
'org.srb.SRBProxyCommand' and
'org.srb.SProxy'
I think these actors were created by Efrat. If so and you want them to
appear in the actor tree, could you fix the code, Efrat?
As pointed out by Edward,
"Note that it is still incorrect to have code like:
private Port _myPort;
_myPort = new TypedIOPort(this, "name");
_myPort.setContainer(null);
...
code that uses _myPort
...
In particular, if you now clone this actor, the clone
will have a reference to the port in the original actor.
One port, two actors... Chaos...
The right way to hide a port is to create a parameter
(ptolemy.data.expr.SingleParameter) called "_hide" with
value "true" in the port.
"
so we should all avoid setting the port container to 'null' in future
work to hide actors.
Dan Higgins
More information about the Kepler-dev
mailing list