You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thank for the great class. I am unable to remove the scrolling list from the stage without generating an event recursion error in the TouchListItemRenderer destroy() function. The error is thrown when the textfield is removed from the list.
I fixed the issue by changing the listener for the destroy() function. As written, the TouchListItemRenderer class listens for the EVENT.REMOVE event. This event bubbles into children like the textfield, so that the remove event fires once for the list item and again for any children of the list item, generating the error.
I changed this
public function TouchListItemRenderer(){
addEventListener(Event.REMOVED, destroy);
}
to this:
public function TouchListItemRenderer() {
addEventListener(Event.REMOVED_FROM_STAGE, destroy);
}
and made the error and problem go away. It's not trivial in that events floating around after their object has been removed can and do cause problems in apps.
The text was updated successfully, but these errors were encountered:
Thank for the great class. I am unable to remove the scrolling list from the stage without generating an event recursion error in the TouchListItemRenderer destroy() function. The error is thrown when the textfield is removed from the list.
I fixed the issue by changing the listener for the destroy() function. As written, the TouchListItemRenderer class listens for the EVENT.REMOVE event. This event bubbles into children like the textfield, so that the remove event fires once for the list item and again for any children of the list item, generating the error.
I changed this
public function TouchListItemRenderer(){
addEventListener(Event.REMOVED, destroy);
}
to this:
public function TouchListItemRenderer() {
addEventListener(Event.REMOVED_FROM_STAGE, destroy);
}
and made the error and problem go away. It's not trivial in that events floating around after their object has been removed can and do cause problems in apps.
The text was updated successfully, but these errors were encountered: