Hola jorge gracias por responder te comento probe lo que me indicaste y me sale el siguiente error
1119: Acceso a una propiedad label posiblemente no definida mediante una referencia con tipo estático flash.display:DisplayObject.
te comento que el label de este tab lo coje de un contenedor
Código :
private function tabCloseHandler(event:SuperTabEvent):void {
AQUI TU CODIGO ---> this.flexIrcClient.partChannel(channelViewStack.getChildAt(channelViewStack.selectedIndex).label);
}
internal function buildNewPrivateUI(privado:String, icon:Class=null):UIComponent
{
var privateWindow:PrivateWindow = new PrivateWindow();
privateWindow.id = privado;
privateWindow.label = privado;
privateWindow.icon = icon;
privateWindow.privado = privado;
privateWindow.flexIrcClient = this.flexIrcClient;
privateWindow.registerListeners(this.flexIrcClient);
return privateWindow;
}
protected function addPrivado(event:UserEvent):void
{
var privado:String = event.privado;
if (ListPrivados(privado) != 0) {
channelViewStack.addChild(this.buildNewPrivateUI(privado, privat)); }
}
<ns3:SuperTabNavigator width="80%" height="80%" id="channelViewStack" horizontalCenter="0" y="66" styleName="logwindow" backgroundColor="#333333" tabClose="tabCloseHandler(event);">
<mx:VBox label="Estado" height="100%" width="100%" styleName="logContainer">
<mx:TextArea height="100%" width="100%" id="serverLog" editable="false" styleName="logWindow" backgroundColor="#999999"/>
<mx:HBox width="100%" paddingBottom="5" paddingLeft="5" paddingRight="5" paddingTop="5">
<mx:TextInput width="100%" id="cmdLine" enabled="{connected}" enter="sendCommand()"/>
<mx:Button label="Enviar" id="sendButton" enabled="{connected}" click="sendCommand()"/>
</mx:HBox>
</mx:VBox>
</ns3:SuperTabNavigator>