flex-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Harbs <harbs.li...@gmail.com>
Subject [FlexJS] subclassed Flash classes and casting
Date Sun, 10 Jul 2016 20:32:18 GMT
I just added some casting to Point, Rectangle and Matrix. The reason for this is that Flex
objects are expecting org.apache.flex.geom instead of flash.geom classes. Any objects originating
from Flash causes compiler errors on the Flex side.

I’m sure there are other classes which have this issue (MouseEvent and its Point objects
come to mind. If folks could keep this in mind when working on these kinds of classes, that
would be great.

I ran into one issue related to this that I did not find a solution for:

Rectangle has a few getters and setters which take and return Point objects (i.e. size, topLeft
and bottomRight). Changing the getters to return org.apache.flex.geom.Point works, but I get
a mismatch warning because the setters are type flash.geom.Point. The setter probably SHOULD
be flash.geom.Point, but even trying to change them to org.apache.flex.geom.Point did not
work because the compiler complains of an incompatible override.

Is there any way around this problem?

View raw message