Thanks Tracey - I'm looking into what ArrayCollection can do for me now.

:-)

Tracy Spratt wrote:

This implies result is an Array:

public function onReviewsListResult( result : Array ){

reviewList = result;

..

is that correct?

 

If so, make reviewList an ArrayCollection.  Type the variable in the component as ArrayCollection as well.

 

 

Tracy


From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of Phil Marston
Sent: Wednesday, June 14, 2006 12:05 PM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Flex 1.5 to Flex 2 migration - binding problem

 

Yeah I know about that, but this is an object that I'm getting back from AMFPHP via remoting

my Object looks like this;
           [Bindable]
            public var reviewList:Object={
                reviewDate:null,
                reviewer:null,
                title:null,
                rating:null
            };
my service call looks like this;
            public function getReviews (restId:Object): void
            {
                gateway.call( "Restaurant.getReviewsList", reviewsListResponder = new Responder(onReviewsListResult, onReviewsListFault), restId);               
            }
           
            public function onReviewsListResult( result : Array ) : void
            {
                reviewList = result;
            }

and reviewList gets used here;
                <restaurant:ReviewList label="Reviews" list="{reviewList}"/>               


and the custom component looks like this
<mx:VBox xmlns:mx="http://www.adobe.com/2006/mxml" >
    <mx:Script>
        <![CDATA[
            public var list:Object;
        ]]>
    </mx:Script>
    <mx:DataGrid id="dg" dataProvider="{list}" >
        <mx:columns>
            <mx:DataGridColumn headerText="Date" dataField="review_date"/>
            <mx:DataGridColumn headerText="Reviewer" dataField="reviewer"/>
            <mx:DataGridColumn headerText="Title" dataField="title"/>
            <mx:DataGridColumn headerText="Rating" dataField="rating"/>
        </mx:columns>
    </mx:DataGrid>
</mx:VBox>

it's in this component that I'm getting complaints that the dataProvider for the DataGrid is not of the right sort.

I can't work out where to go from here!

:-(

Tom Chiverton wrote:

On Wednesday 14 June 2006 15:25, Phil Marston wrote:
  
lol - the 1st place I tried :-P      I guess I'm just not searching the
vast tome for the right thing!  :-(
    
 
You can just declare the data provider as an inline array or something:
http://livedocs.macromedia.com/labs/1/flex20beta3/wwhelp/wwhimpl/common/html/wwhelp.htm?href="">
 
  



-- 
______________________________________________________________ 
Phil Marston 
Learning Technologist
Learning Technology Unit 
Edward Wright G33, University of Aberdeen, Aberdeen, AB24 3QY, UK
[EMAIL PROTECTED] Tel: +44(0)1224 273329 / +44(0)7798 723660 
http://www.abdn.ac.uk/diss/ltu/pmarston/
http://www.abdn.ac.uk/diss/ltu/
______________________________________________________________
 
The University of Aberdeen Open Day 29th August 2006
Booking is essential
www.abdn.ac.uk/openday
email [EMAIL PROTECTED]
or call 0800 027 1495

-- 
______________________________________________________________ 
Phil Marston 
Learning Technologist
Learning Technology Unit 
Edward Wright G33, University of Aberdeen, Aberdeen, AB24 3QY, UK
[EMAIL PROTECTED] Tel: +44(0)1224 273329 / +44(0)7798 723660 
http://www.abdn.ac.uk/diss/ltu/pmarston/
http://www.abdn.ac.uk/diss/ltu/
______________________________________________________________

The University of Aberdeen Open Day 29th August 2006
Booking is essential
www.abdn.ac.uk/openday
email [EMAIL PROTECTED]
or call 0800 027 1495
__._,_.___

--
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