ApplicationModel.st
changeset 786 91d5639d9999
parent 770 86ff2c263a8d
child 787 fced0a358392
equal deleted inserted replaced
785:e7e50d798cfc 786:91d5639d9999
  1358     ]
  1358     ]
  1359 !
  1359 !
  1360 
  1360 
  1361 closeRequest
  1361 closeRequest
  1362     "this is sent by my topView when about to be closed
  1362     "this is sent by my topView when about to be closed
  1363      by the program (not by the windowManager).
  1363      by the windowManager.
  1364      Could be redefined in subclasses to suppress close or confirm."
  1364      Could be redefined in subclasses to suppress close or confirm."
  1365 
  1365 
  1366     self closeDownViews
  1366     |sav|
       
  1367 
       
  1368     masterApplication notNil ifTrue:[
       
  1369 
       
  1370         "/ temporary clear my masterApplication to prevent
       
  1371         "/ endless recursion, in case the master sends me
       
  1372         "/ a closeRequest (although, it is supposed to
       
  1373         "/ send me a closeDownViews ...)
       
  1374 
       
  1375         sav := masterApplication.
       
  1376         masterApplication := nil.
       
  1377         masterApplication closeRequestFor:(self window).
       
  1378 
       
  1379         "/ restore - in case master did not want me to close ...
       
  1380         masterApplication := sav.
       
  1381     ] ifFalse:[
       
  1382         self closeDownViews
       
  1383     ].
  1367 
  1384 
  1368     "Modified: 4.3.1997 / 00:48:15 / cg"
  1385     "Modified: 4.3.1997 / 00:48:15 / cg"
  1369 !
  1386 !
  1370 
  1387 
  1371 closeRequestFor:aTopView
  1388 closeRequestFor:aTopView
  1372     "this is sent by any of my topViews when about to be closed by the
  1389     "this is sent by any of my topViews when about to be closed by the
  1373      windowmanager. For backward compatibility with single-view applications,
  1390      windowmanager. For backward compatibility with single-view applications,
  1374      this is forwarded here to a simple (non topView-specific) closeRequest.
  1391      this is forwarded here to a simple (non topView-specific) closeRequest,
       
  1392      effectively closing all of my views.
  1375      MultiView applications should redefine this method if closing of individual
  1393      MultiView applications should redefine this method if closing of individual
  1376      views closing is to be caught."
  1394      views closing is to be caught and/or should not close all of them."
  1377 
  1395 
  1378     ^ self closeRequest
  1396     |sav|
       
  1397 
       
  1398     masterApplication notNil ifTrue:[
       
  1399 
       
  1400         "/ temporary clear my masterApplication to prevent
       
  1401         "/ endless recursion, in case the master sends me
       
  1402         "/ a closeRequest (although, it is supposed to
       
  1403         "/ send me a closeDownViews ...)
       
  1404 
       
  1405         sav := masterApplication.
       
  1406         masterApplication := nil.
       
  1407         masterApplication closeRequestFor:(self window).
       
  1408 
       
  1409         "/ restore - in case master did not want me to close ...
       
  1410         masterApplication := sav.
       
  1411     ] ifFalse:[
       
  1412         self closeRequest
       
  1413     ]
  1379 !
  1414 !
  1380 
  1415 
  1381 open
  1416 open
  1382     "open a standard interface"
  1417     "open a standard interface"
  1383 
  1418 
  1566 ! !
  1601 ! !
  1567 
  1602 
  1568 !ApplicationModel class methodsFor:'documentation'!
  1603 !ApplicationModel class methodsFor:'documentation'!
  1569 
  1604 
  1570 version
  1605 version
  1571     ^ '$Header: /cvs/stx/stx/libview2/ApplicationModel.st,v 1.67 1998-01-25 18:47:45 cg Exp $'
  1606     ^ '$Header: /cvs/stx/stx/libview2/ApplicationModel.st,v 1.68 1998-01-29 09:49:13 ca Exp $'
  1572 ! !
  1607 ! !
  1573 ApplicationModel initialize!
  1608 ApplicationModel initialize!