Hi everybody.
Im having a hard time figuring out why changing the modifier of a class from
public to internal makes a border show up :0(
The case is:
- a class (public TesteClasse) is instantiated and added as an Application
child.
- this class instantiates an internal class (internal TesteClasseContainer) and
places it as a child of itself.
- both classes extends Canvas.
As I said, changing TesteClasseContainer modifier to public makes the border
"disappear".
Here are the sources:
PS. It doesnt matters wheter I writte TesteClasseContainer as another class (as
in this code) or right bellow TesteClasse (as the docs advice).
/*******************************/
APPLICATION
<mx:Application
xmlns:mx="http://www.adobe.com/2006/mxml"
layout="absolute"
creationComplete="initApp()">
<mx:Script>
<![CDATA[
import com.TesteClasse;
private function initApp():void{
var t:TesteClasse= new TesteClasse(300, 300);
addChild(t);
}
]]>
</mx:Script>
</mx:Application>
/*******************************/
TesteClasse
package com{
import mx.containers.Canvas;
public class TesteClasse extends Canvas{
public function TesteClasse(w:Number, h:Number){
super();
this.width=w;
this.height=h;
var t:TesteClasseContainer= new
TesteClasseContainer(w,h);
addChild(t);
}
}
}
/*******************************/
TesteClasseContainer
package com{
import mx.containers.Canvas;
internal class TesteClasseContainer extends Canvas{
//public class TesteClasseContainer extends Canvas{
public function TesteClasseContainer(w:Number, h:Number){
super();
this.width=w;
this.height=h;
}
}