I'm a noob at Flex and I hashed this together from the flex docs:

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml";
layout="vertical"
        initialize="myService.send(); initApp();">

        <mx:Script>
                <![CDATA[
                        import mx.controls.Alert;
                        import mx.collections.ArrayCollection;
                         import mx.rpc.events.ResultEvent;
            import mx.rpc.events.FaultEvent;
                        import flash.events.SecurityErrorEvent;

                 private function initApp():void {
           
myService.addEventListener(SecurityErrorEvent.SECURITY_ERROR,
securityErrorHandler);
             Security.allowDomain("pipes.yahooapis.com/")
        }

                        private function 
securityErrorHandler(event:SecurityErrorEvent):void {
            Alert.show("A security error occurred! Check trace logs
for details.");         
            trace("securityErrorHandler: " + event.text);
        }

                        [Bindable]
                        private var myData:ArrayCollection;
                        
                        private function resultHandler(event:ResultEvent):void {
                                myData = event.result.rss.channel.item
                        }
                        
                        private function faultHandler(event:FaultEvent):void {
                         trace("fault: " + event.fault.faultString + "\n" +
event.fault.faultDetail);
                        }
                ]]>
        </mx:Script>

        <mx:HTTPService id="myService"
        
url="http://pipes.yahooapis.com/pipes/pipe.info?_id=xtLY40Dh2xGvFdsaCR2yXQ";
                result="resultHandler(event)" fault="faultHandler(event)"/>
                
        <mx:DataGrid dataProvider="{myData}" />
        
</mx:Application>

It's not telling me anything new, does anyone know how to properly
parse this feed? 





--- In [email protected], "huangnankun" <[EMAIL PROTECTED]> wrote:
>
> Its the security sandbox issue, read up the flex 2 docs about this.
> Alternatively, you can attach a security error handler to your http
> service and read the error msg yourself =)
> 
> --- In [email protected], "joshspooning" <joshspooning@>
> wrote:
> >
> > I am currently trying to build a Flex app for me to search for places
> > to eat lunch at work. I'm stuck on my first step. I'm having a problem
> > parsing the the pipes just to a DataGrid. When I use a local copy it
> > works but when I use the Yahoo! copy, it comes up blank. If any one
> > could help me see what's wrong I'd be happy.
> > 
> > Thanks,
> > 
> > Josh
> > 
> > <?xml version="1.0" encoding="utf-8"?>
> >    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml";
> >    layout="vertical" initialize="myService.send()">
> >     <mx:HTTPService id="myService" 
> >
>
url="http://pipes.yahooapis.com/pipes/pipe.run?location=Dallas&search=sandwhich&_id=tEaG60rj2xGl7hOLn0artA&_run=1&_render=rss";
> >     />
> >        <mx:DataGrid 
> > dataProvider="{myService.lastResult.rss.channel.item}"  />
> > </mx:Application>
> >
>


Reply via email to