ChildWorkItems - Deactivation - RTW - Bug?

Topics: CAB & Smart Client Software Factory
Nov 18, 2005 at 1:57 AM
originally posted by: dfanning

I have a shell application that has a menu that launches new workItems into a new windows form ().
When I close the newly dislpayd form the workItem deactivates. However it doesn't seem to remove itself from the parent workItem's workItems collection even when I force a deactivate of the child workItem
If I then try to launch the same child workItem again, an oject disposed exception is raised.

I remeber a similar issue with the Previews and CTP but thought this had been fixed. Is it still a bug?

Do childWorkItems tell their parent workItem when they have been deactivated and does this remove the childWorkItem from the parents workItems collection?


Nov 18, 2005 at 6:04 AM
originally posted by: DLorenz

If you deactivate a workitem, it shouldn't remove it from the collection. It gets removed only if you Terminate the workitem. Closing a smartpart just makes the workitem lose focus and deactivate. You probably need to terminate the workitem the smartpart lives on during the Closing event of it.