Thanks!
 
That removed the compile error.
I still get the compile warning - 'Unable to detect changes to "_sample_ac".'  and the binding I have set up won't update unless I manually capture the event and update the controls' text property myself.
 
I was under the inpression that Flex would watch for changes and update the binding chain if the getters/setters were set up as in the code below.
 
Thanks again!
- John
 
[Updated Code]
 
package com {
   
    public class DataVO {
        import flash.events.*;
       
        ...


    [Bindable(event="sampleChanged")]
    public function get sample_ac():ArrayCollection
    {
        return _sample_ac;
    }
    public function set sample_ac(value:ArrayCollection):Void
    {
        _sample_ac = value;
        dispatchEvent(new Event("sampleChanged", true, true);
    }
   }
}


From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of JesterXL
Sent: Thursday, November 03, 2005 8:14 AM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] dispatchEvent troubles (Flex 2.0)

Just guessing, but your DataVO doesn't extend EventDispatcher, only Object; try extending him so you'll get all the addEventListener/removeEventListener/dispatchEvent functions.
 
----- Original Message -----
Sent: Wednesday, November 02, 2005 10:41 PM
Subject: [flexcoders] dispatchEvent troubles (Flex 2.0)

I'm having trouble with dispatchEvent in an AS 3.0 Class:

package com {
   
    public class DataVO {
        import flash.events.*;
       
        ...


        [Bindable("sampleChanged")]
    public function get sample_ac():ArrayCollection
    {
        return _sample_ac;
    }
    public function set sample_ac(value:ArrayCollection):Void
    {
        _sample_ac = value;
        var evt:Event = n! ew Event("sampleChanged", true, true);
        dispatchEvent(evt);
    }
   }
}

I get the compile error: Access of undefined property dispatchEvent

Any help would be appreciated. TIA.

- John Crosby


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




Reply via email to