# HG changeset patch # User Jens Alfke # Date 1208535910 25200 # Node ID 2d492d8c20530aff1ec379b3153e9d34cc4e277d # Parent c9f2e0c7359a6b46eee21604edf87dcd5d68c302 Added -reopenWith:. diff -r c9f2e0c7359a -r 2d492d8c2053 UniqueWindowController.h --- a/UniqueWindowController.h Tue Apr 15 18:02:40 2008 -0700 +++ b/UniqueWindowController.h Fri Apr 18 09:25:10 2008 -0700 @@ -16,6 +16,8 @@ + (BOOL) isModel: (id)model1 equalToModel: (id)model2; +- (void) reopenWith: (id)model; + @end diff -r c9f2e0c7359a -r 2d492d8c2053 UniqueWindowController.m --- a/UniqueWindowController.m Tue Apr 15 18:02:40 2008 -0700 +++ b/UniqueWindowController.m Fri Apr 18 09:25:10 2008 -0700 @@ -36,12 +36,20 @@ if( ! w ) { w = [[self alloc] initWith: model]; [w showWindow: self]; + } else { + if( model != w.model ) + [w reopenWith: model]; } [w.window makeKeyAndOrderFront: self]; return w; } +- (void) reopenWith: (id)model +{ +} + + - (void) windowWillClose: (NSNotification*)n { [self autorelease];