Scott,

I was writting a lenthly response as to different things I've tried 
and still getting the warning.  I decided to try an example from the 
docs by Adobe.  I get a 'warning' from their example as well.  

It seems that warning is just stating that the data is bound to the 
repater and not the object within the repeater.

The following example returns: 

warning: unable to bind to property 'name' on class 'Object' (class 
is not an IEventDispatcher)


<?xml version="1.0" encoding="utf-8"?>
<mx:Application 
    xmlns:mx="http://www.adobe.com/2006/mxml";

    viewSourceURL="src/RepeaterStatic2/index.html"
    width="285" height="185" 
>
    <!-- 
        This is a static data model but you could just as
        easily bind to dynamically loaded data. 
    -->  
    <mx:ArrayCollection id="productsAC">

        <mx:Object name="Whirlygig" price="5" freeship="false"/>
        <mx:Object name="Tilty Thingy" price="15" freeship="true"/>

        <mx:Object name="Really Big Blocks" price="25" 
freeship="true"/>
    </mx:ArrayCollection>

    
    <mx:Panel 
        title="Repeater: emulating a for..in loop"
        paddingBottom="10" paddingLeft="10" paddingRight="10" 
paddingTop="10"

    >

        <mx:Repeater id="productsRepeater" 
dataProvider="{productsAC}"> 
            <mx:RadioButton 
                id="buttonsArray" 
                label="{productsRepeater.currentItem.name}"

            />
        </mx:Repeater>
  
    </mx:Panel>
</mx:Application>

I'm going to move on for now... thanks for the response!

Shelley

--- In [email protected], slangeberg <[EMAIL PROTECTED]> wrote:
>
> Throw a cast in each one:
> 
> personID="{YourClassThatHasPersonIDAndOtherDesiredProperties(
> employee.currentItem).PersonID}"
> 
> It's giving you that warning because 'employee.currentItem' is a 
POO (plain
> ol' Object).
> 
> I'm doing the same thing on current project, and instead of 
setting all
> those properties, my component in the repeater has a VO that it 
binds to,
> internally, so I do something like:
> 
> <mx:Repeater id="employee" dataProvider="{directReportCollection}">
>     <v:employeeElement
>          itemVO="{ItemVO(employee.currentIndex)}"
>           ...
>      />
> </mx:Repeater>
> 
> As long as directReportCollection is collection of ItemVO's (or 
whatever),
> you're golden. Then, your empEl can get all those properties off 
ItemVO,
> which has a nice, tidy interface defined...
> 
> ;) Scott
> 
> On 2/15/07, shelleybrowning <[EMAIL PROTECTED]> wrote:
> >
> >   Hello,
> >
> > I have an application that uses the repeater to create multiple
> > instances of a custom mxml component (employeeElement).
> >
> > <mx:Repeater id="employee" 
dataProvider="{directReportCollection}">
> > <v:employeeElement
> > itemNum="{employee.currentIndex}"
> > hasDirectReports="{employee.currentItem.Manager}"
> > employeeName="{employee.currentItem.FullName}"
> > jobTitle="{employee.currentItem.JobTitle}"
> > personID="{employee.currentItem.PersonID}"
> > personUUID="{employee.currentItem.PersonUUID}"
> > numDirectReports="{numDirectReports}"
> > asgUUID="{employee.currentItem.asgUUID}"
> > dakDB="{dakDB}"
> > isDirectReport="true"
> > goDownHeirarchy="goDownHeirarchy(event)"/>
> > </mx:Repeater>
> >
> > The dataProvider for the repeater is directReportCollection 
which is
> > an ArrayCollection that has been declared as bindable.
> >
> > I'm getting the following warning when the code runs. The
> > employeeElements are rendered. But I don't like not undertanding
> > why the warning is being posted. Or want this to come back and 
bite
> > me later...
> >
> > Here is the warning:
> > warning: unable to bind to property 'PersonUUID' on 
class 'Object'
> > (class is not an IEventDispatcher)
> > warning: unable to bind to property 'FullName' on class 'Object'
> > (class is not an IEventDispatcher)
> > warning: unable to bind to property 'Manager' on class 'Object'
> > (class is not an IEventDispatcher)
> > warning: unable to bind to property 'PersonID' on class 'Object'
> > (class is not an IEventDispatcher)
> > warning: unable to bind to property 'asgUUID' on class 'Object'
> > (class is not an IEventDispatcher)
> > warning: unable to bind to property 'JobTitle' on class 'Object'
> > (class is not an IEventDispatcher)
> >
> > repeating for each instance of the component within the repeater.
> >
> > I double/triple checked that everything was declared as bindable
> > within the custom component as well as the collection array. I
> > imported IEventDispatcher into the custom component, but that 
didn't
> > do anything.
> >
> > Any suggestions?
> > PS: using Flex 2.0.1 and this code is within a module.
> >
> > Thanks,
> >
> > Shelley Browning
> > Intermountain Healthcare
> >
> >  
> >
> 
> 
> 
> -- 
> 
> : : ) Scott
>


Reply via email to