dreaded error #1068 MyClass and MyClass cannot be reconciled
or: why doesn't a switch case without a break work always?
I have got this code snippet as part of a function defined in MyClass
var ni:int, np:int, xv:Number, yv:Number;
for(ni = np = 0 ; ni < cdata.cmds.length ; ni++)
{ switch(cdata.cmds[ni])
{ case GraphicsPathCommand.MOVE_TO:
/* A: code here to setup a new path*/
var b:MyPath = new MyPath();
/* B: duplicate switch case
xv = cdata.path[np++];
yv = cdata.path[np++];
b.add(xv, yv);
break;
*/
// fall through
case GraphicsPathCommand.LINE_TO:
xv = cdata.path[np++];
yv = cdata.path[np++];
b.add(xv, yv);
break;
case GraphicsPathCommand.CURVE_TO:
xv = cdata.path[np++];
yv = cdata.path[np++];
b.add(xv, yv, true);
xv = cdata.path[np++];
yv = cdata.path[np++];
b.add(xv, yv);
break;
}
}
the code worked well until I changed the the definition of MyPath and consequently had to change code in the A section.
This produced the - not very enlightening - error message (which suggests to send the error to Adobe but does not give a link)
The script would work again after I enabled the B section