[Mono-osx] Bug (?), WinForms unresponsive behavior
Geoff Norton
gnorton at novell.com
Tue Jun 3 11:37:35 EDT 2008
Winforms on OSX is supposed to work. If the same code works on windows,
please file a bug.
Thanks
-g
On Tue, 2008-06-03 at 17:31 +0200, Fredrik Kling wrote:
> Hi,
>
> First post to the list, very new MAC user, this might be completely
> known to everybody..
> However, the following (attached) small C# program does not work as
> expected, it basically freezes directly and becomes unresponsive
> directly after startup... It works in Windows using Mono and MS
> framework..
> I have searched the internet quite heavy trying to find some hints,
> but in vain...
>
> Using Mono 1.9.1...
>
> I have attached the code for a small program that illustrates the
> problem..
> But basically, I create a Form from within another class which
> overrides some of the events for the form, in this class I have a
> function for force an update of the drawing area, basically
> Invalidate, DoEvents, Update.. Outside this class I loop
> indefinitely, calling the update function each iteration and
> processing events manually..
>
> I do not use "Application.Run()"..
>
> Main loop looks like:
> ----
> WinFormsTest disp = new WinFormsTest(); // inherited
> class with Background painting set to false...
> disp.Initialize();
> while(!
> disp.KeyPressed((int)System.Windows.Forms.Keys.Escape))
> {
> disp.Update(null);
> Thread.Sleep(10);
> Application.DoEvents();
> }
> -----
> And the "Update" looks like:
> -------
> refresh.Reset();
> window.Invalidate();
> window.Update(); //This is not a recursive call!
> if (bWaitForRefresh)
> {
> refresh.WaitOne(); // Event set by the OnPaint member when
> finished
> }
> --------
> Anybody knows what could be the reason?
> Is WinForms on OS X supposed to work?
>
> Best Regards,
> Fredrik Kling
>
> _______________________________________________
> Mono-osx mailing list
> Mono-osx at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-osx
More information about the Mono-osx
mailing list