https://bugzilla.novell.com/show_bug.cgi?id=430477
User [EMAIL PROTECTED] added comment https://bugzilla.novell.com/show_bug.cgi?id=430477#c7 --- Comment #7 from Steve Odbc <[EMAIL PROTECTED]> 2008-09-30 01:25:26 MDT --- Uhm, forget my code, since I looked into DefaultTraceListener.cs where everything is available already. There is MessageBox code (including Robert's idea of always using the main thread), but it does not work usually due to the AssertUiEnabled flag, that by default seems to be off (is this the same behaviour as MS?). If the default trace listener is added with this flag on, things work in MONO. Example code: DefaultTraceListener d = new DefaultTraceListener(); d.AssertUiEnabled = true; Debug.Listeners.Add(d); By the way: while I had a look at your code I found something that might be of interest. There are some definitions in TraceListener.cs that use the ThreadStatic attribute. As far as I know, ThreadStaticAttribute works only with static fields, so your code won't work (there should be a compiler warning for this issue): [ThreadStatic] private int indentLevel = 0; [ThreadStatic] private int indentSize = 4; #if NET_2_0 [ThreadStatic] private StringDictionary attributes = new StringDictionary (); [ThreadStatic] private TraceFilter filter; [ThreadStatic] private TraceOptions options; #endif Use: private static int indentLevel = 0; .. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA contact for the bug. You are the assignee for the bug. _______________________________________________ mono-bugs maillist - [email protected] http://lists.ximian.com/mailman/listinfo/mono-bugs
