Inconsistent behavior working with "Flex on Rails" example.
Posted
by kmontgom
on Stack Overflow
See other posts from Stack Overflow
or by kmontgom
Published on 2010-03-19T03:07:56Z
Indexed on
2010/03/19
3:11 UTC
Read the original article
Hit count: 280
I'm experimenting with Flex and Rails right now (Rails is cool). I'm following the examples in the book "Flex on Rails", and I'm getting some puzzling and inconsistent behavior.
Heres the Flex MXML:
<mx:HTTPService id="index"
url="http://localhost:3000/people.xml" resultFormat="e4x" />
<mx:DataGrid dataProvider="{index.lastResult.person}"
width="100%" height="100%">
<mx:columns>
<mx:DataGridColumn headerText="First Name" dataField="first-name"/>
<mx:DataGridColumn headerText="Last Name" dataField="last-name"/>
</mx:columns>
</mx:DataGrid>
<mx:Script>
<![CDATA[
import mx.controls.Alert;
private function main():void
{
Alert.show( "In main()" );
}
]]>
</mx:Script>
When I run the app from my IDE (Amythyst beta, also cool), the DataGrid appears, but is not populated. The Alert.show() also triggers.
When I go out to a web browser and manually enter the url (http://localhost:3000/people.xml), the Mongrel console shows the request coming through and the browser shows the web response.
No exceptions or other error messages occur.
Whats the difference? Do I need to alter some OS setting? I'm using Win7 on an x64 machine.
© Stack Overflow or respective owner