Index: unk/aux/cocotron/win32/cocotron/cocotron-r710.patch
===================================================================
--- /trunk/aux/cocotron/win32/cocotron/cocotron-r710.patch	(revision 13368)
+++ 	(revision )
@@ -1,167 +1,0 @@
-Index: AppKit/NSPopUpButtonCell.m
-===================================================================
---- AppKit/NSPopUpButtonCell.m	(revision 710)
-+++ AppKit/NSPopUpButtonCell.m	(working copy)
-@@ -18,6 +18,15 @@
- 
- @implementation NSPopUpButtonCell
- 
-+-init {
-+   self = [super init];
-+   _pullsDown = NO;
-+   _menu = [[[NSMenu alloc] init] retain];
-+   _arrowPosition = NSPopUpArrowAtCenter;
-+   _preferredEdge = NSMaxYEdge;
-+   return self;
-+}
-+
- -(void)encodeWithCoder:(NSCoder *)coder {
-    NSUnimplementedMethod();
- }
-@@ -59,7 +68,9 @@
-     [super initTextCell:string];
-     _menu = [[NSMenu alloc] initWithTitle:string];
-     [_menu addItemWithTitle:string action:[self action] keyEquivalent:@""];
--        
-+    _arrowPosition = NSPopUpArrowAtCenter;
-+    _preferredEdge = NSMaxYEdge;
-+
-     [self setPullsDown:pullDown];
-     
-     return self;
-Index: AppKit/NSApplication.m
-===================================================================
---- AppKit/NSApplication.m	(revision 710)
-+++ AppKit/NSApplication.m	(working copy)
-@@ -29,6 +29,7 @@
- #import <AppKit/CGWindow.h>
- #import <AppKit/NSRaise.h>
- #import <objc/message.h>
-+#import <AppKit/NSWindow.h>
- 
- NSString *NSModalPanelRunLoopMode=@"NSModalPanelRunLoopMode";
- NSString *NSEventTrackingRunLoopMode=@"NSEventTrackingRunLoopMode";
-@@ -413,6 +414,11 @@
-        needsUntitled = [_delegate applicationShouldOpenUntitledFile: self];
-    }
- 
-+   if(needsUntitled && _delegate && [_delegate respondsToSelector: @selector(applicationOpenUntitledFile:)]) {
-+     needsUntitled = ![_delegate applicationOpenUntitledFile: self];
-+   }
-+                                                 
-+
-    if(needsUntitled && controller && ![controller documentClassForType:[controller defaultType]]) {
-        needsUntitled = NO;
-    }
-@@ -466,12 +472,18 @@
- }
- 
- -(void)run {
--    
--   NSAutoreleasePool *pool=[NSAutoreleasePool new];
--   [self finishLaunching];
--   [pool release];
-+  static BOOL didlaunch = NO;
-+  NSAutoreleasePool *pool;
-+
-+  _isRunning=YES;
-+
-+  if (!didlaunch) {
-+    didlaunch = YES;
-+    pool=[NSAutoreleasePool new];
-+    [self finishLaunching];
-+    [pool release];
-+  }
-    
--   _isRunning=YES;
-    
-    do {
-        pool = [NSAutoreleasePool new];
-Index: AppKit/NSMenu.subproj/NSMenu.m
-===================================================================
---- AppKit/NSMenu.subproj/NSMenu.m	(revision 710)
-+++ AppKit/NSMenu.subproj/NSMenu.m	(working copy)
-@@ -40,9 +40,10 @@
- }
- 
- -(void)encodeWithCoder:(NSCoder *)coder {
--   [coder encodeObject:_title forKey:@"NSMenu title"];
--   [coder encodeObject:_itemArray forKey:@"NSMenu itemArray"];
--   [coder encodeBool:_autoenablesItems forKey:@"NSMenu autoenablesItems"];
-+   [coder encodeObject:_title forKey:@"NSTitle"];
-+   [coder encodeObject:_name forKey:@"NSName"];
-+   [coder encodeObject:_itemArray forKey:@"NSMenuItems"];
-+   [coder encodeBool:!_autoenablesItems forKey:@"NSNoAutoenable"];
- }
- 
- -initWithCoder:(NSCoder *)coder {
-@@ -221,7 +222,7 @@
- 
- -(void)addItem:(NSMenuItem *)item {
-    [item performSelector:@selector(_setMenu:) withObject:self];
--   [[self mutableArrayValueForKey:@"itemArray"] addObject:item];
-+   [_itemArray addObject:item];
- }
- 
- -(NSMenuItem *)addItemWithTitle:(NSString *)title action:(SEL)action keyEquivalent:(NSString *)keyEquivalent {
-@@ -239,7 +240,7 @@
- 
- -(void)removeItem:(NSMenuItem *)item {
-    [item performSelector:@selector(_setMenu:) withObject:nil];
--   [[self mutableArrayValueForKey:@"itemArray"] removeObjectIdenticalTo:item];
-+   [_itemArray removeObjectIdenticalTo:item];
- }
- 
- -(void)removeItemAtIndex:(int)index {
-@@ -248,7 +249,7 @@
- 
- -(void)insertItem:(NSMenuItem *)item atIndex:(int)index {
-    [item performSelector:@selector(_setMenu:) withObject:self];
--   [[self mutableArrayValueForKey:@"itemArray"] insertObject:item atIndex:index];
-+   [_itemArray insertObject:item atIndex:index];
- }
- 
- -(NSMenuItem *)insertItemWithTitle:(NSString *)title action:(SEL)action keyEquivalent:(NSString *)keyEquivalent atIndex:(int)index {
-Index: AppKit/NSFontManager.m
-===================================================================
---- AppKit/NSFontManager.m	(revision 710)
-+++ AppKit/NSFontManager.m	(working copy)
-@@ -306,7 +306,6 @@
-     return [NSFont fontWithName:[newface name] size:[font pointSize]];
- 
-    NSLog(@"%s failed, %@ %d",sel_getName(_cmd),[font fontName],addTraits);
--   NSUnimplementedMethod();
-    return font;
- }
- 
-Index: AppKit/NSDocument.m
-===================================================================
---- AppKit/NSDocument.m	(revision 710)
-+++ AppKit/NSDocument.m	(working copy)
-@@ -21,6 +21,8 @@
- 
- @implementation NSDocument
- 
-+static int untitled_document_number = 0;
-+
- +(NSArray *)readableTypes {
-    int             i;
-    NSArray        *knownDocTypes = [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleDocumentTypes"];
-@@ -98,7 +100,7 @@
-       _fileURL=nil;
-       _fileType=nil;
-       _changeCount=0;
--      _untitledNumber=0;
-+      _untitledNumber=untitled_document_number++;
-       _hasUndoManager=YES;
-       _activeEditors=[NSMutableArray new];
-     }
-@@ -344,7 +346,7 @@
- {
-   if(_fileURL==nil) 
-     {
--      if(_untitledNumber > 1)
-+      if(_untitledNumber != 0)
-         return [NSString stringWithFormat:@"Untitled %d", _untitledNumber];
-       else
-         return @"Untitled";
Index: /trunk/aux/cocotron/win32/cocotron/cocotron-r718.patch
===================================================================
--- /trunk/aux/cocotron/win32/cocotron/cocotron-r718.patch	(revision 13369)
+++ /trunk/aux/cocotron/win32/cocotron/cocotron-r718.patch	(revision 13369)
@@ -0,0 +1,167 @@
+Index: AppKit/NSPopUpButtonCell.m
+===================================================================
+--- AppKit/NSPopUpButtonCell.m	(revision 718)
++++ AppKit/NSPopUpButtonCell.m	(working copy)
+@@ -18,6 +18,15 @@
+ 
+ @implementation NSPopUpButtonCell
+ 
++-init {
++   self = [super init];
++   _pullsDown = NO;
++   _menu = [[[NSMenu alloc] init] retain];
++   _arrowPosition = NSPopUpArrowAtCenter;
++   _preferredEdge = NSMaxYEdge;
++   return self;
++}
++
+ -(void)encodeWithCoder:(NSCoder *)coder {
+    NSUnimplementedMethod();
+ }
+@@ -59,7 +68,9 @@
+     [super initTextCell:string];
+     _menu = [[NSMenu alloc] initWithTitle:string];
+     [_menu addItemWithTitle:string action:[self action] keyEquivalent:@""];
+-        
++    _arrowPosition = NSPopUpArrowAtCenter;
++    _preferredEdge = NSMaxYEdge;
++
+     [self setPullsDown:pullDown];
+     
+     return self;
+Index: AppKit/NSApplication.m
+===================================================================
+--- AppKit/NSApplication.m	(revision 718)
++++ AppKit/NSApplication.m	(working copy)
+@@ -29,6 +29,7 @@
+ #import <AppKit/CGWindow.h>
+ #import <AppKit/NSRaise.h>
+ #import <objc/message.h>
++#import <AppKit/NSWindow.h>
+ 
+ NSString *NSModalPanelRunLoopMode=@"NSModalPanelRunLoopMode";
+ NSString *NSEventTrackingRunLoopMode=@"NSEventTrackingRunLoopMode";
+@@ -413,6 +414,11 @@
+        needsUntitled = [_delegate applicationShouldOpenUntitledFile: self];
+    }
+ 
++   if(needsUntitled && _delegate && [_delegate respondsToSelector: @selector(applicationOpenUntitledFile:)]) {
++     needsUntitled = ![_delegate applicationOpenUntitledFile: self];
++   }
++                                                 
++
+    if(needsUntitled && controller && ![controller documentClassForType:[controller defaultType]]) {
+        needsUntitled = NO;
+    }
+@@ -466,12 +472,18 @@
+ }
+ 
+ -(void)run {
+-    
+-   NSAutoreleasePool *pool=[NSAutoreleasePool new];
+-   [self finishLaunching];
+-   [pool release];
++  static BOOL didlaunch = NO;
++  NSAutoreleasePool *pool;
++
++  _isRunning=YES;
++
++  if (!didlaunch) {
++    didlaunch = YES;
++    pool=[NSAutoreleasePool new];
++    [self finishLaunching];
++    [pool release];
++  }
+    
+-   _isRunning=YES;
+    
+    do {
+        pool = [NSAutoreleasePool new];
+Index: AppKit/NSMenu.subproj/NSMenu.m
+===================================================================
+--- AppKit/NSMenu.subproj/NSMenu.m	(revision 718)
++++ AppKit/NSMenu.subproj/NSMenu.m	(working copy)
+@@ -40,9 +40,10 @@
+ }
+ 
+ -(void)encodeWithCoder:(NSCoder *)coder {
+-   [coder encodeObject:_title forKey:@"NSMenu title"];
+-   [coder encodeObject:_itemArray forKey:@"NSMenu itemArray"];
+-   [coder encodeBool:_autoenablesItems forKey:@"NSMenu autoenablesItems"];
++   [coder encodeObject:_title forKey:@"NSTitle"];
++   [coder encodeObject:_name forKey:@"NSName"];
++   [coder encodeObject:_itemArray forKey:@"NSMenuItems"];
++   [coder encodeBool:!_autoenablesItems forKey:@"NSNoAutoenable"];
+ }
+ 
+ -initWithCoder:(NSCoder *)coder {
+@@ -221,7 +222,7 @@
+ 
+ -(void)addItem:(NSMenuItem *)item {
+    [item performSelector:@selector(_setMenu:) withObject:self];
+-   [[self mutableArrayValueForKey:@"itemArray"] addObject:item];
++   [_itemArray addObject:item];
+ }
+ 
+ -(NSMenuItem *)addItemWithTitle:(NSString *)title action:(SEL)action keyEquivalent:(NSString *)keyEquivalent {
+@@ -239,7 +240,7 @@
+ 
+ -(void)removeItem:(NSMenuItem *)item {
+    [item performSelector:@selector(_setMenu:) withObject:nil];
+-   [[self mutableArrayValueForKey:@"itemArray"] removeObjectIdenticalTo:item];
++   [_itemArray removeObjectIdenticalTo:item];
+ }
+ 
+ -(void)removeItemAtIndex:(int)index {
+@@ -248,7 +249,7 @@
+ 
+ -(void)insertItem:(NSMenuItem *)item atIndex:(int)index {
+    [item performSelector:@selector(_setMenu:) withObject:self];
+-   [[self mutableArrayValueForKey:@"itemArray"] insertObject:item atIndex:index];
++   [_itemArray insertObject:item atIndex:index];
+ }
+ 
+ -(NSMenuItem *)insertItemWithTitle:(NSString *)title action:(SEL)action keyEquivalent:(NSString *)keyEquivalent atIndex:(int)index {
+Index: AppKit/NSFontManager.m
+===================================================================
+--- AppKit/NSFontManager.m	(revision 718)
++++ AppKit/NSFontManager.m	(working copy)
+@@ -306,7 +306,6 @@
+     return [NSFont fontWithName:[newface name] size:[font pointSize]];
+ 
+    NSLog(@"%s failed, %@ %d",sel_getName(_cmd),[font fontName],addTraits);
+-   NSUnimplementedMethod();
+    return font;
+ }
+ 
+Index: AppKit/NSDocument.m
+===================================================================
+--- AppKit/NSDocument.m	(revision 718)
++++ AppKit/NSDocument.m	(working copy)
+@@ -21,6 +21,8 @@
+ 
+ @implementation NSDocument
+ 
++static int untitled_document_number = 0;
++
+ +(NSArray *)readableTypes {
+    int             i;
+    NSArray        *knownDocTypes = [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleDocumentTypes"];
+@@ -98,7 +100,7 @@
+       _fileURL=nil;
+       _fileType=nil;
+       _changeCount=0;
+-      _untitledNumber=0;
++      _untitledNumber=untitled_document_number++;
+       _hasUndoManager=YES;
+       _activeEditors=[NSMutableArray new];
+     }
+@@ -344,7 +346,7 @@
+ {
+   if(_fileURL==nil) 
+     {
+-      if(_untitledNumber > 1)
++      if(_untitledNumber != 0)
+         return [NSString stringWithFormat:@"Untitled %d", _untitledNumber];
+       else
+         return @"Untitled";
