Is there an index in an object for all the generated handlers in an object?
If there would be I could just define a handler listening on the visible
attribute of a top level object.
Then traverse down the containment hierachy (subviews) and disable all
the handlers.
Like this.
<MyTopLevelClassAKATreeNode>
<handler name="onvisible" args="visible">
var handlers =
aFunctionReturningAllHandlersFromThisNodeAndAllSubnodes();
for(...) {
if (visible) handlers[i].enable()
else handlers[i].disable()
}
</handler>
</MyTopLevelClassAKATreeNode>
Would something like this be possible?
- rami
On 11.3.2010 19:56, P T Withington wrote:
What platform are you compiling to? I recall there is a Flash player
bug that bit G.ho.st that had something like what you describe.
But also, I have to wonder if something with 100's of sub-menus
doesn't need a different approach. I wonder how a human navigates such
a large space.
On Mar 10, 2010, at 17:48, Rami Ojares <[email protected]> wrote:
Hi,
I have a tree structure (branches and leaves).
All of them react to various mouse events (mouseover, mousedown,
mousetrackover etc.)
I have implemented a mechanism where I initially load/construct only
the first level of nodes.
Everything works fine and with good performance.
When I keep opening branches (some of which have over hundred
subnodes) the mouse event performance starts to choke.
So I thought that whenever a node is not visible I disable all the
delegates handling the mouse events.
No effect.
Then I tried unregistering the delegates when the node is not visible.
No effect.
Then I tried to set the clickable attribute to false for all the
views that react to mouse events.
No effect.
Any suggestions?
- rami