Re: [flexcoders] Script timeout binding selection in Tree

2010-05-18 Thread Richard Rodseth
I think I already mentioned it was called twice. I can double-check tomorrow. On Mon, May 17, 2010 at 9:35 PM, Alex Harui aha...@adobe.com wrote: Set a breakpoint on setSelectionDataLoop. See how often it gets called. On 5/17/10 4:49 PM, Richard Rodseth rrods...@gmail.com wrote:

Re: [flexcoders] Script timeout binding selection in Tree

2010-05-18 Thread Richard Rodseth
Two or three times. Then I get the spinning beach ball. On Mon, May 17, 2010 at 11:12 PM, Richard Rodseth rrods...@gmail.comwrote: I think I already mentioned it was called twice. I can double-check tomorrow. On Mon, May 17, 2010 at 9:35 PM, Alex Harui aha...@adobe.com wrote: Set a

Re: [flexcoders] Script timeout binding selection in Tree

2010-05-18 Thread Alex Harui
If that’s true, on the second invocation, step through it. It might be hung up in moveNext() not advancing to the next item, maybe because you’ve run out of items. On 5/17/10 11:12 PM, Richard Rodseth rrods...@gmail.com wrote: I think I already mentioned it was called twice. I can

Re: [flexcoders] Script timeout binding selection in Tree

2010-05-18 Thread Richard Rodseth
That sounds about right. moveNext() does appear in the stack sometimes, and I am changing the data provider contents. I may have to put the restoreselection code somewhere other than in a collection change handler. On Tue, May 18, 2010 at 9:16 AM, Alex Harui aha...@adobe.com wrote: If

Re: [flexcoders] Script timeout binding selection in Tree

2010-05-18 Thread Richard Rodseth
I've attempted to create a one-file test case, and while it doesn't exhibit the script timeout, the selection restoration does not work as part of the collection listener. Is it significant that selectedItems does not show up in code completion while selectedIndices does? ?xml version=1.0

Re: [flexcoders] Script timeout binding selection in Tree

2010-05-18 Thread Richard Rodseth
My bad (at least in this example). The selectedItems getter is incorrect. On Tue, May 18, 2010 at 12:15 PM, Richard Rodseth rrods...@gmail.comwrote: I've attempted to create a one-file test case, and while it doesn't exhibit the script timeout, the selection restoration does not work as part

Re: [flexcoders] Script timeout binding selection in Tree

2010-05-18 Thread Richard Rodseth
Here's a corrected test case, where only the persistent uids are stored, and selectedItems is computed. The Restore Selection button works, the collection event listener doesn't. It would be great if someone could give this a whirl and confirm what I see. Not sure how this relates to the script

Re: [flexcoders] Script timeout binding selection in Tree

2010-05-18 Thread Oleg Sivokon
Erm... I just went to try it and... ouch, how do you compile that with SDK 4.X?

Re: [flexcoders] Script timeout binding selection in Tree

2010-05-18 Thread Oleg Sivokon
If I rewrite it to SDK 4 (it's basically the same tree anyway), the collection event listener is called... well, I cannot see anything extraordinary in what it does to be honest.

Re: [flexcoders] Script timeout binding selection in Tree

2010-05-18 Thread Richard Rodseth
Thanks for testing. At this point, I consider this a bug, that the tree does not display its selection, when it is updated via binding of selectedItems, where the property bound to is updated in response to a RESET of the data provider collection. My workaround might interest some people. It is

[flexcoders] Script timeout binding selection in Tree

2010-05-17 Thread Richard Rodseth
I'm getting the following error: Error: Error #1502: A script has executed for longer than the default timeout period of 15 seconds. at ?() at

Re: [flexcoders] Script timeout binding selection in Tree

2010-05-17 Thread Oleg Sivokon
First of I'd remove all the bindings, because binding may be silencing errors ans than may be running in loop not knowing what to update first. I also think that you only copied the top of the error stack trace, could you tell if there was something looking like recursion, i.e. you would see

Re: [flexcoders] Script timeout binding selection in Tree

2010-05-17 Thread Richard Rodseth
Thanks. Without the binding the timeout does not occur, since that's what causes the rather complex method ListBase.setSelectionDataLoop to be called. I suspect that it might have to do with looking for a selected object that is not part of the data provider collection, but that's only a temporary

Re: [flexcoders] Script timeout binding selection in Tree

2010-05-17 Thread Richard Rodseth
I'm still stumped by this. Wish I had more information to add. The use case is that the user is navigating (via a button and a bookmarking mechanism I built) to a different screen, resulting in a) a change of active tab b) a refresh of the tree in that tab via asynchronous API call c) selection of

Re: [flexcoders] Script timeout binding selection in Tree

2010-05-17 Thread Oleg Sivokon
I wish I could help more... well here's another guess: - if you are using XML / XMLList, and have used insertBefore / isertAfter from the same XML / XMLList, then it is a known bug. - if you dispatch collectionChange on your own you might have messed something in the event's properties, which then

Re: [flexcoders] Script timeout binding selection in Tree

2010-05-17 Thread Richard Rodseth
Thanks for trying. No, the presentation model has an array collection whose .source gets changed after an HTTPService call returns (although I should mention that I am using my mock service layer at the moment). I added a a collection change listener to the collection reference. I have set a

Re: [flexcoders] Script timeout binding selection in Tree

2010-05-17 Thread Alex Harui
Set a breakpoint on setSelectionDataLoop. See how often it gets called. On 5/17/10 4:49 PM, Richard Rodseth rrods...@gmail.com wrote: Thanks for trying. No, the presentation model has an array collection whose .source gets changed after an HTTPService call returns (although I should