( I also posted this on the labs forums at Macromedia.com, so I
apologize if this is a cross post for anyone )

 I'm using Flex Builder 2 (Alpha, of course) and am having trouble
retrieving / accessing XML data.

 I'm completely new to Flex, but know web programming well. I
succesfully implemented the quick start demos without any problem. My
long term goal is to populate a combobox from an XML document. I know
there is another post on the lab forum on that, but I haven't gotten
far enough to be able to apply that post.

I set up this quick demo to demonstrate the problem:

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.macromedia.com/2005/mxml"; xmlns="*">
<mx:HTTPService id="category"
url="http://www.jeffryhouser.com/flex/getcategories.cfm";
useProxy="false"/>

<mx:Canvas width="100%" height="100%">
<mx:Label x="12" y="24" text="{category.result}" width="253"/>

</mx:Canvas>
</mx:Application>

 The label is blank. I would have expected it to return something like
"object Object", which makes me think that the problem is in
retrieving the data. If I add a similar label to the BlogReader quick
start code, "object Object" is returned, like this:

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.macromedia.com/2005/mxml";
xmlns="*" initialize="feedRequest.send()" >
<mx:HTTPService id="feedRequest"
url="http://www.jeffryhouser.com/rss.cfm?mode=short"; useProxy="false"/>
<mx:Canvas width="100%" height="100%">
<mx:Label x="20" y="10" text="{feedRequest.result.rss.channel.title}" />
<mx:Label x="331" y="9" text="{feedRequest.result}" width="330"/>
<mx:DataGrid x="20" y="40" id="dgPosts" width="400"
dataProvider="{feedRequest.result.rss.channel.item}">
<mx:columns>
<mx:DataGridColumn headerText="Date" columnName="pubDate" width="150" />
<mx:DataGridColumn headerText="Posts" columnName="title"/>
</mx:columns>
</mx:DataGrid>
<mx:TextArea x="20" y="204" width="400"
htmlText="{dgPosts.selectedItem.description}" height="200"/>
<mx:Link x="24" y="405" label="Read Full Post" height="20"
click="getURL(dgPosts.selectedItem.link);" />
</mx:Canvas>
</mx:Application>


Now, If I take my first example and replace the HTTPService URL to
point to an RSS feed; nothing is returned; here is that code:

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.macromedia.com/2005/mxml"; xmlns="*">
<mx:HTTPService id="category"
url="http://www.jeffryhouser.com/rss.cfm?mode=short"; useProxy="false"/>
<mx:Canvas width="100%" height="100%">
<mx:Label x="12" y="24" text="{category.result}" width="253"/>
</mx:Canvas>
</mx:Application>

I do not see any differences, in technique, between the BlogReader and
the Test code; so I'm not sure why nothing appears to be getting returned.

Any thoughts or assistance would be welcome. 





------------------------ Yahoo! Groups Sponsor --------------------~--> 
Get Bzzzy! (real tools to help you find a job). Welcome to the Sweet Life.
http://us.click.yahoo.com/KIlPFB/vlQLAA/TtwFAA/nhFolB/TM
--------------------------------------------------------------------~-> 

--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/flexcoders/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to