dotgnu-general
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[DotGNU]Re: Nim game doesn't work right with current cvs


From: Mohan Embar
Subject: [DotGNU]Re: Nim game doesn't work right with current cvs
Date: Fri, 05 Mar 2004 02:25:16 -0600

Hi Norbert,

>After hearing from someone on irc that the Nim game doesn't work
>correctly with pnet 0.6.2 (it worked ok with pnet 0.6.0) I've just
>tried it with current cvs.
>
>There seem to be at least two problems:
>
>1) The third row of pegs isn't displayed.  Instead there is a big gap
>   between the first and second row, and also the buttons at the
>   bottom are too big.
>
>2) When exiting the game I get an exception:
>
>address@hidden:~> ilrun pnet/dotgnu-nim/nim.exe
>Uncaught exception: Xsharp.XInvalidOperationException: The widget has been 
>destroyed
>...

Based on your obeservations, I've fixed my DotGNU Portable Nim game
to work with current CVS. You can download it here:

http://www.thisiscool.com/dotgnu-nim-20040305.tar.gz

I also updated the README - three of the five issues I had since my
original release for 0.6.0 have been remedied with what's in CVS.
Go team!

As for the crash-on-exit problem, I was able to make it disappear with the
following patch. I'll leave it to Rhys or whomever to decide how well-founded
it is. (Hmm. Now I'm wondering whether something similar is needed for Win32
as I haven't tested on Win32....)

Thanks again for the great work.

-- Mohan
http://www.thisiscool.com/
http://www.animalsong.org/

Index: Xsharp/Drawable.cs
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnetlib/Xsharp/Drawable.cs,v
retrieving revision 1.5
diff -u -2 -r1.5 Drawable.cs
--- Xsharp/Drawable.cs  4 Feb 2004 07:27:07 -0000       1.5
+++ Xsharp/Drawable.cs  5 Mar 2004 08:14:21 -0000
@@ -158,4 +158,12 @@
                                }
                        }
+                       
+               internal bool IsValidHandle
+               {
+                       get
+                       {
+                               return handle != XDrawable.Zero;
+                       }
+               }
 
        /// <summary>
Index: Xsharp/InputOutputWidget.cs
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnetlib/Xsharp/InputOutputWidget.cs,v
retrieving revision 1.9
diff -u -2 -r1.9 InputOutputWidget.cs
--- Xsharp/InputOutputWidget.cs 4 Feb 2004 07:27:07 -0000       1.9
+++ Xsharp/InputOutputWidget.cs 5 Mar 2004 08:14:22 -0000
@@ -477,5 +477,5 @@
                                {
                                        // No point redrawing if we are 
unmapped.
-                                       if(mapped && AncestorsMapped)
+                                       if(IsValidHandle && mapped && 
AncestorsMapped)
                                        {
                                                ClearRegion(region, XBool.True);






reply via email to

[Prev in Thread] Current Thread [Next in Thread]