[flexcoders] Re: Repeater not repeating
--- In flexcoders@yahoogroups.com, Jonathan Branam [EMAIL PROTECTED] wrote: How would you do that, exactly? How could your extended ArrayCollection know the Array had changed? It's just not possible. Extend Array as well...?
Re: [flexcoders] Re: Repeater not repeating
And what would be the point of that? You can use an ArrayCollection as a substitute for Array in just about any situation and it will take care of the problem. If he could swap the original Array for a different class, just swap it for ArrayCollection and be done. That's what I would recommend anyway. If you extend Array to dispatch events on changes then you just wrote ArrayCollection again. It would support the methods on Array that aren't on ArrayCollection. This is assuming you can override the [] access using the flash_proxy methods, but I'm not sure if that works Array isn't a subclass of Proxy but it overrides their behavior. I'm not sure if you can do this or if its just magic (ie Flash internals)? On Fri, Jun 27, 2008 at 2:37 PM, Amy [EMAIL PROTECTED] wrote: --- In flexcoders@yahoogroups.com, Jonathan Branam [EMAIL PROTECTED] wrote: How would you do that, exactly? How could your extended ArrayCollection know the Array had changed? It's just not possible. Extend Array as well...? -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups Links
[flexcoders] Re: Repeater not repeating
--- In flexcoders@yahoogroups.com, Tom McNeer [EMAIL PROTECTED] wrote: I need to have a repeater iterate over an array, displaying an instance of a custom component for each iteration. However, for testing, I am simply attempting to output a button with a static label within the repeater. Here's the basic code on the repeater: mx:ArrayCollection id=configAC source={estimate.configArray}/ mx:VBox width=100% id=configDisplay mx:Repeater dataProvider={configAC} id=configRepeater mx:Button label=D'oh / /mx:Repeater /mx:VBox Setting a breakpoint after the array is populated, I can see that: a) the original array (estimate.configArray) is populated with a single member, a custom ActionScript object. Length is 1, there is an object of the correct type at position 0. b) the array collection with the original array as source (configAC) shows the same contents. c) the dataprovider on the repeater, which is the array collection, shows the correction contents, an AC with a length of 1. d) the currentItem in the repeater shows the correct object from the AC. Yet the contents of the repeater, which should just be a simple button, do not display. I'm mystified. So I must be missing something simple. If I were in your place, I'd make a temporary event handler for repeatStart, then put a breakpoint there and step through the code, inspecting every variable that seems relevant. HTH; Amy