Hi-

 

I have this odd behavior going on in my application that I’m hoping someone can help me figure out. Basically here’s what happens:

 

1)       A component broadcasts an event containing a URL to an XML file when an item is clicked on in a datagrid.

2)       The controller receives this event, then retrieves the XML file via an HTTPService tag.

3)       A binding passes the result to another component, which displays the data.

 

Here’s the oddness: the component displays only the data from the PREVIOUSLY selected item that calls the event. So for example, if the user clicks “a”, the HTTPService is called, but no results are displayed in the display component. However, then the user clicks “b”, and the contents of “a” appear…

 

Ideas?

 

Here’s the controller code:

 

<?xml version="1.0" encoding="utf-8"?>

 

<mx:Application xmlns:mx="http://www.macromedia.com/2003/mxml"

                pageTitle="fpodder PodCasting">

                                               

            <mx:Script>

            <![CDATA[

                        var sendPodcast:Object;

                        var podURL:String;

                        var playerInfo:Object;

             

                        function castThePod(event:Object):Void

                        {

                                    podURL=event.link;

                                    podData.send();

                                    playerInfo = podData.result.rss;

                        }

                       

            ]]>

            </mx:Script>

           

            <mx:HTTPService id="podData" url="" useProxy="true" showBusyCursor="true" />

            <mx:Label text="Welcome to fPodder." fontWeight="bold" fontFamily="Arial,Helvetica,Sans-serif" fontSize="20" textAlign="center" width="100%" />

           

           

            <mx:HBox>

                        <Subscriptions playPodcast="castThePod(event)" xmlns="*" />

                        <mx:VBox>

                                    <Player playerInfo="{playerInfo}" xmlns="*" />

                        </mx:VBox>

            </mx:HBox>

 

 

</mx:Application>

 

Thanks,

 

Drew Falkman



Yahoo! Groups Links

Reply via email to