How to access parent non static variable,
public var myArry:Array<Object> = ;
Object = new Object();
//I WANT TO ADD THE OBJECT ON THE PARENT ARRAY LIST
parent.maArry.push(Object); <-- this approach only works if i declare it as static variable.But static is heavy,
is this posible? trying to work on HTML5 target. I dont want to use static as
much as posible.. noob here. Thanks
parent injected into the
Child class or you are relaying on the display list?
Anyway, you should be able to access it. Does your code throws any errors?
Did you just rewrite a pseudo-code in the post or it is actually your code? Because parent declares
myArry and your child tries to access
Another possible thing is that it maybe missed a cast:
parent property type is a
The casting works! Thanks @leocavalcante, Yes it’s just a pseudo-code. But anyway thanks, I guess i should read more about haxe.