Hello
I would like to know which child of tabNavigator is clicked :
There is my code :
public function TabOnglet()
{
super();
this.setStyle("borderStyle" , "solid");
//this.percentHeight = 100;
this.percentWidth = 100;
this.createTab(this);
//create an listen to the event
this.initEventListener();
}
/**
*
* @param tabNavigator
*
*/
private function createTab(tabNavigator : TabNavigator) : void
{
var canvas1: Canvas= new Canvas();
canvas1.percentHeight=100;
canvas1.percentHeight = 100;
canvas1.percentWidth = 100;
canvas1.label = "BPMN";
var canvas2: Canvas= new Canvas();
canvas2.percentHeight=100;
canvas2.percentHeight = 100;
canvas2.percentWidth = 100;
canvas2.label = "BPEL";
canvas2.id="bpel";
tabNavigator.addChild(canvas2);
tabNavigator.addChild(canvas1);
}
/**
* initialise the event
*
*/
private function initEventListener() : void
{
trace(this + " cré un écouteur");
trace(this.getTabAt(1) +
"------------------------this.getTabAt(1)______________r");
//this.addEventListener(MouseEvent.CLICK, interceptClick, true);
var tab:Button = this.getTabAt(1);
tab.addEventListener(MouseEvent.CLICK,interceptClick);
//this.getChildAt(1).addEventListener(MouseEvent.CLICK,
interceptClick, true);
}
in the browser it displays this message : 'Il est impossible d'accéder à la
propriété ou à la méthode d'une référence d'objet nul" that is mean it is
impossible to acceed to a propriety or method of a reference of object which
is nul .
Thanks
Any idea please ???
_________________________________________________________________
Hotmail arrive sur votre téléphone ! Compatible Iphone, Windows Phone,
Blackberry, …
http://www.messengersurvotremobile.com/?d=Hotmail