Adding a Trace view from a Module

Topics: CAB & Smart Client Software Factory
Jan 23, 2006 at 2:07 AM
originally posted by: JossB

I'm just getting started with the CAB so my apologies if this is a dumb question.

I have a simple CAB shell application to which I added the TraceTextBox and that worked very well. I then moved this control to a module. The module contains a workitem that requests the TraceTextBox to be displayed within a workspace in the shell application. The module also adds its own TraceSource (so that I now have TraceSources in both the Shell and the Module). I have added switches for the modules TraceSource and all of the Composite UI sources to the App.Config.

The module loads correctly and the control is displayed correctly in the workspace but the tracing information is not captured by the TraceTextBox.

If I move the control back to the shell and place it directly into the workspace from there it captures all the Tracing, including that from my Module.

I realise this is probably nothing to do with the CAB itself, more likely that I've misunderstood a key aspect of the System.Diagnostic services. If anybody can offer any advice I'd really appreciate it.
Jan 25, 2006 at 11:05 AM
originally posted by: matiaswoloski

Hi JossB,

make sure you have the TRACE constant defined in your projects (Project Properties -> Build Tab -> Check "Define TRACE consant")

Jan 25, 2006 at 11:28 PM
originally posted by: JossB

Hi Matias,

Thanks for your reply. I checked all my projects and they did have the constant defined, however, whilst going through I checked out the App.Config again and I think I hadn't set up the listeners correctly. I've modified this now and all seems Ok. Thanks again for your help.