[Mono-bugs] [Bug 82618][Nor] Changed - FolderBrowserDialog: ArgumentNullException creating folder in new folder

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Wed Aug 29 07:48:10 EDT 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 andyhume32 at yahoo.co.uk.


--- shadow/82618	2007-08-28 15:49:18.000000000 -0400
+++ shadow/82618.tmp.31247	2007-08-29 07:48:10.000000000 -0400
@@ -2,13 +2,13 @@
 Product: Mono: Class Libraries
 Version: 1.2
 OS: All
 OS Details: 
 Status: NEW   
+Severity: Unknown
 Priority: Normal
 Component: Windows.Forms
 AssignedTo: gert.driesen at pandora.be                            
 ReportedBy: gert.driesen at pandora.be               
 QAContact: mono-bugs at ximian.com
 TargetMilestone: ---
@@ -181,6 +181,67 @@
   at MainForm.Main () [0x00000]
 ------- Additional Comments From gert.driesen at pandora.be  2007-08-28 15:49 -------
 Created an attachment (id=19912)
+------- Additional Comments From andyhume32 at yahoo.co.uk  2007-08-29 07:48 -------
+In summary, a fix to this is to set also the Tag property at line 
+438 in FolderBrowserDialog.cs, resulting in:
+   new_node.Tag = new_node.RealPath = fullPath;
+Tested only on Win32.
+It's unclear what the various properties on FBTreeNode (Text, Tag, 
+RealPath) and FSEntry (Name, FullName, RealName) are used for, 
+however printf-debugging shows the following for FBTreeNode:
+Node-- Text: 'Desktop',
+        Tag: 'Desktop://',
+   RealPath: 'D:\Documents and Settings\alan\Desktop'
+Node-- Text: 'Personal',
+        Tag: 'Personal://',
+   RealPath: 'D:\Documents and Settings\alan\My Documents'
+Node-- Text: 'My Computer',
+        Tag: 'MyComputer://',
+   RealPath: 'MyComputer://'
+Node-- Text: 'My Network',
+        Tag: 'MyNetwork://',
+   RealPath: 'MyNetwork://'
+Node-- Text: 'Dsktop-D',
+        Tag: 'D:\Documents and Settings\alan\Desktop\Dsktop-D',
+   RealPath: 'D:\Documents and Settings\alan\Desktop\Dsktop-D'
+Node-- Text: 'foo',
+        Tag: 'D:\Documents and Settings\alan\Desktop\foo',
+   RealPath: 'D:\Documents and Settings\alan\Desktop\foo'
+Node-- Text: 'Unused Desktop Shortcuts',
+        Tag: 'D:\Documents and Settings\alan\Desktop\Unused Desktop 
+   RealPath: 'D:\Documents and Settings\alan\Desktop\Unused Desktop 
+Node-- Text: 'foo',
+        Tag: 'D:\Documents and Settings\alan\Desktop\foo',
+   RealPath: 'D:\Documents and Settings\alan\Desktop\foo'
+Node-- Text: 'New Folder',
+        Tag: '',
+   RealPath: 'D:\Documents and Settings\alan\Desktop\foo\New Folder'
+So for a 'normal' folder, Tag is equal to RealPath.
+(((This can be seen by code inspection also.  FillNode has:
+  FBTreeNode child = new FBTreeNode (fsentry.Name);
+  child.Tag = fsentry.FullName;
+  child.RealPath = fsentry.RealName == null ? fsentry.FullName : 
+  child.ImageIndex = NodeImageIndex (fsentry.FullName);
+So RealPath is FSEntry.FullName, unless FSEntry.RealName is set.
+And FileSystem has: 
+  FSEntry GetDirectoryFSEntry (DirectoryInfo dirinfo,...)
+  {...
+      fsEntry.FullName = dirinfo.FullName;
+  ...}
+With no setting of RealName there.  It is only set with the creation 
+of special-folders in UnixFileSystem/WinFileSystem..ctor)).

More information about the mono-bugs mailing list