[Mono-list] The System.Windows.Forms build breakage

François-Denis Gonthier fgonthier@hermes.usherb.ca
Sun, 24 Nov 2002 19:03:29 -0500


This is a multi-part message in MIME format.

------=_NextPart_000_0016_01C293EC.2CBE7740
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: 7bit

Here a patch.  I tried it with Dennis Hayes Visual Studio solution and with
Linux.

----- Original Message -----
From: "Martin Baulig" <martin@gnome.org>
To: <mono-hackers-list@ximian.com>
Cc: <mono-list@ximian.com>
Sent: Sunday, November 24, 2002 4:10 PM
Subject: [Mono-list] The System.Windows.Forms build breakage


> Hi,
>
> today I fixed a couple of mcs bugs which causes it to reject the invalid
code in
> System.Windows.Forms.  When trying to build it with the latest mcs, you'll
get
>
> ====
> System.Windows.Forms/NativeWindow.cs(69) error CS0117:
`System.Windows.Forms.Win32' does not contain a definition for `WNDCLASS'
> System.Windows.Forms/NativeWindow.cs(193) error CS0117:
`System.Windows.Forms.Win32' does not contain a definition for `WM_CREATE'
> System.Windows.Forms/NativeWindow.cs(222) error CS0117:
`System.Windows.Forms.Win32' does not contain a definition for `WM_CREATE'
> System.Windows.Forms/NativeWindow.cs(226) error CS0117:
`System.Windows.Forms.Win32' does not contain a definition for `WM_CREATE'
> System.Windows.Forms/Menu.cs(157) error CS0029: Cannot convert implicitly
from `int' to `uint'
> System.Windows.Forms/Menu.cs(159) error CS0122: `MenuID' is inaccessible
because of its protection level
> Compilation failed: 6 error(s), 0 warnings
> ====
>
> For the moment, either use an older mcs to compile it or wait until the
code in
> System.Windows.Forms has been fixed.
>
> On Windows, I get the same errors, so it's not a mcs bug:
>
> ====
> $ NAnt
> Buildfile:
\\townsville\martin\monocvs\mcs\class\System.Windows.Forms\System.Windows.Fo
rms.build
>
> build:
>       [csc] Compiling 341 files to
\\townsville\martin\monocvs\mcs\class\lib\System.Windows.Forms.dll
>
\\townsville\martin\monocvs\mcs\class\System.Windows.Forms\System.Windows.Fo
rms\CheckedListBox.cs(469,16): warning CS0108: The keyword new is required
on 'System.Windows.Forms.CheckedListBox.ObjectCollection' because it hides
inherited member 'System.Windows.Forms.ListBox.ObjectCollection'
>
\\townsville\martin\monocvs\mcs\class\System.Windows.Forms\System.Windows.Fo
rms\ListBox.cs(574,16): (Location of symbol related to previous warning)
>
\\townsville\martin\monocvs\mcs\class\System.Windows.Forms\System.Windows.Fo
rms\NativeWindow.cs(69,11): error CS0234: The type or namespace name
'WNDCLASS' does not exist in the class or namespace
'System.Windows.Forms.Win32' (are you missing an assembly reference?)
>
\\townsville\martin\monocvs\mcs\class\System.Windows.Forms\System.Windows.Fo
rms\NativeWindow.cs(71,5): error CS0246: The type or namespace name
'wndClass' could not be found (are you missing a using directive or an
assembly reference?)
>
\\townsville\martin\monocvs\mcs\class\System.Windows.Forms\System.Windows.Fo
rms\NativeWindow.cs(74,5): error CS0246: The type or namespace name
'wndClass' could not be found (are you missing a using directive or an
assembly reference?)
>
\\townsville\martin\monocvs\mcs\class\System.Windows.Forms\System.Windows.Fo
rms\NativeWindow.cs(75,5): error CS0246: The type or namespace name
'wndClass' could not be found (are you missing a using directive or an
assembly reference?)
>
\\townsville\martin\monocvs\mcs\class\System.Windows.Forms\System.Windows.Fo
rms\NativeWindow.cs(76,5): error CS0246: The type or namespace name
'wndClass' could not be found (are you missing a using directive or an
assembly reference?)
>
\\townsville\martin\monocvs\mcs\class\System.Windows.Forms\System.Windows.Fo
rms\NativeWindow.cs(77,5): error CS0246: The type or namespace name
'wndClass' could not be found (are you missing a using directive or an
assembly reference?)
>
\\townsville\martin\monocvs\mcs\class\System.Windows.Forms\System.Windows.Fo
rms\NativeWindow.cs(78,5): error CS0246: The type or namespace name
'wndClass' could not be found (are you missing a using directive or an
assembly reference?)
>
\\townsville\martin\monocvs\mcs\class\System.Windows.Forms\System.Windows.Fo
rms\NativeWindow.cs(79,5): error CS0246: The type or namespace name
'wndClass' could not be found (are you missing a using directive or an
assembly reference?)
>
\\townsville\martin\monocvs\mcs\class\System.Windows.Forms\System.Windows.Fo
rms\NativeWindow.cs(80,5): error CS0246: The type or namespace name
'wndClass' could not be found (are you missing a using directive or an
assembly reference?)
>
\\townsville\martin\monocvs\mcs\class\System.Windows.Forms\System.Windows.Fo
rms\NativeWindow.cs(81,5): error CS0246: The type or namespace name
'wndClass' could not be found (are you missing a using directive or an
assembly reference?)
>
\\townsville\martin\monocvs\mcs\class\System.Windows.Forms\System.Windows.Fo
rms\NativeWindow.cs(82,5): error CS0246: The type or namespace name
'wndClass' could not be found (are you missing a using directive or an
assembly reference?)
>
\\townsville\martin\monocvs\mcs\class\System.Windows.Forms\System.Windows.Fo
rms\NativeWindow.cs(84,30): error CS0103: The
> name 'wndClass' does not exist in the class or namespace
'System.Windows.Forms.NativeWindow'
>
\\townsville\martin\monocvs\mcs\class\System.Windows.Forms\System.Windows.Fo
rms\NativeWindow.cs(193,17): error CS0117: 'System.Windows.Forms.Win32' does
not contain a definition for 'WM_CREATE'
>
\\townsville\martin\monocvs\mcs\class\System.Windows.Forms\System.Windows.Fo
rms\NativeWindow.cs(222,15): error CS0117: 'System.Windows.Forms.Win32' does
not contain a definition for 'WM_CREATE'
>
\\townsville\martin\monocvs\mcs\class\System.Windows.Forms\System.Windows.Fo
rms\NativeWindow.cs(226,15): error CS0117: 'System.Windows.Forms.Win32' does
not contain a definition for 'WM_CREATE'
>
\\townsville\martin\monocvs\mcs\class\System.Windows.Forms\System.Windows.Fo
rms\Menu.cs(157,18): error CS0029: Cannot implicitly convert type 'int' to
'uint'
>
\\townsville\martin\monocvs\mcs\class\System.Windows.Forms\System.Windows.Fo
rms\Menu.cs(159,18): error CS0122: 'System.Windows.Forms.MenuItem.MenuID' is
inaccessible due to its protection level
>
>
> BUILD FAILED
>
\\townsville\martin\monocvs\mcs\class\System.Windows.Forms\System.Windows.Fo
rms.build:-1: Program error, see build log for details.
> Program error, see build log for details.
> Try `NAnt -help' for more information.
> =====
>
> --
> Martin Baulig
> martin@gnome.org
>
>
> _______________________________________________
> Mono-list maillist  -  Mono-list@ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-list

------=_NextPart_000_0016_01C293EC.2CBE7740
Content-Type: application/octet-stream;
	name="swf.diff"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment;
	filename="swf.diff"

? swf.diff=0A=
? class/Mono.Data.SybaseClient/.makefrag=0A=
? class/Mono.Data.SybaseClient/.response=0A=
? class/Mono.Data.SybaseClient/library-deps.stamp=0A=
? class/Mono.Data.Tds/.makefrag=0A=
? class/Mono.Data.Tds/.response=0A=
? class/Mono.Data.Tds/library-deps.stamp=0A=
? class/System.Windows.Forms/System.Windows.Forms/bin=0A=
? class/System.Windows.Forms/System.Windows.Forms/obj=0A=
? class/System.Windows.Forms/System.Windows.Forms.Design/bin=0A=
? class/System.Windows.Forms/System.Windows.Forms.Design/obj=0A=
Index: class/System.Windows.Forms/list.unix=0A=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0A=
RCS file: /mono/mcs/class/System.Windows.Forms/list.unix,v=0A=
retrieving revision 1.4=0A=
diff -u -r1.4 list.unix=0A=
--- class/System.Windows.Forms/list.unix	18 Nov 2002 07:05:57 -0000	1.4=0A=
+++ class/System.Windows.Forms/list.unix	25 Nov 2002 00:01:18 -0000=0A=
@@ -1,3 +1,9 @@=0A=
+System.Windows.Forms/win32Enums.cs=0A=
+System.Windows.Forms/win32Handles.cs=0A=
+System.Windows.Forms/win32Interfaces.cs=0A=
+System.Windows.Forms/win32RegistryUtil.cs=0A=
+System.Windows.Forms/win32Structs.cs=0A=
+System.Windows.Forms/win32functions.cs=0A=
 System.Resources/ResXResourceReader.cs=0A=
 System.Resources/ResXResourceWriter.cs=0A=
 System.Windows.Forms/AccessibleEvents.cs=0A=
@@ -314,12 +320,6 @@=0A=
 System.Windows.Forms/UserControl.cs=0A=
 System.Windows.Forms/View.cs=0A=
 System.Windows.Forms/VScrollBar.cs=0A=
-System.Windows.Forms/win32Enums.cs=0A=
-System.Windows.Forms/win32Handles.cs=0A=
-System.Windows.Forms/win32Interfaces.cs=0A=
-System.Windows.Forms/win32RegistryUtil.cs=0A=
-System.Windows.Forms/win32Structs.cs=0A=
-System.Windows.Forms/win32functions.cs=0A=
 System.Windows.Forms.Design/AnchorEditor.cs=0A=
 System.Windows.Forms.Design/AssemblyInfo.cs=0A=
 System.Windows.Forms.Design/AxImporter.cs=0A=
Index: class/System.Windows.Forms/System.Windows.Forms/Menu.cs=0A=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0A=
RCS file: =
/mono/mcs/class/System.Windows.Forms/System.Windows.Forms/Menu.cs,v=0A=
retrieving revision 1.17=0A=
diff -u -r1.17 Menu.cs=0A=
--- class/System.Windows.Forms/System.Windows.Forms/Menu.cs	24 Nov 2002 =
04:31:26 -0000	1.17=0A=
+++ class/System.Windows.Forms/System.Windows.Forms/Menu.cs	25 Nov 2002 =
00:01:20 -0000=0A=
@@ -154,9 +154,9 @@=0A=
 			// FIXME: Pay attention, do not assign an id to a "stranger"=0A=
 			// If reusing IDs, get one from array first=0A=
 			if ( mi.MenuID_ =3D=3D INVALID_MENU_ID) {=0A=
-				mi.MenuID_ =3D MenuIDs_++;=0A=
+				mi.MenuID_ =3D (uint) MenuIDs_++;=0A=
 			}=0A=
-			return  (uint)mi.MenuID;=0A=
+			return  (uint) mi.MenuID_;=0A=
 		}=0A=
 =0A=
 		//inherited=0A=
Index: class/System.Windows.Forms/System.Windows.Forms/NativeWindow.cs=0A=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0A=
RCS file: =
/mono/mcs/class/System.Windows.Forms/System.Windows.Forms/NativeWindow.cs=
,v=0A=
retrieving revision 1.10=0A=
diff -u -r1.10 NativeWindow.cs=0A=
--- class/System.Windows.Forms/System.Windows.Forms/NativeWindow.cs	24 =
Nov 2002 04:31:26 -0000	1.10=0A=
+++ class/System.Windows.Forms/System.Windows.Forms/NativeWindow.cs	25 =
Nov 2002 00:01:21 -0000=0A=
@@ -66,11 +66,11 @@=0A=
 =0A=
 			if (!registeredClass) {=0A=
 				Win32.WndProc wp =3D new Win32.WndProc (WndProc);=0A=
-				Win32.WNDCLASS wndClass =3D new Win32.WNDCLASS();=0A=
+				WNDCLASS wndClass =3D new WNDCLASS();=0A=
 =0A=
-				wndClass.style =3D (int) (Win32.CS_OWNDC |=0A=
-							Win32.CS_VREDRAW |=0A=
-							Win32.CS_HREDRAW);=0A=
+				wndClass.style =3D (int) (CS_.CS_OWNDC |=0A=
+							CS_.CS_VREDRAW |=0A=
+							CS_.CS_HREDRAW);=0A=
 				wndClass.lpfnWndProc =3D wp;=0A=
 				wndClass.cbClsExtra =3D 0;=0A=
 				wndClass.cbWndExtra =3D 0;=0A=
@@ -81,7 +81,7 @@=0A=
 				wndClass.lpszMenuName =3D "";=0A=
 				wndClass.lpszClassName =3D "mono_native_window";=0A=
 =0A=
-				if (Win32.RegisterClassA(wndClass) !=3D 0) {=0A=
+				if (Win32.RegisterClassA(ref wndClass) !=3D 0) {=0A=
 					registeredClass =3D true;=0A=
 				} else {=0A=
 					windowHandle =3D (IntPtr)0;=0A=
@@ -190,7 +190,7 @@=0A=
 =0A=
 		protected virtual void WndProc (ref Message m) =0A=
 		{=0A=
-			if (m.Msg =3D=3D Win32.WM_CREATE)=0A=
+			if (m.Msg =3D=3D (int) Msg.WM_CREATE)=0A=
 				Console.WriteLine ("NW WndProc WM_CREATE");=0A=
 			DefWndProc (ref m);=0A=
 		}=0A=
@@ -219,11 +219,11 @@=0A=
 			message.LParam =3D lParam;=0A=
  			message.Result =3D (IntPtr) 0;=0A=
 =0A=
-			if (msg =3D=3D Win32.WM_CREATE)=0A=
+			if (msg =3D=3D (int) Msg.WM_CREATE)=0A=
 				Console.WriteLine ("WM_CREATE (static)");=0A=
 =0A=
  			if (window !=3D null) {=0A=
-			if (msg =3D=3D Win32.WM_CREATE)=0A=
+			if (msg =3D=3D (int) Msg.WM_CREATE)=0A=
 				Console.WriteLine ("WM_CREATE (static !=3D null)");=0A=
  				window.WndProc(ref message);=0A=
  			} else {=0A=
Index: =
class/System.Windows.Forms/System.Windows.Forms/System.Windows.Forms.cspr=
oj=0A=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0A=
RCS file: =
/mono/mcs/class/System.Windows.Forms/System.Windows.Forms/System.Windows.=
Forms.csproj,v=0A=
retrieving revision 1.7=0A=
diff -u -r1.7 System.Windows.Forms.csproj=0A=
--- =
class/System.Windows.Forms/System.Windows.Forms/System.Windows.Forms.cspr=
oj	18 Nov 2002 04:46:33 -0000	1.7=0A=
+++ =
class/System.Windows.Forms/System.Windows.Forms/System.Windows.Forms.cspr=
oj	25 Nov 2002 00:01:26 -0000=0A=
@@ -92,6 +92,11 @@=0A=
                     AssemblyName =3D "System.Drawing.Design"
                     HintPath =3D =
"..\..\..\..\..\WINNT\Microsoft.NET\Framework\v1.0.3705\System.Drawing.De=
sign.dll"
                 />
+                <Reference
+                    Name =3D "System.Windows.Forms.Design"
+                    Project =3D =
"{A38C110F-63F4-4B53-A67E-9A46681C768E}"
+                    Package =3D =
"{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}"
+                />
             </References>
         </Build>
         <Files>
@@ -1213,11 +1218,6 @@=0A=
                 />
                 <File
                     RelPath =3D "PropertySort.cs"
-                    SubType =3D "Code"
-                    BuildAction =3D "Compile"
-                />
-                <File
-                    RelPath =3D "PropertyTab.cs"
                     SubType =3D "Code"
                     BuildAction =3D "Compile"
                 />

------=_NextPart_000_0016_01C293EC.2CBE7740--