[Mono-bugs] [Bug 80777][Nor] New - Cast of TreeNode workis in MS.NET not on Mono

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Fri Feb 9 17:44:08 EST 2007


Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by levap at bansky.net.

http://bugzilla.ximian.com/show_bug.cgi?id=80777

--- shadow/80777	2007-02-09 17:44:08.000000000 -0500
+++ shadow/80777.tmp.4389	2007-02-09 17:44:08.000000000 -0500
@@ -0,0 +1,59 @@
+Bug#: 80777
+Product: Mono: Class Libraries
+Version: 1.2
+OS: 
+OS Details: Windows XP SP 2 Czech
+Status: NEW   
+Resolution: 
+Severity: 320 Two months
+Priority: Normal
+Component: Windows.Forms
+AssignedTo: toshok at ximian.com                            
+ReportedBy: levap at bansky.net               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: Cast of TreeNode workis in MS.NET not on Mono
+
+Description of Problem:
+
+Following error occurs  "System.InvalidCastException: Cannot cast from
+source type to destination type."  When casting like this 
+
+MyTreeNode node = (MyTreeNode)treeView1.SelectedNode;
+
+MyTreeNode is class derived from Windows.Forms.TreeNode
+
+Application runs without problem on MS.NET and Mono >= 1.2 on Windows. I
+get information that my app. runs without problem on Mac OS X with Mono 1.2.3
+
+Problem seems unreproducable for me - on some easy application.
+
+Complete TraceLog:
+System.InvalidCastException: Cannot cast from source type to destination type.
+  at KobraArchitekt.ToolBoxWindow.SetSelectedCompoent () [0x00000]
+  at KobraArchitekt.ToolBoxWindow.TreeViewComponentsAfterSelect
+(System.Object sender, System.Windows.Forms.TreeViewEven
+tArgs e) [0x00000]
+  at (wrapper delegate-invoke)
+System.MulticastDelegate:invoke_void_object_TreeViewEventArgs
+(object,System.Windows.Form
+s.TreeViewEventArgs)
+  at System.Windows.Forms.TreeView.OnAfterSelect
+(System.Windows.Forms.TreeViewEventArgs e) [0x00000]
+  at System.Windows.Forms.TreeView.set_SelectedNode
+(System.Windows.Forms.TreeNode value) [0x00000]
+  at System.Windows.Forms.TreeView.GotFocusHandler (System.Object sender,
+System.EventArgs e) [0x00000]
+  at (wrapper delegate-invoke)
+System.MulticastDelegate:invoke_void_object_EventArgs (object,System.EventArgs)
+  at System.Windows.Forms.Control.OnGotFocus (System.EventArgs e) [0x00000]
+  at System.Windows.Forms.Control.WndProc (System.Windows.Forms.Message& m)
+[0x00000]
+  at System.Windows.Forms.TreeView.WndProc (System.Windows.Forms.Message&
+m) [0x00000]
+  at System.Windows.Forms.Control+ControlNativeWindow.WndProc
+(System.Windows.Forms.Message& m) [0x00000]
+  at System.Windows.Forms.NativeWindow.WndProc (IntPtr hWnd, Msg msg,
+IntPtr wParam, IntPtr lParam) [0x00000]


More information about the mono-bugs mailing list