When does startFIlter get called?  Can you post the entire call stack
with the error?  startFilter may be called before the result from the
HTTPService. Add trace statements to startFilter and the result handler
and see which one gets called first.

________________________________

From: [email protected] [mailto:[EMAIL PROTECTED] On
Behalf Of Ary
Sent: Sunday, August 26, 2007 3:07 PM
To: [email protected]
Subject: RE: [flexcoders] filterFunction on ArrayCollection



Hi Alex, thx for replying, yes i thought so too...but
if it is...it won't work on local either..but it works
on localhost...

here's the code
private function startFilter(toFilter:String):void {
categoryString=toFilter;
tabSwitch(toFilter);
playlist=userRequest.lastResult.videolink.video
playlist.filterFunction=processFilter;
playlist.refresh();
dgUserRequest.selectedIndex=0; 
}

private function processFilter(item:Object):Boolean
{
var result:Boolean=false;
if (!item.videocategory.length ||
item.videocategory.toUpperCase().indexOf(categoryString)
>= 0){
result=true;
}
return result;
}

and here is the httpservice, trigerred on
creationComplete app. userRequest.send();
<mx:HTTPService id="userRequest" url="_fxrequest.php"
useProxy="false" method="POST"
result="playlist=userRequest.lastResult.videolink.video"
>

thanks!
ary

--- Alex Harui <[EMAIL PROTECTED] <mailto:aharui%40adobe.com> > wrote:

> please post some code. Sounds like you might be
> filtering before the
> results come back from the server.

__________________________________________________________
Need a vacation? Get great deals
to amazing places on Yahoo! Travel.
http://travel.yahoo.com/ <http://travel.yahoo.com/> 


 

Reply via email to