HTMLUtilities.st
changeset 2458 8c1955020123
parent 2442 db061ff41012
child 2464 ebff59707514
equal deleted inserted replaced
2457:42caf9f4ce85 2458:8c1955020123
    43 ! !
    43 ! !
    44 
    44 
    45 !HTMLUtilities class methodsFor:'common actions'!
    45 !HTMLUtilities class methodsFor:'common actions'!
    46 
    46 
    47 openLauncherOnDisplay:displayName
    47 openLauncherOnDisplay:displayName
    48     |display errorString app wsClass|
    48     <resource: #obsolete>
    49 
    49 
    50     wsClass := Smalltalk classNamed:#XWorkstation.
    50     "obsolete - do not use"
    51     wsClass isNil ifTrue:[
    51 
    52         ^ 'XWorkstation has not been loaded' 
    52     self obsoleteMethodWarning.
    53     ].        
    53     Error handle:[:ex |
    54 
    54         ^ ex description
    55     [
    55     ] do:[
    56         display := wsClass newDispatchingFor:displayName.
    56         NewLauncher openLauncherOnInitializedDisplayNamed:displayName
    57         display deviceIOErrorSignal handlerBlock:[:ex | 
    57     ]
    58             'DeviceWorkstation [warning]: stop dispatch due to I/O error: ' errorPrint.
    58 
    59             display errorPrintCR.
    59     "Modified: / 01-06-2010 / 11:25:12 / sr"
    60             display brokenConnection.
       
    61         ].
       
    62 
       
    63         Screen currentScreenQuerySignal answer:display do:[
       
    64             Screen default isNil ifTrue:[
       
    65                 Smalltalk secureFileIn:'keyboard.rc'.
       
    66                 "/ Smalltalk secureFileIn:'display.rc'.
       
    67                 display buttonTranslation:#(1 2 2 4 5 6 7).
       
    68                 Screen default:display.
       
    69             ].
       
    70 
       
    71             app := NewLauncher new openAndWaitUntilVisible.
       
    72             app windowGroup isNil ifTrue:[
       
    73                 errorString := 'Cannot open'.
       
    74             ] ifFalse:[
       
    75                 app windowGroup process addExitAction:[
       
    76                     "reset the default display"
       
    77                     Screen default == display ifTrue:[
       
    78                         Screen default:nil.
       
    79                     ].
       
    80                 ].
       
    81             ].
       
    82 
       
    83             errorString notEmptyOrNil ifTrue:[
       
    84                 "terminate event processor on error"
       
    85                 display stopDispatch.
       
    86             ].
       
    87         ]
       
    88     ] on:Screen deviceOpenErrorSignal do:[:ex|
       
    89         errorString := 'Cannot connect to display: <1s><br><2s>' 
       
    90                         expandMacrosWith:displayName with:ex description.
       
    91     ].
       
    92 
       
    93     ^ errorString
       
    94 ! !
    60 ! !
    95 
    61 
    96 !HTMLUtilities class methodsFor:'helpers'!
    62 !HTMLUtilities class methodsFor:'helpers'!
    97 
    63 
    98 controlCharacters
    64 controlCharacters
   458 ! !
   424 ! !
   459 
   425 
   460 !HTMLUtilities class methodsFor:'documentation'!
   426 !HTMLUtilities class methodsFor:'documentation'!
   461 
   427 
   462 version
   428 version
   463     ^ '$Header: /cvs/stx/stx/libbasic2/HTMLUtilities.st,v 1.9 2010-04-12 12:53:03 sr Exp $'
   429     ^ '$Header: /cvs/stx/stx/libbasic2/HTMLUtilities.st,v 1.10 2010-06-01 09:28:21 sr Exp $'
   464 !
   430 !
   465 
   431 
   466 version_CVS
   432 version_CVS
   467     ^ '$Header: /cvs/stx/stx/libbasic2/HTMLUtilities.st,v 1.9 2010-04-12 12:53:03 sr Exp $'
   433     ^ '$Header: /cvs/stx/stx/libbasic2/HTMLUtilities.st,v 1.10 2010-06-01 09:28:21 sr Exp $'
   468 ! !
   434 ! !