Give your services component an id, then refer to it elsewhere.  If you put services in your application you could use Application.application.myServices.statsRequest, etc.

 


From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Alex MacCaw
Sent: Saturday, April 22, 2006 1:17 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Newbie question

 

Is it possible to reference a HTTPService from another file.

 

For example in services.mxml I create a service:

<mx:HTTPService id="statsRequest" url="" useProxy="false"/>

 

And in stats.mxml I reference the service:

    <mx:DataGrid id="dgReviews" x="40" y="85" width="800" height="134" dataProvider="{ statsRequest.result.graphdata.stat}">
        <mx:columns>
            <mx:DataGridColumn headerText="Ip" dataField="ip" width="480"/>
            <mx:DataGridColumn headerText="When" dataField="created-at" width="240"/>
        </mx:columns>
    </mx:DataGrid>
 
However this doesn’t work, I get ‘Access of undefined property 'statRequest'’. I’m sure there must be a simple answer to this.
Thanks.
 
Alex




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




SPONSORED LINKS
Web site design development Computer software development Software design and development
Macromedia flex Software development best practice


YAHOO! GROUPS LINKS




Reply via email to