-
Notifications
You must be signed in to change notification settings - Fork 83
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
copy-paste error? #29
Comments
What exactly is the problem? I still can't spot it g. What this code does is executing the if-clause only the first time you're adding an enter-frame listener. That's for an optimization: a list of objects that the "enterFrame" event is sent to (instead of having to iterate over the complete display tree). |
it's in the removeEventListener() method, but has a "!" ? |
Yeah, but that's fine! Note that in the line above that one, "super removeEventListeners..." is called. So the listener was already removed. The "if" now checks if there is another enter frame listener remaining; if not, that object can be removed from the list. See what I mean? |
in SPDisplayObject.removeEventListenerForType:
The text was updated successfully, but these errors were encountered: