Hey Steven / Newsdee. Thx.
Newsdee : i tried deleting cache [FlashDevelop] / ASOs [Flash IDE] before
and it didn't help. I don't see how casting can solve the problem, it looks
like the compiler itself is not acknowledging an inheritance connection, and
i am not using any special drive config.
Steven: you guys seem to be doing great work :). I can refactor into
composition but that would probably be my last resort. especially since
these classes extends MovieClip and the movie clips themselves sit on stage
already [to simplify design issues .. lots of mcs on a world map kinda
thing].
heres more info on my code:
i am 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; // just so you know ReflectUtil
is from as2lib
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.
I have actually made some wierd progress last night. What i did is moved
AbstractMarker out of its package. compiling it using MMC [flash ide]. then
compiling it using MTASC [through FlashDevelop], this time it worked. and
then moving it back into the marker package and recompiling with MMC and
then MTASC and it worked.
so i believe the solution is a combination of the following : a compiler /
a bug / flashdevelop / packages / imports.
anyone any ideas ? how do i even start finding the problem ? is this some
kind of flash bug ?
regards and sorry for the long post
Danix
On 15/02/07, Steven Sacks | BLITZ <[EMAIL PROTECTED]> wrote:
> - Refactor to simpler class relationships (worst case but it
> did the trick for me - had to duplicate code, ewww).
You could use Composition instead, which reduces the need for normal
class inheritance.
_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com
_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com