Events getting lost?

Topics: CAB & Smart Client Software Factory
May 23, 2007 at 2:31 PM
I have an intermittent problem in a CAB application, and wonder if it may be related to event handling and/or thread execution. This application was created using SC-SF. Here's the situation:

Involved are my ShellForm, a ModuleController and the presenter behind the active SmartPart. The SmartPart is a customer search screen, which presents a list of customers found to the user. When the user selects a customer to work with, two events get published by the presenter. A CustomerSelected event is subscribed by ShellForm, and causes it to update the current customer name in a header panel. This is not a SmartPart in a Workspace, its just a GroupBox with some labels sitting directly on ShellForm. The CustomerDetailRequested event is subscribed to by the ModuleController, which creates a customer detail SmartPart and shows it in the same Workspace as the original search SmartPart. The same ModuleController and default WorkItem are used for both the search and customer detail views.

Both of the event subscriptions are using ThreadOption.UserInterface.

Intermittently, the header update is not occurring in ShellForm. I've not been able to catch this in the debugger, but it does happen a small percentage of the time when running the application.

Does it seem possible that execution in ShellForm is getting interrupted by the ModuleController? Since they are both using the UserInterface thread in their event subscriptions, it makes me suspicious that his could be happening.

Any insights or suggestions would be welcome. Thanksin advance.

Rick Bonnett
rbonnett@unumprovident.com