[flexcoders] Re: Filter an ArrayCollection into an ItemRender

2008-07-22 Thread luis_roman_am
Thanks, Scott. Taking this way, i have another doubt. How can i refer (inside a item renderer) to the data.Url inherited from the dataprovider in the main application (index.mxml)? --- In flexcoders@yahoogroups.com, Scott Bachman [EMAIL PROTECTED] wrote: The syntax you tried is e4x (ECMAscript

Re: [flexcoders] Re: Filter an ArrayCollection into an ItemRender

2008-07-22 Thread Scott Bachman
I'm not sure I understand your question. You can certainly refer to data.Url inside the item renderer. If you mean using a filterFunction with data.Url, you would have to apply it inside you're item renderer and most likely make a copy of your original ArrayCollection in each itemRenderer to apply

[flexcoders] Re: Filter an ArrayCollection into an ItemRender

2008-07-22 Thread luis_roman_am
Lets try to add more info. Theres a TileList with a ItemRenderer. The ItemRenderer code is: mx:Script ![CDATA[ import mx.core.Application; import mx.collections.ArrayCollection; [Bindable] private var

Re: [flexcoders] Re: Filter an ArrayCollection into an ItemRender

2008-07-22 Thread Scott Bachman
You need to call collectionData.refresh() when the data property changes for the itemRenderer. One way to do it would be: mx:Binding source=data destination=dataChanged/ then add the method: private function dataChanged(data:Object):void { collectionData.refresh(); } Hopefully that does

[flexcoders] Re: Filter an ArrayCollection into an ItemRender

2008-07-22 Thread Amy
--- In flexcoders@yahoogroups.com, luis_roman_am [EMAIL PROTECTED] wrote: Lets try to add more info. Theres a TileList with a ItemRenderer. The ItemRenderer code is: mx:Script ![CDATA[ import mx.core.Application; import mx.collections.ArrayCollection;

Re: [flexcoders] Re: Filter an ArrayCollection into an ItemRender

2008-07-22 Thread Troy Gilbert
You need to call collectionData.refresh() when the data property changes for the itemRenderer. One way to do it would be: I always wonder what's the best practice for this. I would think that collections would have this built into them... why would one want to put a filter function on a

RE: [flexcoders] Re: Filter an ArrayCollection into an ItemRender

2008-07-22 Thread Alex Harui
Gilbert Sent: Tuesday, July 22, 2008 11:49 AM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Re: Filter an ArrayCollection into an ItemRender You need to call collectionData.refresh() when the data property changes for the itemRenderer. One way to do it would be: I always wonder

Re: [flexcoders] Re: Filter an ArrayCollection into an ItemRender

2008-07-22 Thread Scott Bachman
Oops... I misread the source code. Actually, in the one place where I had used it it was bound to an implicit setter, like this: private function set dataChanged(data:Object):void { collectionData.refresh(); } On Tue, Jul 22, 2008 at 2:48 PM, Troy Gilbert [EMAIL PROTECTED] wrote: You need

Re: [flexcoders] Re: Filter an ArrayCollection into an ItemRender

2008-07-22 Thread Scott Bachman
22, 2008 11:49 AM *To:* flexcoders@yahoogroups.com *Subject:* Re: [flexcoders] Re: Filter an ArrayCollection into an ItemRender You need to call collectionData.refresh() when the data property changes for the itemRenderer. One way to do it would be: I always wonder what's the best

Re: [flexcoders] Re: Filter an ArrayCollection into an ItemRender

2008-07-22 Thread Troy Gilbert
In theory, if you have [Bindable] or [Managed] items in the collection, or call itemUpdated appropriately, you do not need to call refresh() again when an item's properties change. I was wondering about the binding of the ArrayCollection itself, not the elements it contains (which works as