Hi Michael –
Yes, we do force a re-draw at the end of
expandTree() to account for the newly added or removed rows so that is what
probably triggered your update.
As for whether going through the
dataDescriptor calls updateDisplayList() – it depends. If you go through
the descriptor to perform actions that result in CollectionEvents being
emitted, then re-drawing, re-measuring and invalidation is possible. For
example, if you use the descriptor to add or remove items using the addChildAt()/removeChildAt()
API, a full validation pass and re-draw will occur because those actions
trigger ADD, UPDATE, and REMOVE CollectionEvents. ITreeDataDescriptor methods
like getChildren(), hasChildren() etc, will normally not emit any
CollectionEvents so no invalidation occurs.
As for the bug you cited regarding scrolling
during the tween, I see it and I’ll file a bug internally. Scrolling
should actually be disabled during the tween (for example, you’ll see that’s
the case when dropping down a ComboBox dropdown) and I think the app can get
into a funky state if we interrupt the tween mid-animation because we actually
suspend then resume background processing while the tween animates.
Good eye – thanks for the comments,
deepa
From:
[email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Michael Schmalle
Sent: Wednesday, August 23, 2006
12:24 PM
To: [email protected]
Subject: Re: [flexcomponents] Re:
Extending Tree :: Using itemRenderer, kills tween
Hey deepa,
Yeah, I figured as much, I have studied the Tree and List and ListBase for
awhile.
The only thing I can think of was I was calling expandTree(), I think that
was what was triggering the update.
My logic last week was fouled, I rewrote some things and it is working to my
specs for now.
When you set something in a dataDescriptor that shouldn't call updateDisplayList()
right? I don't see anything that call any collection event.
I love the Tree though, there is a lot that can be done with extending it.
Peace, Mike
PS, I found a bug in it that is not a good one. I am looking into a work around
right now.
If you expand a tree iten and the tween is ahppening, if you scroll or use the
mouse wheel at the same time it is tweeing, there are a bunch of whitespace
rows that show up and it messes up the whole tree.
The only way to remedy is to restart the app, which is not good. ;-)
On 8/23/06, Deepa
Subramaniam <[EMAIL PROTECTED]com
> wrote:
Hi Michael –
Glad you found a
workaround. An addition to your tween ending list is that anything that causes
an updateDisplayList() call to be invoked mid-tween will end the tween.
You can see the logic in Tree.updateDisplayList().
-deepa
Ok,
Not to answer my own question but, for those that use this as an archive, I'm
better off not even asking.. I will eventually figure it out.
The problem was I was listening for a dataChange event in the item renderer. I
was trying to simulate a creationComplete event in the item renderer as a quasi
initialize queue for the renderer getting recycled.
Well, it didn't work right and it was somehow invalidating the tree to stomp
out the tree's tween.
The way I fixed it? Well, I reversed my logic and say that a client has to
specifically set toggleVisible in the CheckBoxTree in the dataProvider to start
off with.
This got rid of the listening for dataChange event and erased the call to
setToggled() I was making to the dataProvider.
I suspect that the dataProvider was getting a refresh event or something and
that was tripping up the Tree at the same time I was making the tween fire.
Anyway to busy to get too the actual root of it but, by far it doesn't seem to
be a bug in the Tree, just a weird insane timing issue.
Peace, Mike
On 8/17/06, Michael
Schmalle <teoti.graphix@gmail.com>
wrote:
Hi,
I have looked high an low through the Tree class for this answer and just don't
understand.
Anybody know the reasons why a Tree tween gets cut other than;
- isOpening == true
- duration 0
- row count stuff
- row length > 20
?
Could an invalidateSize() be invalidating something from the item renderer
that is killing the tween? I am using the standard xml dp from the examples(so
it is not large) no branch is larger than 3.
Once I take this line out of my class;
itemRenderer = new ClassFactory(CheckBoxItemRenderer);
The tree tween fine again.
No matter the internals of the extension in the tree, the disclosure icon won't
even open it. What I am saying is there is NO connection to any of the extended
capabilities of the tree to the disclosure icon.
Peace, Mike
--
What goes up, does come down.
--
What goes up, does come down.
--
What goes up, does come down.
__._,_.___
SPONSORED LINKS
YAHOO! GROUPS LINKS
__,_._,___
|