? Gui
? Gui.gsdoc
? NSDocument.init.diff
Index: NSDocument.m
===================================================================
RCS file: /cvsroot/gnustep/gnustep/core/gui/Source/NSDocument.m,v
retrieving revision 1.16
diff -u -r1.16 NSDocument.m
--- NSDocument.m	21 Jul 2003 11:59:47 -0000	1.16
+++ NSDocument.m	27 Jul 2003 11:18:40 -0000
@@ -63,15 +63,20 @@
 - (id) init
 {
   static int untitledCount = 1;
+  NSArray *fileTypes;
   
   self = [super init];
   if (self != nil)
     {
       _documentIndex = untitledCount++;
       _windowControllers = [[NSMutableArray alloc] init];
+      fileTypes = [[self class] readableTypes];
 
       /* Set our default type */
-      [self setFileType: [[[self class] writableTypes] objectAtIndex: 0]];
+      if ([fileTypes count])
+       { 
+         [self setFileType: [fileTypes objectAtIndex: 0]];
+       }
     }
   return self;
 }
