@@ -375,7 +375,6 @@ - (void)setClickObject:(id)value {
375
375
@synthesize iconCritical ;
376
376
@synthesize buttonPrototype ;
377
377
@synthesize wordAlert ;
378
- @synthesize documentWindow ;
379
378
380
379
@synthesize isVisible ;
381
380
@synthesize nDone ;
@@ -1433,7 +1432,7 @@ - (void)setButton1IfNeeded {
1433
1432
}
1434
1433
}
1435
1434
1436
- - (void )prepareAsSheetOnWindow: (NSWindow *)docWindow {
1435
+ - (void )prepareAsSheetOnWindow: (NSWindow *)sheetParent {
1437
1436
[self setButton1IfNeeded ] ;
1438
1437
1439
1438
/* Button1 target and action should always be set by setButton1Title: */
@@ -1451,7 +1450,7 @@ - (void)prepareAsSheetOnWindow:(NSWindow*)docWindow {
1451
1450
[[NSNotificationCenter defaultCenter ] addObserver: self
1452
1451
selector: @selector (parentWindowWillClose: )
1453
1452
name: NSWindowWillCloseNotification
1454
- object: docWindow ] ;
1453
+ object: sheetParent ] ;
1455
1454
1456
1455
[self doooLayout ] ;
1457
1456
@@ -1460,8 +1459,6 @@ - (void)prepareAsSheetOnWindow:(NSWindow*)docWindow {
1460
1459
}
1461
1460
1462
1461
[self setIsDoingModalDialog: YES ] ;
1463
-
1464
- [self setDocumentWindow: docWindow] ;
1465
1462
}
1466
1463
1467
1464
- (void )parentWindowWillClose: (NSNotification *)note {
@@ -1478,11 +1475,11 @@ - (void)runModalSheetOnWindow:(NSWindow*)docWindow
1478
1475
}
1479
1476
}
1480
1477
1481
- - (void )runModalSheetOnWindow: (NSWindow *)docWindow
1478
+ - (void )runModalSheetOnWindow: (NSWindow *)sheetParent
1482
1479
modalDelegate: (id )modalDelegate
1483
1480
didEndSelector: (SEL )didEndSelector
1484
1481
contextInfo: (void *)contextInfo {
1485
- if (docWindow ) {
1482
+ if (sheetParent ) {
1486
1483
NSAssert (((modalDelegate != nil ) == (didEndSelector != nil )), @"222 modalDelegate vs. didEndSelector inconsistency.") ;
1487
1484
if (!modalDelegate) {
1488
1485
modalDelegate = self ;
@@ -1492,9 +1489,9 @@ - (void)runModalSheetOnWindow:(NSWindow*)docWindow
1492
1489
didEndSelector = @selector (sheetDidEnd:returnCode:contextInfo: ) ;
1493
1490
}
1494
1491
1495
- [self prepareAsSheetOnWindow: docWindow ];
1492
+ [self prepareAsSheetOnWindow: sheetParent ];
1496
1493
1497
- [docWindow beginSheet: [self window ]
1494
+ [sheetParent beginSheet: [self window ]
1498
1495
completionHandler: ^void (NSModalResponse modalResponse) {
1499
1496
NSWindow * window = [self window ] ;
1500
1497
NSInvocation * invocation = [NSInvocation invocationWithTarget: modalDelegate
@@ -2122,8 +2119,6 @@ - (void)goAway {
2122
2119
object: self .window.sheetParent] ;
2123
2120
}
2124
2121
2125
- [self setDocumentWindow: nil ] ;
2126
-
2127
2122
if (self.window ) {
2128
2123
[self .window.sheetParent endSheet: self .window
2129
2124
returnCode: [self alertReturn ]] ;
@@ -2377,7 +2372,7 @@ - (void)alertError:(NSError*)error
2377
2372
}
2378
2373
2379
2374
- (void )alertError: (NSError *)error
2380
- onWindow: (NSWindow *)documentWindow_
2375
+ onWindow: (NSWindow *)sheetParent
2381
2376
modalDelegate: (id )modalDelegate
2382
2377
didEndSelector: (SEL )didEndSelector
2383
2378
contextInfo: (void *)contextInfo {
@@ -2405,7 +2400,7 @@ - (void)alertError:(NSError*)error
2405
2400
didEndSelector = @selector (errorSheetDidEnd:returnCode:contextInfo: ) ;
2406
2401
}
2407
2402
2408
- [self runModalSheetOnWindow: documentWindow_
2403
+ [self runModalSheetOnWindow: sheetParent
2409
2404
modalDelegate: modalDelegate
2410
2405
didEndSelector: didEndSelector
2411
2406
contextInfo: contextInfo] ;
@@ -2472,7 +2467,7 @@ + (SSYAlertRecovery)alertError:(NSError*)error {
2472
2467
}
2473
2468
2474
2469
+ (void )alertError: (NSError *)error
2475
- onWindow: (NSWindow *)documentWindow_
2470
+ onWindow: (NSWindow *)sheetParent
2476
2471
modalDelegate: (id )modalDelegate
2477
2472
didEndSelector: (SEL )didEndSelector
2478
2473
contextInfo: (void *)contextInfo {
@@ -2481,7 +2476,7 @@ + (void)alertError:(NSError*)error
2481
2476
SSYAlert* alert = [SSYAlert alert ] ;
2482
2477
2483
2478
[alert alertError: error
2484
- onWindow: documentWindow_
2479
+ onWindow: sheetParent
2485
2480
modalDelegate: modalDelegate
2486
2481
didEndSelector: didEndSelector
2487
2482
contextInfo: contextInfo] ;
@@ -2570,7 +2565,6 @@ - (void)dealloc {
2570
2565
[iconCritical release ] ;
2571
2566
[buttonPrototype release ] ;
2572
2567
[wordAlert release ] ;
2573
- [documentWindow release ] ;
2574
2568
[otherSubviews release ] ;
2575
2569
[clickTarget release ] ;
2576
2570
[clickObject release ] ;
0 commit comments