I have struggled with this all day and made no headway.  The only strange thing 
I get is with this line:

<mx:Label text="{dayCells.currentItem.toString()}" />

outputs [object Object] 

Not the expected string from this drawDay.as function.

// toString()
public function toString():String
{
  return "Date: " + formatedDate;
}                       



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




------------------------ Yahoo! Groups Sponsor --------------------~--> 
Great things are happening at Yahoo! Groups.  See the new email design.
http://us.click.yahoo.com/TISQkA/hOaOAA/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/
 
--- Begin Message ---
I am apparently not doing this.  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 lable and the test 
property of the dayFormat2 customComponent.  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. 




----------------------------------------------------------
You are subscribed to flex2dev. To unsubscribe, send an email to [EMAIL 
PROTECTED] with the words 'unsubscribe flex2dev' as the subject of the email.

Flex2Dev is run by CFCZone (www.cfczone.org) and supported by CFXHosting 
(www.cfxhosting.com).



--- End Message ---

Reply via email to