Hi Alex,
I showed the setter for "editedName" which dispatches "editedNameChanged".
Similarly, the setter for "role" dispatches "roleChanged".
My understanding is that a getter ("name") in this case, can have multiple
[Bindable] declarations as in my example.
On Wed, Dec 23, 2009 at 11:43 AM, Alex Harui <[email protected]> wrote:
>
>
> I don’t see the bindable events getting dispatched.
>
>
>
> Alex Harui
>
> Flex SDK Developer
>
> Adobe Systems Inc. <http://www.adobe.com/>
>
> Blog: http://blogs.adobe.com/aharui
>
>
>
> *From:* [email protected] [mailto:[email protected]] *On
> Behalf Of *Richard Rodseth
> *Sent:* Wednesday, December 23, 2009 11:39 AM
> *To:* [email protected]
> *Subject:* [flexcoders] DataGrid vs custom getter
>
>
>
>
>
> I have a DataGrid column which is not updating when the relevant property
> is changed, *unless* I have a custom itemrenderer, which I no longer have
> any other need for.
>
> The data provider contains objects with the following properties:
>
> [Bindable(event="editedNameChanged")]
> [Bindable(event="roleChanged")]
> public function get name():String {
> if (_editedName) {
> return _editedName;
> } else {
> return role.name;
> }
> }
>
> public function set editedName(value:String):void {
> _editedName = value;
> dispatchEvent(new Event("editedNameChanged"));
> }
>
> If I use an itemrenderer containing a
> <mx:Label text="{data.name}"/>
> the column updates correctly when editedName is changed, but if I just set
> the grid column dataField to "name", the name does not update when
> editedName is changed.
> Something silly I'm forgetting?
>
>
>