2340 this is forwarded here to a simple (non topView-specific) closeRequest, |
2344 this is forwarded here to a simple (non topView-specific) closeRequest, |
2341 effectively closing all of my views. |
2345 effectively closing all of my views. |
2342 MultiView applications should redefine this method if closing of individual |
2346 MultiView applications should redefine this method if closing of individual |
2343 views closing is to be caught and/or should not close all of them." |
2347 views closing is to be caught and/or should not close all of them." |
2344 |
2348 |
2345 |sav| |
2349 |sav myWindow| |
|
2350 |
|
2351 myWindow := self window. |
2346 |
2352 |
2347 "/ In multiView apps, tell my master. |
2353 "/ In multiView apps, tell my master. |
2348 "/ (but not if I am a modal reincarnation) |
2354 "/ (but not if I am a modal reincarnation) |
2349 (masterApplication notNil |
2355 (masterApplication notNil |
2350 and:[self window topView isModal not]) ifTrue:[ |
2356 and:[myWindow topView isModal not]) ifTrue:[ |
2351 |
2357 |
2352 "/ temporary clear my masterApplication to prevent |
2358 "/ temporary clear my masterApplication to prevent |
2353 "/ endless recursion, in case the master sends me |
2359 "/ endless recursion, in case the master sends me |
2354 "/ a closeRequest (although, it is supposed to |
2360 "/ a closeRequest (although, it is supposed to |
2355 "/ send me a closeDownViews ...) |
2361 "/ send me a closeDownViews ...) |
2356 |
2362 |
2357 sav := masterApplication. |
2363 sav := masterApplication. |
2358 masterApplication := nil. |
2364 masterApplication := nil. |
2359 sav closeRequestFor:(self window). |
2365 aTopView isSlave ifTrue:[ |
|
2366 sav closeRequestFor:aTopView. |
|
2367 ] ifFalse:[ |
|
2368 sav closeRequestFor:myWindow. |
|
2369 ]. |
2360 |
2370 |
2361 "/ restore - in case master did not want me to close ... |
2371 "/ restore - in case master did not want me to close ... |
2362 masterApplication := sav. |
2372 masterApplication := sav. |
2363 ] ifFalse:[ |
2373 ] ifFalse:[ |
2364 self closeRequest |
2374 ((aTopView == myWindow) or:[aTopView isSlave not]) ifTrue:[ |
|
2375 self closeRequest |
|
2376 ] ifFalse:[ |
|
2377 aTopView application closeRequest. |
|
2378 ] |
2365 ] |
2379 ] |
2366 ! |
2380 ! |
2367 |
2381 |
2368 doAccept |
2382 doAccept |
2369 "this is invoked by the Return-Key (if returnIsOK) or |
2383 "this is invoked by the Return-Key (if returnIsOK) or |