I'm wondering how to use what I think is called "code-branching" to use another procedure I've already written so I don't have to keep
pasting the code again into whatever I'm using now for some specific function. So say for example i have:
procedure( changeShapeTometal2()
selectedSet()~>layerName="M2"
)
and I have attached that to a bindkey which I use once in a while when the need calls for it. But now I'm working and I find another
thing that I can automate which will speed up my work, I need to do something like this:
procedure( makeShapesStretchToLeftEdge()
foreach(shape selectedSet()
shape~>bBox=list(0:yCoord(car(shape~>bBox)) cadr(shape~>bBox) )
)
so after the spot where I change the bBox to be at X=0 I want to change all those shapes to M2, I don't want to add the code to change
the layerName because I already have that written some where , it would make sense to me to just add the procedure call and then
return to where I was, Do I need to do anything to the original procedure which changes the layerName so once that branch is done it
returns to the code where I am stretching to the left Edge?
Thanks.