Module Specific menu

Topics: CAB & Smart Client Software Factory
Mar 29, 2006 at 4:56 AM
originally posted by: toy187

Hi everybody! We are currently writing an application using the CAB. It is our first time doing so and so far we are finding it great but the learning curve is pretty steep.

Our application has an Outlook look and feel. We have a sidebar to the left like in Outlook and we want to load our modules (workitems) once we click on the entry in the sidebar. Every one of these workitems has it's own specific menu that gets created once it is selected. As it is right now our menu entries are removed automatically when we load a new workitem, the problem comes when we reload a module that was previously loaded, our commandhandler is called twice (or thrice if we have loaded the module 3 times, 4 if loaded 4 times and so on).

We terminate our workitems when we unload them, and execute their run method when we load them. In our terminate method we've tried removing the invokers, disposing the commands, removing the menu entry, and we always get the same result. Is it not possible to do what we want to do or are we doing something incorrectly? I am assuming (and hoping) it's the latter. Any help on this would be greatly appreciated.
Mar 29, 2006 at 9:45 AM
originally posted by: toy187

I have found that adding the CommandHandler to my presenter instead of in my workitem fixes the problem.