Copy/Paste of composite actors
There is a composite actor A, in which a parameter P is referred to.
A Copy/Paste into another workflow (or some other subparts in the same workflow) where parameter P does not exists (we get an error message) puts
all elements of the composite into the same 0 coordinate.
This is very annoying and makes reuse of workflows/actors much harder than it should be.
I am used to drag the elements back into their place, but I am impatient to do that above 20 elements. Also I used to create parameters (if I am aware of them) before copying, but this is also cumbersome.
Just think about text-code programmming and copy-paste of complete loops, and then renaming the variables according to the context.
#2 Updated by Dan Higgins almost 12 years ago
The statement that this has been fixed in Ptolemy II doesn't seem to be quite correct. It turns out that referring to a parameter in the containing object from an expression actor works OK inside a composite. You can cut and paste in both PT and Kepler. However, if there is a parameter inside the composite that references the external parameter, then cut/paste causes an error message and layout positions are lost in both PTII and Kepler.
Dan Higgins - Aug 7, 2007
#3 Updated by Christopher Brooks about 11 years ago
I think I have this fixed by making changes to moml/MoMLVariableChecker.java
I've added a test case:
The Ptolemy test suite now tests this by copying a composite that contains an
Expression and a Scale that refer to upscope parameters.