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
When calling swiz.teardown(), prototype beans that have event handlers get constructed. Attached is a sample application to demonstrate the problem.
It's happening in EventHandlerProcessor.as on line 114. When trying to remove event handlers, it calls bean.source which has a getter with logic to setup the bean if it is not set up yet.
While I don't believe you should be calling teardown() directly, it does look like this would affect most of the processors. Possible fix in BeanFactory:
Jeffrey Barrus added a comment - 14/Nov/11 4:54 PM
I found the problem because I am trying to do some integration testing and I really need to teardown everything between tests. I know the AutowiredTestCase uses a swiz instance as the event dispatcher rather than the top level application but I have created a FlexUnit Rule instead of using the AutowiredTestCase and I am using the top level application as the dispatcher. Is there a better way for me to tear down everything? When does swiz.teardown() get called normally?
The text was updated successfully, but these errors were encountered:
I also ran into this with Prototypes that have [Inject] tags in a project using Modules (where the Module Swiz teardowns are quite common, since we load and unload the modules frequently).
Migrated from SWIZ-66
When calling swiz.teardown(), prototype beans that have event handlers get constructed. Attached is a sample application to demonstrate the problem.
It's happening in EventHandlerProcessor.as on line 114. When trying to remove event handlers, it calls bean.source which has a getter with logic to setup the bean if it is not set up yet.
From @brian428
While I don't believe you should be calling teardown() directly, it does look like this would affect most of the processors. Possible fix in BeanFactory:
Jeffrey Barrus added a comment - 14/Nov/11 4:54 PM
I found the problem because I am trying to do some integration testing and I really need to teardown everything between tests. I know the AutowiredTestCase uses a swiz instance as the event dispatcher rather than the top level application but I have created a FlexUnit Rule instead of using the AutowiredTestCase and I am using the top level application as the dispatcher. Is there a better way for me to tear down everything? When does swiz.teardown() get called normally?
The text was updated successfully, but these errors were encountered: