I have an application with 2 views. One view is the form and the other is the result after submitting the form. I am subscribing to the team viewer in both views using WDPortalEventing. The problem occurs when the second view loads it's wdInit() is run before the wdExit() on the first view. I am subscribing to events in the wdInit() and unsubscribing in the wdExit(). This is causing a race condition which causes the event to be unsubscribed in the second view.
Is there any other way to do this? or anyway to ensure the the init and exit methods are called in an expected order?