Comment #2 on issue 198 by atdi...@gmail.com: Remove property code
constants, add firePropertyChange(String, T, T) methods
http://code.google.com/p/piccolo2d/issues/detail?id=198
I feel uneasy about this...
Say I have a 1000 nodes at depth 100. (Say, a tall parent-child chain of a
100 nodes and the bottom node has 1000 children.)
Now suppose I modify the 1000 children. Say I animate their
offset/transform. Say the animation goes through 200 steps.
In the current version of Piccolo the parent node will get 0 events but
with your proposal, now the parent gets 1000 * 200 events.
The performance of firing isn't costly, but clients will now see any event
handlers fired unless each of their event handlers checks the source of the
event to make sure it is just from the parent node.
That seems like quite a burden on the client, and quite a change in Piccolo
behavior even for a major release.
The current default behavior is to not fire up the parent chain (seemingly
desirable default behavior) unless you explicitly use
setPropertyChangeParentMask.
Is my reasoning correct?
--
Piccolo2D Developers Group: http://groups.google.com/group/piccolo2d-dev?hl=en