Getting a runtime warning message, not sure how to get rid of it

Posted on 2009-04-22
Last Modified: 2012-05-06
I am getting this runtime warning message:

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

It happens when my datagrid change handler is called, and the code is as follows:

private function dgChangeHandler(event:Event):void
    txtCode.text =;

Whenever I click a selection on the datagrid, that single line in the handler is the one causing the warning message to come up. (txtCode is a mx:TextInput).

Why is this warning coming up, and what can I do to get rid of that warning?
Question by:elepil
    LVL 11

    Expert Comment


    What the dataProvider for datagrid? Mostly the selectedItem xml( or what ever be the dataProvider) wont be having a child "code" node.


    Author Comment

    The dataProvider is an ArrayCollection object, and the selectedItem does have a child node "code". In fact, the application works perfectly as expected.

    This is not the first time I got this warning message. In fact, I was able to get rid of it when I wrapped objects in ObjectProxy objects by passing the object to the ObjectProxy constructor. But in this case, I can't do that because "code" is of type string, and I don't know how to get rid of it.
    LVL 11

    Accepted Solution

    I found out what was happening to cause the "unable to bind" warning in the
    scenario that I described (see below). I eventually stumbled onto this
    solution after trying many different searches in Google:


    This is a solution for the common warning: "unable to bind to property 'XXX'
    on class 'Object' (class is not an IEventDispatcher)"

    This problem occurs frequently when transferring complex objects using AMF
    when the object returned from the server contains an array or array
    collection of more objects.
    One symptom of this problem is that it occurs after converting the data
    request from an HTTPService call to a Remote Object call.

    It turns out that Flex does not handle data returned from the AMF data
    service in quite the same way as HTTPService and WebService results. With
    these two later services Flex will automatically wrap Arrays in
    ArrayCollection and Objects in ObjectProxy wrappers so binding will work.

    The solution is to do this same thing manually, with code similar to the

    function resultHandler(result:Array) {
       for(var i:String in result) result[i] = new ObjectProxy(result[i]);
       targetArrayCollection = new ArrayCollection(result);

    Note: It may be the case that the result object is already an
    ArrayCollection yet the Objects in ObjectProxy wrappers. In this case you
    only need to include the for loop to implement ObjectProxy for all objects
    in the ArrayCollection.

    Featured Post

    Highfive + Dolby Voice = No More Audio Complaints!

    Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

    Join & Write a Comment

    Suggested Solutions

    Title # Comments Views Activity
    Draw arc with flash/flex graphics 7 1,148
    Flex 3 trace output 13 718
    Flash Social Media 2 482
    Sum column DataGrid 3 561
    First things first - Preparation We need all the part for this install and it's much nicer to have them all on hand when you need them so here's what's required. Download Eclipse 3.5 32 bit (I like the Classic flavour) from here. (http://www.e…
    It can often be challenging to stay relevant in the rapidly evolving world of technology. This can make recruiting talent difficult for companies of all sizes.
    Hi everyone! This is Experts Exchange customer support.  This quick video will show you how to change your primary email address.  If you have any questions, then please Write a Comment below!
    This video discusses moving either the default database or any database to a new volume.

    729 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    22 Experts available now in Live!

    Get 1:1 Help Now