Atsushi Eno | 7 Sep 2010 05:20

kill deprecated InstallTrackingHandler on OSX Dnd

 Hello,

Yesterday I wrote a simple winforms app on osx and it crashed at startup
due to use of deprecated and already vanished API in Snow Leopard,
InstallTrackingHandler, on Dnd (static .ctor).

So, lots of winforms apps (or everything) won't work on osx anymore
unless we eliminate it. Dropping a feature is not good but it should be
done for everything else.

Attached such a (simple) workaround. Feel free to apply, or in case no
one cares, I'll do it.

Atsushi Eno

diff --git a/mcs/class/Managed.Windows.Forms/System.Windows.Forms.CarbonInternal/Dnd.cs b/mcs/class/Managed.Windows.Forms/System.Windows.Forms.CarbonInternal/Dnd.cs
index 24e6bb9..3e48c20 100644
--- a/mcs/class/Managed.Windows.Forms/System.Windows.Forms.CarbonInternal/Dnd.cs
+++ b/mcs/class/Managed.Windows.Forms/System.Windows.Forms.CarbonInternal/Dnd.cs
 <at>  <at>  -50,7 +50,7  <at>  <at>  namespace System.Windows.Forms.CarbonInternal {
 		private static DragTrackingDelegate DragTrackingHandler = new DragTrackingDelegate (TrackingCallback);

 		static Dnd () {
-			InstallTrackingHandler (DragTrackingHandler, IntPtr.Zero, IntPtr.Zero);
+			//InstallTrackingHandler (DragTrackingHandler, IntPtr.Zero, IntPtr.Zero);
 		}

 		internal Dnd () {
_______________________________________________
Mono-winforms-list maillist  -  Mono-winforms-list <at> lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-winforms-list

Gmane