It looks like I am not properly binding the object, but I do not know why.  
Here is what I suspect.

I am apparently not binding this correctly.  What am I missing to properly bind 
an object from a repeater looping over an array of object to the custom 
component called in the repeater?

<mx:Repeater
    id="dayCells"
    dataProvider="{days}"
    startingIndex="{weekRows.currentItem}"
    count="7">
  <mx:GridItem
      width="14%"
      borderColor="black"
      borderThickness="1"
      borderStyle="solid">
    <mx:Label
        text="{dayCells.currentItem.formatedDate}" />
    <ian:dayFormat2
         drawData="{dayCells.currentItem as drawDay}"
         test="{dayCells.currentItem.formatedDate}" />
  </mx:GridItem>
</mx:Repeater>

{days} is an array of drawDate.as objects returned with a remoteObject.   I can 
correctly bind properties of these drawDate objects in the label and the test 
property of the dayFormat2 custom component.  But I can NOT correctly bind the 
entire object over to dayFormat2.  What am I missing?

My current version of dayFormat2.mxml, I have tried several alternatives for 
this file.

?xml version="1.0" encoding="utf-8"?>
<mx:VBox xmlns:mx="http://www.adobe.com/2006/mxml"; width="100%">
  <mx:Script>
  <![CDATA[
    import drawDay;

    //Define public variables
    [Bindable]
    public var drawData:drawDay;

    [Bindable]
    public var test:String;
  ]]>
  </mx:Script>

  <mx:DateFormatter id="dayNum" formatString="DD" />

  <mx:HBox
      backgroundColor="0x002649"
      width="100%"
      horizontalAlign="right">
    <mx:Label
        text="{test}"
        color="white" />
    <mx:HBox
        backgroundColor="0xAF1E2D"
        horizontalAlign="center">
      <mx:Label
          text="{dayNum.format(drawData.date)}"
          color="white"  />   
    </mx:HBox>
  </mx:HBox>

  <mx:Label text="foobar" />
</mx:VBox>

The first label bound to the test String works correctly.  The second label 
bound to the drawData drawDay object date property does not work correctly.

What is the proper way to bind this object?


--------------
Ian Skinner
Web Programmer
BloodSource
www.BloodSource.org
Sacramento, CA

---------
| 1 |   |
---------  Binary Soduko
|   |   |
---------
 
"C code. C code run. Run code run. Please!"
- Cynthia Dunning

Confidentiality Notice:  This message including any
attachments is for the sole use of the intended
recipient(s) and may contain confidential and privileged
information. Any unauthorized review, use, disclosure or
distribution is prohibited. If you are not the
intended recipient, please contact the sender and
delete any copies of this message. 




~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:37:2893
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/37
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:37
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.37
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to