ApplicationModel.st
changeset 1279 60b6e72fc942
parent 1264 a87315936e38
child 1286 48113f78950c
equal deleted inserted replaced
1278:0fc24ae3a3e3 1279:60b6e72fc942
   575 
   575 
   576     ^ (self onDevice:aDevice) open
   576     ^ (self onDevice:aDevice) open
   577 
   577 
   578     "
   578     "
   579      Launcher openOnDevice:Display
   579      Launcher openOnDevice:Display
       
   580     "
       
   581 
       
   582     "Modified: 13.1.1997 / 20:55:27 / cg"
       
   583 !
       
   584 
       
   585 openOnXScreenNamed:aScreenName
       
   586     "create an instance of the application and open its view
       
   587      on some X display screen. The argument aScreenName must be 
       
   588      a valid x-display name (i.e. of the form '<host>:<screenNr>' as in 'foo:0').
       
   589      For more info, read the document on multiple display
       
   590      support and the documentation of the DeviceWorkstation class."
       
   591 
       
   592     |newDevice someScreen|
       
   593 
       
   594     newDevice := XWorkstation new.
       
   595     newDevice := newDevice initializeFor:aScreenName.
       
   596     newDevice isNil ifTrue:[
       
   597         self warn:('Could not open display: ' , aScreenName).
       
   598         ^ nil.
       
   599     ].
       
   600     newDevice startDispatch.
       
   601     (someScreen := Screen current) isNil ifTrue:[
       
   602         someScreen := Screen default.
       
   603     ].
       
   604     someScreen notNil ifTrue:[
       
   605         newDevice keyboardMap:(someScreen keyboardMap).
       
   606         newDevice buttonTranslation:(someScreen buttonTranslation).
       
   607     ].
       
   608     "/ arrange for it to finish its event dispatch loop, 
       
   609     "/ when the last view on it is closed.
       
   610     newDevice exitOnLastClose:true.
       
   611 
       
   612     ^ (self onDevice:newDevice) open
       
   613 
       
   614     "
       
   615      Launcher openOnXScreenNamed:'sgi:0'
   580     "
   616     "
   581 
   617 
   582     "Modified: 13.1.1997 / 20:55:27 / cg"
   618     "Modified: 13.1.1997 / 20:55:27 / cg"
   583 !
   619 !
   584 
   620 
  2206 ! !
  2242 ! !
  2207 
  2243 
  2208 !ApplicationModel class methodsFor:'documentation'!
  2244 !ApplicationModel class methodsFor:'documentation'!
  2209 
  2245 
  2210 version
  2246 version
  2211     ^ '$Header: /cvs/stx/stx/libview2/ApplicationModel.st,v 1.118 1999-11-03 08:49:32 ca Exp $'
  2247     ^ '$Header: /cvs/stx/stx/libview2/ApplicationModel.st,v 1.119 1999-12-03 14:36:40 cg Exp $'
  2212 ! !
  2248 ! !
  2213 ApplicationModel initialize!
  2249 ApplicationModel initialize!