Re: [flexcoders] Flex 1.5 to Flex 2 migration - binding problem

2006-06-15 Thread Tom Chiverton
On Wednesday 14 June 2006 17:04, Phil Marston wrote:
 public var reviewList:Object={
.
 public function onReviewsListResult( result : Array ) : void
 {
 reviewList = result;
 }


Your result is declared in onReviewsListResult as being an Array, but you've 
written reviewList to be just an object with properties, which is why it's 
complaining.

(everyone)Things are allways easier when you include a simple (non)working 
example.

-- 
Tom Chiverton



This email is sent for and on behalf of Halliwells LLP.

Halliwells LLP is a limited liability partnership registered in England and 
Wales under registered number OC307980 whose registered office address is at St 
James's Court Brown Street Manchester M2 2JF.  A list of members is available 
for inspection at the registered office. Any reference to a partner in relation 
to Halliwells LLP means a member of Halliwells LLP. Regulated by the Law 
Society.

CONFIDENTIALITY

This email is intended only for the use of the addressee named above and may be 
confidential or legally privileged.  If you are not the addressee you must not 
read it and must not use any information contained in nor copy it nor inform 
any person other than Halliwells LLP or the addressee of its existence or 
contents.  If you have received this email in error please delete it and notify 
Halliwells LLP IT Department on 0870 365 8008.

For more information about Halliwells LLP visit www.halliwells.com.

We are pleased to announce that Halliwells LLP has been voted AIM Lawyer of the 
Year at the 2005 Growth Company Awards



 Yahoo! Groups Sponsor ~-- 
See what's inside the new Yahoo! Groups email.
http://us.click.yahoo.com/2pRQfA/bOaOAA/yQLSAA/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/
 





Re: [flexcoders] Flex 1.5 to Flex 2 migration - binding problem

2006-06-15 Thread Phil Marston






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



  Visit your group "flexcoders" on the web.
  To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



  






__,_._,___




Re: [flexcoders] Flex 1.5 to Flex 2 migration - binding problem

2006-06-15 Thread Phil Marston






Thanks Tom

:-)

Tom Chiverton wrote:

  On Wednesday 14 June 2006 17:04, Phil Marston wrote:
  
  
public var reviewList:Object={

  
  .
  
  
public function onReviewsListResult( result : Array ) : void
{
reviewList = result;
}


  
  
Your result is declared in onReviewsListResult as being an Array, but you've 
written reviewList to be just an object with properties, which is why it's 
complaining.

(everyone)Things are allways easier when you include a simple (non)working 
example.

  


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



  Visit your group "flexcoders" on the web.
  To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



  






__,_._,___




Re: [flexcoders] Flex 1.5 to Flex 2 migration - binding problem

2006-06-14 Thread Phil Marston






Can you suggest a type?

Cheers,

Phil

Tracy Spratt wrote:

  
  

  
  
  

  
  
  
  Mx:Object is
not stronlgy engough typed to
support binding. The docs say to not use it.
  
  If you can
cast the Object to a more
specific type, the wearning should go away,
  
  Tracy
  
  
  
  
  From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of Phil Marston
  Sent: Tuesday, June
13, 2006 11:56
AM
  To: flexcoders@yahoogroups.com
  Subject: Re:
[flexcoders] Flex 1.5
to Flex 2 migration - binding problem
  
  
  
  
  
  nobody any ideas? I'm begining to wonder if
my
dataObject needs to be 
something other than Object - the consol says I'm trying to bind to a 
class that is not an 'IEventDispatcher' - can anyone suggest a better
class?
  
Cheers,
  
Phil
  
Phil Marston wrote:
 Hi

 I have a custom mxml component "RestaurantDetail.mxml" that
is used in 
 my main application "Restaurant.mxml" - the component has a
  
 dataObject:Object and some mx:label who's text attribute is bound
to the 
 dataObject. When the RestaurantDetail component is declared in the
  
 Restaurant app the dataObject gets bound to a dataGrid
 e.g.RestaurantDetail dataObject="{dg.selectedItem}"
/
 This was originally a Flex 1.5 app that I am trying to rewrite in
Flex 
 2.0, but Flex Builder is complaining that "Data binding will not
be
able 
 to detect assignments to 'dataObject'"

 Does anyone know how to get this to work in Flex 2.0

 For those that haven't already spotted it, I'm trying to follow 
 Christophe Coenraets' Restaurant Browser Tutorial found here 
 http://coenraets.com/tutorials/restaurant/index.jsp
I'm stuck at "Lab 7"

 Cheers,

 Phil

 
  
-- 
__
  
Phil Marston 
Learning Technologist
Learning Technology Unit 
Edward Wright G33, University
of Aberdeen, Aberdeen, AB24 3QY, UK
  [EMAIL PROTECTED]ac.uk
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]ac.uk
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



  Visit your group "flexcoders" on the web.
  To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



  






__,_._,___




Re: [flexcoders] Flex 1.5 to Flex 2 migration - binding problem

2006-06-14 Thread Tom Chiverton
On Wednesday 14 June 2006 09:00, Phil Marston wrote:
 Can you suggest a type?

You could make your own...

-- 
Tom Chiverton



This email is sent for and on behalf of Halliwells LLP.

Halliwells LLP is a limited liability partnership registered in England and 
Wales under registered number OC307980 whose registered office address is at St 
James's Court Brown Street Manchester M2 2JF.  A list of members is available 
for inspection at the registered office. Any reference to a partner in relation 
to Halliwells LLP means a member of Halliwells LLP. Regulated by the Law 
Society.

CONFIDENTIALITY

This email is intended only for the use of the addressee named above and may be 
confidential or legally privileged.  If you are not the addressee you must not 
read it and must not use any information contained in nor copy it nor inform 
any person other than Halliwells LLP or the addressee of its existence or 
contents.  If you have received this email in error please delete it and notify 
Halliwells LLP IT Department on 0870 365 8008.

For more information about Halliwells LLP visit www.halliwells.com.

We are pleased to announce that Halliwells LLP has been voted AIM Lawyer of the 
Year at the 2005 Growth Company Awards



 Yahoo! Groups Sponsor ~-- 
Get to your groups with one click. Know instantly when new email arrives
http://us.click.yahoo.com/.7bhrC/MGxNAA/yQLSAA/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/
 





Re: [flexcoders] Flex 1.5 to Flex 2 migration - binding problem

2006-06-14 Thread Phil Marston






Should I have asked!

OK where do I begin looking in to that?

Is it just a case of 
public class myDataObject extends Object ???
or
public class myDataObject extends IEventDispatcher ???

I'm guessing there's more, but I'm getting out of my depth without
knowing where to look for more info . . . :-/

Pointers greatly appreciated!

Cheers,

Phil

Tom Chiverton wrote:

  On Wednesday 14 June 2006 09:00, Phil Marston wrote:
  
  
Can you suggest a type?

  
  
You could make your own...

  


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



  Visit your group "flexcoders" on the web.
  To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



  






__,_._,___




Re: [flexcoders] Flex 1.5 to Flex 2 migration - binding problem

2006-06-14 Thread Tom Chiverton
On Wednesday 14 June 2006 14:07, Phil Marston wrote:
 OK where do I begin looking in to that?

Besides the docs :-)

 Is it just a case of
 public class myDataObject extends Object ???

Preaty much.
I don't think you need to extend IDataProvider or anything.


-- 
Tom Chiverton



This email is sent for and on behalf of Halliwells LLP.

Halliwells LLP is a limited liability partnership registered in England and 
Wales under registered number OC307980 whose registered office address is at St 
James's Court Brown Street Manchester M2 2JF.  A list of members is available 
for inspection at the registered office. Any reference to a partner in relation 
to Halliwells LLP means a member of Halliwells LLP. Regulated by the Law 
Society.

CONFIDENTIALITY

This email is intended only for the use of the addressee named above and may be 
confidential or legally privileged.  If you are not the addressee you must not 
read it and must not use any information contained in nor copy it nor inform 
any person other than Halliwells LLP or the addressee of its existence or 
contents.  If you have received this email in error please delete it and notify 
Halliwells LLP IT Department on 0870 365 8008.

For more information about Halliwells LLP visit www.halliwells.com.

We are pleased to announce that Halliwells LLP has been voted AIM Lawyer of the 
Year at the 2005 Growth Company Awards



 Yahoo! Groups Sponsor ~-- 
Get to your groups with one click. Know instantly when new email arrives
http://us.click.yahoo.com/.7bhrC/MGxNAA/yQLSAA/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/
 




Re: [flexcoders] Flex 1.5 to Flex 2 migration - binding problem

2006-06-14 Thread Phil Marston








Tom Chiverton wrote:

  On Wednesday 14 June 2006 14:07, Phil Marston wrote:
  
  
OK where do I begin looking in to that?

  
  
Besides the docs :-)

  

lol - the 1st place I tried 
:-P  I guess I'm just not searching the vast tome
for the right thing!   :-( 


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



  Visit your group "flexcoders" on the web.
  To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



  






__,_._,___




Re: [flexcoders] Flex 1.5 to Flex 2 migration - binding problem

2006-06-14 Thread Tom Chiverton
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=1056.html

-- 
Tom Chiverton



This email is sent for and on behalf of Halliwells LLP.

Halliwells LLP is a limited liability partnership registered in England and 
Wales under registered number OC307980 whose registered office address is at St 
James's Court Brown Street Manchester M2 2JF.  A list of members is available 
for inspection at the registered office. Any reference to a partner in relation 
to Halliwells LLP means a member of Halliwells LLP. Regulated by the Law 
Society.

CONFIDENTIALITY

This email is intended only for the use of the addressee named above and may be 
confidential or legally privileged.  If you are not the addressee you must not 
read it and must not use any information contained in nor copy it nor inform 
any person other than Halliwells LLP or the addressee of its existence or 
contents.  If you have received this email in error please delete it and notify 
Halliwells LLP IT Department on 0870 365 8008.

For more information about Halliwells LLP visit www.halliwells.com.

We are pleased to announce that Halliwells LLP has been voted AIM Lawyer of the 
Year at the 2005 Growth Company Awards



 Yahoo! Groups Sponsor ~-- 
Home is just a click away.  Make Yahoo! your home page now.
http://us.click.yahoo.com/DHchtC/3FxNAA/yQLSAA/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/
 





Re: [flexcoders] Flex 1.5 to Flex 2 migration - binding problem

2006-06-14 Thread Phil Marston






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


__._,_.___





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



  Visit your group "flexcoders" on the web.
  To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



  






__,_._,___




RE: [flexcoders] Flex 1.5 to Flex 2 migration - binding problem

2006-06-14 Thread Tracy Spratt










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:[EMAIL PROTECTED] 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 thevast 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 TechnologistLearning 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 2006Booking is essentialwww.abdn.ac.uk/opendayemail [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



  Visit your group "flexcoders" on the web.
  To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



  






__,_._,___






Re: [flexcoders] Flex 1.5 to Flex 2 migration - binding problem

2006-06-13 Thread Phil Marston
nobody any ideas?  I'm begining to wonder if my dataObject needs to be 
something other than Object - the consol says I'm trying to bind to a 
class that is not an 'IEventDispatcher' - can anyone suggest a better class?

Cheers,

Phil

Phil Marston wrote:
 Hi

 I have a custom mxml component RestaurantDetail.mxml that is used in 
 my main application Restaurant.mxml  - the component has a 
 dataObject:Object and some mx:label who's text attribute is bound to the 
 dataObject.  When the RestaurantDetail component is declared in the 
 Restaurant app the dataObject gets bound to a dataGrid
 e.g.RestaurantDetail dataObject={dg.selectedItem} /
  This was originally a Flex 1.5 app that I am trying to rewrite in Flex 
 2.0, but Flex Builder is complaining that Data binding will not be able 
 to detect assignments to 'dataObject'

 Does anyone know how to get this to work in Flex 2.0

 For those that haven't already spotted it, I'm trying to follow 
 Christophe Coenraets' Restaurant Browser Tutorial found here 
 http://coenraets.com/tutorials/restaurant/index.jsp I'm stuck at Lab 7

 Cheers,

 Phil

   

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



 Yahoo! Groups Sponsor ~-- 
Protect your PC from spy ware with award winning anti spy technology. It's free.
http://us.click.yahoo.com/97bhrC/LGxNAA/yQLSAA/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/
 




RE: [flexcoders] Flex 1.5 to Flex 2 migration - binding problem

2006-06-13 Thread Tracy Spratt










Mx:Object is not stronlgy engough typed to
support binding. The docs say to not use it.



If you can cast the Object to a more
specific type, the wearning should go away,



Tracy











From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of Phil Marston
Sent: Tuesday, June 13, 2006 11:56
AM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Flex 1.5
to Flex 2 migration - binding problem











nobody any ideas? I'm begining to wonder if my
dataObject needs to be 
something other than Object - the consol says I'm trying to bind to a 
class that is not an 'IEventDispatcher' - can anyone suggest a better class?

Cheers,

Phil

Phil Marston wrote:
 Hi

 I have a custom mxml component RestaurantDetail.mxml that
is used in 
 my main application Restaurant.mxml - the component has a

 dataObject:Object and some mx:label who's text attribute is bound to the 
 dataObject. When the RestaurantDetail component is declared in the 
 Restaurant app the dataObject gets bound to a dataGrid
 e.g.RestaurantDetail dataObject={dg.selectedItem}
/
 This was originally a Flex 1.5 app that I am trying to rewrite in Flex 
 2.0, but Flex Builder is complaining that Data binding will not be
able 
 to detect assignments to 'dataObject'

 Does anyone know how to get this to work in Flex 2.0

 For those that haven't already spotted it, I'm trying to follow 
 Christophe Coenraets' Restaurant Browser Tutorial found here 
 http://coenraets.com/tutorials/restaurant/index.jsp
I'm stuck at Lab 7

 Cheers,

 Phil

 

-- 
__

Phil Marston 
Learning Technologist
Learning Technology Unit 
Edward Wright G33, University of Aberdeen, Aberdeen,
 AB24 3QY, UK
[EMAIL PROTECTED]ac.uk 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]ac.uk
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



  Visit your group "flexcoders" on the web.
  To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



  






__,_._,___