Buenas tardes espero que alguien me pueda ayudar... no entiendo el error que me muestra el debugg de flex...
Código Error:
Ver originalTypeError: Error #1009: No se puede acceder a una propiedad o a un método de una referencia a un objeto nulo.
at mx.rpc.http::Operation/getSerializationFilter()[C:\autobuild\3.5.0\frameworks\projects\rpc\src\mx\rpc\http\Operation.as:317]
at mx.rpc.http::Operation/send()[C:\autobuild\3.5.0\frameworks\projects\rpc\src\mx\rpc\http\Operation.as:239]
at components::editFotosPublic/guardapub()[D:\Flex 3\flexVangAdmon\src\components\editFotosPublic.mxml:42]
at components::editFotosPublic/___editFotosPublic_Button1_click()[D:\Flex 3\flexVangAdmon\src\components\editFotosPublic.mxml:55]
mi codigo es el siguiente:
Código Flex3:
Ver original<?xml version="1.0" encoding="utf-8"?>
<mx:TitleWindow xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" creationComplete="init()" close="cerrar()" showCloseButton="true" width="836" height="284" title="Archivos Publicados">
<mx:Script>
<![CDATA[
import mx.rpc.events.ResultEvent;
import mx.managers.PopUpManager;
private function init():void
{
PopUpManager.centerPopUp(this);
var sndObj:Object = new Object();
}
private function cerrar():void
{
PopUpManager.removePopUp(this);
}
[Bindable] private var imag:XMLList = new XMLList
private function resultInHandler(event:ResultEvent):void
{
var tmp:XMLList = new XMLList(event.result);
imag = new XMLList(tmp.galeria.node);
}
private function guardapub():void
{
var sndObj:Object = new Object();
sndObj.identificador = idlabel.text;
var con:int = imag.length();
for(var i:int=0;i<imag.length();i++)
{
if(chk[i].selected)
{
sndObj.pub = 1;
}else{
sndObj.pub = 0;
}
sndObj.id = imag[i].@id;
//trace(sndObj.pub);
//trace(sndObj.id);
modPub.send(sndObj);
}
}
private function resInHandler(event:ResultEvent):void
{
var res:Object=event.result;
}
]]>
</mx:Script>
<mx:HTTPService id="infophp" url="http://localhost/xml/getFotoById.php" result="resultInHandler(event)" resultFormat="e4x" method="POST" showBusyCursor="true"/>
<mx:HTTPOperation id="modPub" url="http://localhost/xml/updateFotosEst.php" result="resInHandler(event)" resultFormat="text" method="POST" showBusyCursor="true"/>
<mx:Label x="164" y="-30" id="idlabel"/>
<mx:Button x="740" y="209" label="Guardar" click="guardapub()"/>
<mx:HBox y="10" paddingBottom="2" paddingLeft="2" paddingRight="2" paddingTop="2" width="812" height="191">
<mx:Repeater id="rep" dataProvider="{imag}" >
<mx:VBox>
<mx:Image id="imagen" source="http://10.15.1.106/previstas_discos/{rep.currentItem.@dir}/{rep.currentItem.@arch}" width="143" height="145" brokenImageSkin="@Embed(source='../assets/Unload.jpg')"/>
<mx:CheckBox id="chk" label="{rep.currentItem.@arch}" selected="{rep.currentItem.@pub=='1'?true:false}"/>
</mx:VBox>
</mx:Repeater>
</mx:HBox>
</mx:TitleWindow>