[osflash] AS2 inheritance problem. flash bug ?
Keith Salisbury
keithsalisbury at gmail.com
Wed Feb 14 13:14:01 EST 2007
It may be a typo, but dont you need
import org.as2lib.env.reflect.ReflectUtil;
import marker.AbstractMarker;
class marker.BoundedMarker extends AbstractMarker {
?
On 2/14/07, Dani Bacon <danibacon at gmail.com> wrote:
>
> hi,
>
> im trying to compile a flash8 project and the compiler seems to break an
> inheritance connection between 2 classes.
> movieclips are on stage and their library symbols are linked to the
> Country class.
> this worked but after making a few minor changes to AbstractMarker [added
> a method] the compiler suddenly stopped recognizing the inheritance
> connection between BoundedMarker and AbstractMarker.
> code :
>
> class marker.AbstractMarker extends RadioButton implements Marker {
>
> function AbstractMarker() {
> }
>
> // methods
>
> public function testMethodBaseClass() {}
>
> }
>
> import org.as2lib.env.reflect.ReflectUtil;
>
> class marker.BoundedMarker extends AbstractMarker {
>
> function BoundedMarker() {
> super();
>
> trace(ReflectUtil.getTypeNameForInstance(this.__proto__)); // traces BoundedMarker [since
> movieclips are based on Country]
>
> trace(ReflectUtil.getTypeNameForInstance(this.__proto__.__proto__));
> // traces Object [!! ignores AbstractMarker]
>
> trace(this.test2);
> // traces [type Function]
>
> trace(this.testMethodBaseClass);
> // traces undefined
>
> // more code of course ...
>
> }
>
> public function test2() {}
>
> }
>
> class marker.Country extends BoundedMarker {
>
> private function Country() {
> }
>
> }
>
> and
>
> trace(mc instanceof Country) is true
> trace(mc instanceof BoundedMarker) is true
>
> but
>
> trace(mc instanceof AbstractMarker) is false
>
> im using FlashDevelop and MTASC but compiling via the flash8 env as well.
> anyone any ideas ? how do i even start finding the problem ? is this some
> kind of flash bug ?
>
> regards
> dani
>
> _______________________________________________
> osflash mailing list
> osflash at osflash.org
> http://osflash.org/mailman/listinfo/osflash_osflash.org
>
>
--
keithsalisbury at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://osflash.org/pipermail/osflash_osflash.org/attachments/20070214/3be83b48/attachment.htm
More information about the osflash
mailing list