--- a/ApplicationModel.st Mon Aug 20 08:17:08 2018 +0200
+++ b/ApplicationModel.st Mon Aug 20 10:14:52 2018 +0200
@@ -2,7 +2,7 @@
"
COPYRIGHT (c) 1995 by Claus Gittinger
- All Rights Reserved
+ All Rights Reserved
This software is furnished under a license and may be used
only in accordance with the terms of that license and with the
@@ -16,11 +16,11 @@
"{ NameSpace: Smalltalk }"
Model subclass:#ApplicationModel
- instanceVariableNames:'builder resources device masterApplication'
- classVariableNames:'DefaultExtents DefaultLabels DefaultVisuals
- RecentlyOpenedApplications'
- poolDictionaries:''
- category:'Interface-Framework'
+ instanceVariableNames:'builder resources device masterApplication'
+ classVariableNames:'DefaultExtents DefaultLabels DefaultVisuals
+ RecentlyOpenedApplications'
+ poolDictionaries:''
+ category:'Interface-Framework'
!
ApplicationModel class instanceVariableNames:'ClassResources'
@@ -35,7 +35,7 @@
copyright
"
COPYRIGHT (c) 1995 by Claus Gittinger
- All Rights Reserved
+ All Rights Reserved
This software is furnished under a license and may be used
only in accordance with the terms of that license and with the
@@ -66,12 +66,12 @@
created by the windowBuilder. If your subclass does not provide such
a spec, you should at least redefine:
- #openInterface - to create a topview and open it
+ #openInterface - to create a topview and open it
you may want to redefine:
- #closeRequest - to catch window closing
- #focusSequence - to define a sequence for focus-stepping
+ #closeRequest - to catch window closing
+ #focusSequence - to define a sequence for focus-stepping
Once the interfaceBuilder is finished & released, subclasses can
@@ -83,10 +83,10 @@
[Instance variables:]
- resources ResourcePack language string translation
-
- builder WindowBuilder a builder who knows how to create
- a window hierarchy from a specification
+ resources ResourcePack language string translation
+
+ builder WindowBuilder a builder who knows how to create
+ a window hierarchy from a specification
Notice: this class was implemented using protocol information
@@ -96,11 +96,11 @@
[author:]
- Claus Gittinger
+ Claus Gittinger
[see also:]
- StandardSystemView
- WindowGroup DeviceWorkstation
+ StandardSystemView
+ WindowGroup DeviceWorkstation
"
!
@@ -145,13 +145,13 @@
initialize
self == ApplicationModel ifTrue:[
- Smalltalk addDependent:self
+ Smalltalk addDependent:self
].
DefaultLabels isNil ifTrue:[
- DefaultLabels := IdentityDictionary new
+ DefaultLabels := IdentityDictionary new
].
DefaultVisuals isNil ifTrue:[
- DefaultVisuals := IdentityDictionary new
+ DefaultVisuals := IdentityDictionary new
].
"
@@ -288,7 +288,7 @@
Typically, a color is returned there."
(self respondsTo:aSymbol) ifTrue:[
- ^ (self perform:aSymbol) value.
+ ^ (self perform:aSymbol) value.
].
"fall back to a possibly well defined color name"
@@ -307,7 +307,7 @@
Typically, a view is returned there."
(self respondsTo:aKey) ifTrue:[
- ^ self perform:aKey
+ ^ self perform:aKey
].
^ nil
!
@@ -323,7 +323,7 @@
Typically, a font is returned there."
(self respondsTo:aSymbol) ifTrue:[
- ^ self perform:aSymbol.
+ ^ self perform:aSymbol.
].
"/ "fall back to a well defined font name"
@@ -349,7 +349,7 @@
app := self application.
app isNil ifTrue:[^ nil].
(app respondsTo:aKey) ifTrue:[
- ^ app perform:aKey
+ ^ app perform:aKey
].
^ app labelAt:aKey ifAbsent:nil
!
@@ -369,9 +369,9 @@
app := self application.
app notNil ifTrue:[
- (app respondsTo:aKey) ifTrue:[
- ^ app perform:aKey
- ]
+ (app respondsTo:aKey) ifTrue:[
+ ^ app perform:aKey
+ ]
].
^ nil.
@@ -405,9 +405,9 @@
Typically, an interfaceSpecification is returned there."
^ self
- specificationFor:aKey
- application:self
- onDevice:nil
+ specificationFor:aKey
+ application:self
+ onDevice:nil
!
specificationFor:aKey application:app onDevice:deviceOrNil
@@ -428,38 +428,38 @@
"/ for example, if the type is pda, the xxxSpec_pda spec will be used.
displayDevice := deviceOrNil.
displayDevice isNil ifTrue:[
- displayDevice := Screen current.
- displayDevice isNil ifTrue:[
- displayDevice := Screen default.
- ]
+ displayDevice := Screen current.
+ displayDevice isNil ifTrue:[
+ displayDevice := Screen default.
+ ]
].
displayDevice notNil ifTrue:[
- displayDeviceType := displayDevice deviceType.
- displayDeviceType notNil ifTrue:[
- modifiedKey := (aKey , '_' , displayDeviceType) asSymbolIfInterned.
- modifiedKey notNil ifTrue:[
- (app respondsTo:modifiedKey) ifTrue:[
- ^ app perform:modifiedKey
- ].
- app isBehavior ifFalse:[
- appClass := app application.
- (appClass respondsTo:modifiedKey) ifTrue:[
- ^ appClass perform:modifiedKey
- ].
- ].
- ]
- ]
+ displayDeviceType := displayDevice deviceType.
+ displayDeviceType notNil ifTrue:[
+ modifiedKey := (aKey , '_' , displayDeviceType) asSymbolIfInterned.
+ modifiedKey notNil ifTrue:[
+ (app respondsTo:modifiedKey) ifTrue:[
+ ^ app perform:modifiedKey
+ ].
+ app isBehavior ifFalse:[
+ appClass := app application.
+ (appClass respondsTo:modifiedKey) ifTrue:[
+ ^ appClass perform:modifiedKey
+ ].
+ ].
+ ]
+ ]
].
app isBehavior ifFalse:[
- (app respondsTo:aKey) ifTrue:[
- ^ app perform:aKey
- ].
- appClass := app application.
- (appClass respondsTo:aKey) ifTrue:[
- ^ appClass perform:aKey
- ].
- ^ app masterApplication specificationFor:aKey
+ (app respondsTo:aKey) ifTrue:[
+ ^ app perform:aKey
+ ].
+ appClass := app application.
+ (appClass respondsTo:aKey) ifTrue:[
+ ^ appClass perform:aKey
+ ].
+ ^ app masterApplication specificationFor:aKey
].
^ app perform:aKey
@@ -480,7 +480,7 @@
app := self application.
(app respondsTo:aKey) ifTrue:[
- ^ app perform:aKey
+ ^ app perform:aKey
].
^ nil
!
@@ -500,7 +500,7 @@
app := self application.
(app respondsTo:aKey) ifTrue:[
- ^ app perform:aKey
+ ^ app perform:aKey
].
^ app visualAt:aKey ifAbsent:nil
! !
@@ -511,7 +511,7 @@
"flush resources on language changes"
something == #Language ifTrue:[
- self flushAllClassResources
+ self flushAllClassResources
]
"Created: 15.6.1996 / 15:13:29 / cg"
@@ -763,15 +763,15 @@
packageDir := Smalltalk getPackageDirectoryForPackage:(self package).
packageDir isNil ifTrue:[
- packageDir := Filename defaultDirectory
+ packageDir := Filename defaultDirectory
].
#(
- 'documentation'
- 'doc'
+ 'documentation'
+ 'doc'
) do:[:subDir |
- (packageDir construct:subDir) exists ifTrue:[
- ^ packageDir construct:subDir
- ].
+ (packageDir construct:subDir) exists ifTrue:[
+ ^ packageDir construct:subDir
+ ].
].
^ packageDir construct:'doc'
! !
@@ -917,7 +917,7 @@
"if not already loaded, get the classes resourcePack and return it"
ClassResources isNil ifTrue:[
- ClassResources := super classResources.
+ ClassResources := super classResources.
].
^ ClassResources
!
@@ -935,17 +935,17 @@
ResourcePack flushCachedResourcePacks.
self flushClassResources.
self allSubclassesDo:[:aClass |
- aClass flushClassResources.
+ aClass flushClassResources.
].
WindowGroup scheduledWindowGroups
- do:[:wg |
- |app|
-
- (app := wg application) notNil ifTrue:[
- app initializeResources
- ]
- ]
+ do:[:wg |
+ |app|
+
+ (app := wg application) notNil ifTrue:[
+ app initializeResources
+ ]
+ ]
"Modified: / 13-09-2006 / 12:41:31 / cg"
!
@@ -1028,8 +1028,8 @@
specified by the given spec."
^ self new
- openDialogInterfaceSpec:anInterfaceSpec
- withBindings:nil
+ openDialogInterfaceSpec:anInterfaceSpec
+ withBindings:nil
!
openDialogInterfaceSpec:anInterfaceSpec withBindings:bindings
@@ -1037,8 +1037,8 @@
specified by the given spec."
^ self new
- openDialogInterfaceSpec:anInterfaceSpec
- withBindings:bindings
+ openDialogInterfaceSpec:anInterfaceSpec
+ withBindings:bindings
"Modified: 5.9.1995 / 17:54:50 / claus"
"Modified: 13.1.1997 / 20:55:02 / cg"
@@ -1061,8 +1061,8 @@
specified by the spec."
^ self new
- openDialogSpec:aSpec
- withBindings:bindings
+ openDialogSpec:aSpec
+ withBindings:bindings
"Modified: / 5.9.1995 / 17:54:50 / claus"
"Modified: / 13.1.1997 / 20:55:02 / cg"
@@ -1093,42 +1093,42 @@
wsClass := Smalltalk classNamed:#XWorkstation.
wsClass isNil ifTrue:[
- self error:'XWorkstation has not been loaded'
+ self error:'XWorkstation has not been loaded'
].
[
- display := wsClass newDispatchingFor:displayName.
- display deviceIOErrorSignal handlerBlock:[:ex |
- 'DeviceWorkstation [warning]: stop dispatch due to I/O error: ' errorPrint.
- display errorPrintCR.
- display brokenConnection.
- ].
-
- Screen currentScreenQuerySignal answer:display do:[
- Screen default isNil ifTrue:[
- Smalltalk secureFileIn:'keyboard.rc'.
- "/ Smalltalk secureFileIn:'display.rc'.
- display buttonTranslation:#(1 2 2 4 5 6 7).
- Screen default:display.
- ].
-
- app := NewLauncher new openAndWaitUntilVisible.
- app windowGroup isNil ifTrue:[
- "terminate event processor on error"
- display stopDispatch.
- self error:'Cannot open'.
- ] ifFalse:[
- app windowGroup process addExitAction:[
- "reset the default display"
- Screen default == display ifTrue:[
- Screen default:nil.
- ].
- ].
- ].
- ]
+ display := wsClass newDispatchingFor:displayName.
+ display deviceIOErrorSignal handlerBlock:[:ex |
+ 'DeviceWorkstation [warning]: stop dispatch due to I/O error: ' errorPrint.
+ display errorPrintCR.
+ display brokenConnection.
+ ].
+
+ Screen currentScreenQuerySignal answer:display do:[
+ Screen default isNil ifTrue:[
+ Smalltalk secureFileIn:'keyboard.rc'.
+ "/ Smalltalk secureFileIn:'display.rc'.
+ display buttonTranslation:#(1 2 2 4 5 6 7).
+ Screen default:display.
+ ].
+
+ app := NewLauncher new openAndWaitUntilVisible.
+ app windowGroup isNil ifTrue:[
+ "terminate event processor on error"
+ display stopDispatch.
+ self error:'Cannot open'.
+ ] ifFalse:[
+ app windowGroup process addExitAction:[
+ "reset the default display"
+ Screen default == display ifTrue:[
+ Screen default:nil.
+ ].
+ ].
+ ].
+ ]
] on:Screen deviceOpenErrorSignal do:[:ex|
- self error:('Cannot connect to display: <1s><br><2s>'
- expandMacrosWith:displayName with:ex description).
+ self error:('Cannot connect to display: <1s><br><2s>'
+ expandMacrosWith:displayName with:ex description).
].
^ app
@@ -1157,10 +1157,10 @@
support and the documentation of the DeviceWorkstation class."
Screen currentScreenQuerySignal
- answer:aDevice
- do:[
- ^ (self onDevice:aDevice) open
- ]
+ answer:aDevice
+ do:[
+ ^ (self onDevice:aDevice) open
+ ]
"
Launcher openOnDevice:Display
@@ -1262,8 +1262,8 @@
Start a HTTP server, if not already running"
^ HTTPPortalService
- startWithApplication:self
- link:linkName
+ startWithApplication:self
+ link:linkName
"
self startAsWebService:'hello'
@@ -1279,9 +1279,9 @@
Start a HTTP server, if not already running"
^ HTTPPortalService
- startWithApplication:self
- inServer:httpServer
- link:linkName
+ startWithApplication:self
+ inServer:httpServer
+ link:linkName
"
self startAsWebService:'hello'
@@ -1340,8 +1340,8 @@
"
PortalTests::TestApplication1
- startInPortalService:
- (HTTPPortalService allInstances select:[:s | s httpServer port = 8080]) first
+ startInPortalService:
+ (HTTPPortalService allInstances select:[:s | s httpServer port = 8080]) first
"
!
@@ -1397,9 +1397,9 @@
device
device isNil ifTrue:[
- self isWebService ifTrue:[
- device := WebApplicationDevice new
- ]
+ self isWebService ifTrue:[
+ device := WebApplicationDevice new
+ ]
].
^ device
!
@@ -1475,13 +1475,13 @@
builder isNil ifTrue:[^ nil].
(win := builder window) notNil ifTrue:[
- ^ win
+ ^ win
].
masterApplication notNil ifTrue:[
- masterApplication ~~ self ifTrue:[
- "/ is that true ?
- ^ masterApplication window
- ]
+ masterApplication ~~ self ifTrue:[
+ "/ is that true ?
+ ^ masterApplication window
+ ]
].
^ nil.
@@ -1495,7 +1495,7 @@
when the builder is accessed."
builder isNil ifTrue:[
- self createBuilder
+ self createBuilder
].
builder window:aTopView
@@ -1568,9 +1568,9 @@
aKey isNil ifTrue:[ self error:'nil action key' ].
masterApplication notNil ifTrue:[
- (self respondsTo:aKey) ifFalse:[
- ^ masterApplication actionFor:aKey
- ].
+ (self respondsTo:aKey) ifFalse:[
+ ^ masterApplication actionFor:aKey
+ ].
].
^ MessageSend receiver:self selector:aKey
@@ -1592,9 +1592,9 @@
aKey isNil ifTrue:[ self error:'nil action key' ].
masterApplication notNil ifTrue:[
- (self respondsTo:aKey) ifFalse:[
- ^ masterApplication actionFor:aKey withValue:aValue
- ].
+ (self respondsTo:aKey) ifFalse:[
+ ^ masterApplication actionFor:aKey withValue:aValue
+ ].
].
"/ sigh - too many senders of #isBlock around...
@@ -1617,9 +1617,9 @@
aKey isNil ifTrue:[ self error:'nil action key' ].
masterApplication notNil ifTrue:[
- (self respondsTo:aKey) ifFalse:[
- ^ masterApplication actionFor:aKey withValue:value1 withValue:value2
- ].
+ (self respondsTo:aKey) ifFalse:[
+ ^ masterApplication actionFor:aKey withValue:value1 withValue:value2
+ ].
].
^ [self perform:aKey with:value1 with:value2]
!
@@ -1679,9 +1679,9 @@
aKey isNil ifTrue:[ self error:'nil client key' ].
masterApplication notNil ifTrue:[
- (self respondsTo:aKey) ifFalse:[
- ^ masterApplication clientFor:aKey
- ].
+ (self respondsTo:aKey) ifFalse:[
+ ^ masterApplication clientFor:aKey
+ ].
].
^ self perform:aKey
@@ -1699,13 +1699,13 @@
Typically, a color is returned there."
(self respondsTo:aKey) ifTrue:[
- ^ (self perform:aKey) value
+ ^ (self perform:aKey) value
].
(self class respondsTo:aKey) ifTrue:[
- ^ (self class perform:aKey) value
+ ^ (self class perform:aKey) value
].
masterApplication notNil ifTrue:[
- ^ masterApplication colorFor:aKey
+ ^ masterApplication colorFor:aKey
].
^ self class colorFor:aKey.
!
@@ -1724,9 +1724,9 @@
aKey isNil ifTrue:[ self error:'nil component key' ].
masterApplication notNil ifTrue:[
- (self respondsTo:aKey) ifFalse:[
- ^ masterApplication componentFor:aKey
- ].
+ (self respondsTo:aKey) ifFalse:[
+ ^ masterApplication componentFor:aKey
+ ].
].
^ self perform:aKey
@@ -1771,15 +1771,15 @@
aKey isNil ifTrue:[ self error:'nil label key' ].
masterApplication notNil ifTrue:[
- (self respondsTo:aKey) ifFalse:[
- ^ masterApplication labelFor:aKey
- ].
+ (self respondsTo:aKey) ifFalse:[
+ ^ masterApplication labelFor:aKey
+ ].
].
(self respondsTo:aKey) ifFalse:[
- (self class respondsTo:aKey) ifTrue:[
- ^ self class perform:aKey
- ].
+ (self class respondsTo:aKey) ifTrue:[
+ ^ self class perform:aKey
+ ].
].
^ self perform:aKey
!
@@ -1804,7 +1804,7 @@
a := self aspectFor:aKey.
a notNil ifTrue:[
- ^ a
+ ^ a
].
^ self application listFor:aKey
@@ -1827,22 +1827,22 @@
"/ Ask myself first...
(thisContext isRecursive not and:[ self respondsTo: key ]) ifTrue:[
- menu := self perform: key
+ menu := self perform: key
] ifFalse:[
- "/ Ask my class...
- (self class respondsTo: key) ifTrue:[
- menu := self class perform: key
- ] ifFalse:[
- "/ Ask masterApplication if any...
- masterApplication notNil ifTrue:[
- menu := masterApplication menuFor: key
- ].
- ].
+ "/ Ask my class...
+ (self class respondsTo: key) ifTrue:[
+ menu := self class perform: key
+ ] ifFalse:[
+ "/ Ask masterApplication if any...
+ masterApplication notNil ifTrue:[
+ menu := masterApplication menuFor: key
+ ].
+ ].
].
"/ If the provided menu is a menu spec, create Menu from it...
menu isArray ifTrue:[
- menu := Menu decodeFromLiteralArray: menu.
+ menu := Menu decodeFromLiteralArray: menu.
].
^ menu.
@@ -1877,10 +1877,10 @@
Typically, an ApplicationModel subinstance is returned there."
(self respondsTo:aKey) ifTrue:[
- ^ self perform:aKey
+ ^ self perform:aKey
].
masterApplication notNil ifTrue:[
- ^ masterApplication subApplicationFor:aKey
+ ^ masterApplication subApplicationFor:aKey
].
^ nil.
!
@@ -2035,10 +2035,10 @@
specToBuild := spec.
withMenuBoolean ifFalse:[
- "/ subapps should not build the menu and other fullSpec stuff.
- spec class == FullSpec ifTrue:[
- specToBuild := spec component.
- ]
+ "/ subapps should not build the menu and other fullSpec stuff.
+ spec class == FullSpec ifTrue:[
+ specToBuild := spec component.
+ ]
].
self buildSpec:specToBuild asSubCanvasWithBuilder:aBuilder
! !
@@ -2051,17 +2051,17 @@
|coll|
aSymbolOrArray isSymbol ifTrue:[
- "/ a single components name
- coll := Array with:aSymbolOrArray
+ "/ a single components name
+ coll := Array with:aSymbolOrArray
] ifFalse:[
- coll := aSymbolOrArray
+ coll := aSymbolOrArray
].
coll do:[:aSymbol |
- |component|
-
- (component := self componentFor:aSymbol) isNil ifFalse:[
- aBlock value:component
- ]
+ |component|
+
+ (component := self componentFor:aSymbol) isNil ifFalse:[
+ aBlock value:component
+ ]
]
"Modified: 26.3.1997 / 16:23:14 / cg"
@@ -2156,9 +2156,9 @@
Useful for synchronization"
^ self
- enqueueMessage:#value
- for:aBlock
- arguments:#().
+ enqueueMessage:#value
+ for:aBlock
+ arguments:#().
"Modified: / 26.2.2000 / 18:01:44 / cg"
!
@@ -2354,17 +2354,17 @@
"Register interest in a change in aValueModel using information in aSelectorOrArray.
aSelectorOrArray can be one of three things:
- 1) nil in which case no interest is registered
- 2) a selector in which case the receiver is understood to be self
- 3) an Array in which case the size is two where the first element is the
- message to be sent and the second element is the receiver."
+ 1) nil in which case no interest is registered
+ 2) a selector in which case the receiver is understood to be self
+ 3) an Array in which case the size is two where the first element is the
+ message to be sent and the second element is the receiver."
aSelectorOrArray isNil ifTrue:[^ aValueModel].
(aSelectorOrArray isArray) ifTrue:[
- aValueModel onChangeSend:(aSelectorOrArray at:1) to:(aSelectorOrArray at:2)
+ aValueModel onChangeSend:(aSelectorOrArray at:1) to:(aSelectorOrArray at:2)
] ifFalse: [
- aValueModel onChangeSend:aSelectorOrArray to:self
+ aValueModel onChangeSend:aSelectorOrArray to:self
].
^aValueModel
@@ -2407,12 +2407,12 @@
|acceptAction|
builder notNil ifTrue:[
- acceptAction := builder bindingAt:#doAccept.
+ acceptAction := builder bindingAt:#doAccept.
].
acceptAction notNil ifTrue:[
- acceptAction value
+ acceptAction value
] ifFalse:[
- self doAccept
+ self doAccept
]
!
@@ -2420,12 +2420,12 @@
|cancelAction|
builder notNil ifTrue:[
- cancelAction := builder bindingAt:#doCancel.
+ cancelAction := builder bindingAt:#doCancel.
].
cancelAction notNil ifTrue:[
- cancelAction value
+ cancelAction value
] ifFalse:[
- self doCancel
+ self doCancel
]
! !
@@ -2471,9 +2471,9 @@
and #aboutThisApplicationLabel"
Dialog
- about:(self translateString:self aboutThisApplicationText)
- label:(self translateString:self aboutThisApplicationLabel)
- icon:self aboutImage
+ about:(self translateString:self aboutThisApplicationText)
+ label:(self translateString:self aboutThisApplicationLabel)
+ icon:self aboutImage
"Modified: / 17.11.2001 / 23:05:52 / cg"
!
@@ -2484,7 +2484,7 @@
(but a file under the current directory is tried first)"
self withWaitCursorDo:[
- HTMLDocumentView openFullOnHelpFile:pathToHelpText
+ HTMLDocumentView openFullOnHelpFile:pathToHelpText
]
!
@@ -2540,7 +2540,7 @@
Here, the help text is ignored."
masterApplication notNil ifTrue:[
- masterApplication showHelp:aHelpText for:view
+ masterApplication showHelp:aHelpText for:view
].
"Modified: / 31.7.1998 / 19:13:59 / cg"
@@ -2799,9 +2799,9 @@
"/ then treat this like a regular open.
"/ otherwise ignore it.
sameApp ifFalse:[
- self postBuildWith:aBuilder.
+ self postBuildWith:aBuilder.
] ifTrue:[
- self commonPostBuild.
+ self commonPostBuild.
].
"Modified: / 08-07-1998 / 18:28:55 / cg"
@@ -2920,9 +2920,9 @@
|wg|
(wg := self windowGroup) notNil ifTrue:[
- (wg topViews ? #()) do:[:aView |
- aView addToCurrentProject
- ]
+ (wg topViews ? #()) do:[:aView |
+ aView addToCurrentProject
+ ]
]
"Modified: 17.1.1997 / 19:43:39 / cg"
@@ -2960,9 +2960,9 @@
initializeDevice
self isWebService ifTrue:[
- self initializeWebServiceDevice
+ self initializeWebServiceDevice
] ifFalse:[
- self initializeScreenDevice
+ self initializeScreenDevice
].
!
@@ -3037,7 +3037,7 @@
openAsSlave
"open a standard interface as slave.
Notice: there is still a need to make the current window a master
- (see code and comments in WindowBuilder >> openAt:withExtent:andType:)"
+ (see code and comments in WindowBuilder >> openAt:withExtent:andType:)"
^ self openAs:#slave
@@ -3250,9 +3250,9 @@
builder bindings:bindings.
self allButOpenFrom:anInterfaceSpec.
modal ifTrue:[
- self openWindowModal.
+ self openWindowModal.
] ifFalse:[
- self openWindow.
+ self openWindow.
]
!
@@ -3272,9 +3272,9 @@
- assumes that the builder has already setup the interface."
builder "openWindow."
- openAt:nil
- withExtent:(self defaultWindowExtent)
- andType:(self defaultWindowType)
+ openAt:nil
+ withExtent:(self defaultWindowExtent)
+ andType:(self defaultWindowType)
"Created: / 14-02-1997 / 20:20:39 / cg"
"Modified: / 11-07-2011 / 22:30:27 / cg"
@@ -3285,9 +3285,9 @@
The windowType can be any of #slave, #partner, #dialog, #popUp etc."
builder
- openAt:nil
- withExtent:(self defaultWindowExtent)
- andType:windowType
+ openAt:nil
+ withExtent:(self defaultWindowExtent)
+ andType:windowType
"Modified: / 11-07-2011 / 22:30:35 / cg"
!
@@ -3297,9 +3297,9 @@
The windowType can be any of #slave, #partner, #dialog, #popUp etc."
builder
- openAt:originOrNil
- withExtent:(self defaultWindowExtent)
- andType:windowType
+ openAt:originOrNil
+ withExtent:(self defaultWindowExtent)
+ andType:windowType
"Modified: / 11-07-2011 / 22:30:35 / cg"
"Created: / 25-07-2011 / 16:00:24 / cg"
@@ -3310,9 +3310,9 @@
- assumes that the builder has already setup the interface."
builder "openWindowAt:aLocation."
- openAt:aPoint
- withExtent:(self defaultWindowExtent)
- andType:(self defaultWindowType)
+ openAt:aPoint
+ withExtent:(self defaultWindowExtent)
+ andType:(self defaultWindowType)
"Created: / 14-02-1997 / 20:20:55 / cg"
!
@@ -3332,9 +3332,9 @@
"/ builder openDialog.
builder
- openAt:nil
- withExtent:(self defaultWindowExtent)
- andType:#dialog
+ openAt:nil
+ withExtent:(self defaultWindowExtent)
+ andType:#dialog
"Created: / 14-02-1997 / 20:20:39 / cg"
!
@@ -3426,9 +3426,9 @@
"/ It will call postOpenDialog: and postBuildDialog: as callbacks.
^ SimpleDialog new
- openFor:self
- interface:aSelector
- withBindings:bindings
+ openFor:self
+ interface:aSelector
+ withBindings:bindings
"Created: / 28-02-1997 / 14:07:45 / cg"
"Modified: / 23-01-1998 / 18:18:14 / cg"
@@ -3443,9 +3443,9 @@
"/ It will call postOpenDialog: and postBuildDialog: as callbacks.
^ SimpleDialog new
- openFor:self
- interfaceSpec:aSpec
- withBindings:bindings
+ openFor:self
+ interfaceSpec:aSpec
+ withBindings:bindings
"Created: / 28-02-1997 / 14:07:45 / cg"
"Modified: / 23-01-1998 / 18:18:14 / cg"
@@ -3471,9 +3471,9 @@
"/ It will call postOpenDialog: and postBuildDialog: as callbacks.
^ SimpleDialog new
- openFor:self
- spec:aSpec
- withBindings:bindings
+ openFor:self
+ spec:aSpec
+ withBindings:bindings
"Modified: / 23-01-1998 / 18:18:14 / cg"
"Created: / 20-05-1998 / 20:27:56 / cg"
@@ -3499,16 +3499,16 @@
addToService
self service
- addPage:(builder page)
- link:(self webLink)
+ addPage:(builder page)
+ link:(self webLink)
!
createWebBuilder
"create a Web-UIBuilder if not already present"
builder isNil ifTrue:[
- builder := self webBuilderClass new.
- builder application:self.
+ builder := self webBuilderClass new.
+ builder application:self.
]
"Created: / 19.6.1998 / 03:32:37 / cg"
@@ -3539,7 +3539,7 @@
|page|
builder isNil ifTrue:[
- self createWebBuilder.
+ self createWebBuilder.
].
self preBuildWith:builder.
@@ -3572,19 +3572,19 @@
|server|
self service isNil ifTrue:[
- server := HTTPServer serverOnPort:(self httpServerPort).
-
- self service:(server
- serviceForLink:(self serviceLinkName)
- ifAbsent:[
- |service|
-
- service := HTTPPortalService new.
- service linkName:(self serviceLinkName).
- service class unRegisterServiceOn:server.
- service registerServiceOn:server.
- service
- ]).
+ server := HTTPServer serverOnPort:(self httpServerPort).
+
+ self service:(server
+ serviceForLink:(self serviceLinkName)
+ ifAbsent:[
+ |service|
+
+ service := HTTPPortalService new.
+ service linkName:(self serviceLinkName).
+ service class unRegisterServiceOn:server.
+ service registerServiceOn:server.
+ service
+ ]).
].
!
@@ -3608,7 +3608,7 @@
startAsWebService
device isNil ifTrue:[
- self initializeDevice.
+ self initializeDevice.
].
self startInPortalService:self service
@@ -3654,7 +3654,7 @@
spec readers for other UI languages (motif UIL ?)"
self isWebService ifTrue:[
- ^ self webBuilderClass
+ ^ self webBuilderClass
].
^ UIBuilder
@@ -3666,8 +3666,8 @@
"create a WindowBuilder if not already present"
builder isNil ifTrue:[
- builder := self builderClass new.
- builder application:self.
+ builder := self builderClass new.
+ builder application:self.
]
"Created: / 19.6.1998 / 03:32:37 / cg"
@@ -3757,7 +3757,7 @@
"return a name to be shown for me in the process monitor"
self class == ApplicationModel ifTrue:[
- ^ 'Application'
+ ^ 'Application'
].
^ self class nameWithoutPrefix
@@ -3795,13 +3795,13 @@
|cls|
aClass notNil ifTrue:[
- (cls := Smalltalk resolveName:something inClass:aClass) notNil ifTrue:[
- ^ cls
- ].
-
- masterApplication notNil ifTrue:[
- ^ masterApplication resolveName:something
- ]
+ (cls := Smalltalk resolveName:something inClass:aClass) notNil ifTrue:[
+ ^ cls
+ ].
+
+ masterApplication notNil ifTrue:[
+ ^ masterApplication resolveName:something
+ ]
].
^ nil
!
@@ -3827,7 +3827,7 @@
"return the top-master application"
masterApplication isNil ifTrue:[
- ^ self
+ ^ self
].
^ masterApplication topApplication
@@ -3959,38 +3959,38 @@
(masterApplication notNil
and:[myWindow topView isModal not]) ifTrue:[
- "/ temporary clear my masterApplication to prevent
- "/ endless recursion, in case the master sends me
- "/ a closeRequest (although, it is supposed to
- "/ send me a closeDownViews ...)
-
- savedMaster := masterApplication.
- masterApplication := nil.
- aTopView isSlave ifTrue:[
- savedMaster closeRequestFor:aTopView.
- ] ifFalse:[
- savedMaster closeRequestFor:myWindow.
- ].
-
- "/ restore - in case master did not want me to close ...
- masterApplication := savedMaster.
- ^ self
+ "/ temporary clear my masterApplication to prevent
+ "/ endless recursion, in case the master sends me
+ "/ a closeRequest (although, it is supposed to
+ "/ send me a closeDownViews ...)
+
+ savedMaster := masterApplication.
+ masterApplication := nil.
+ aTopView isSlave ifTrue:[
+ savedMaster closeRequestFor:aTopView.
+ ] ifFalse:[
+ savedMaster closeRequestFor:myWindow.
+ ].
+
+ "/ restore - in case master did not want me to close ...
+ masterApplication := savedMaster.
+ ^ self
].
(aTopView == myWindow) ifTrue:[
- self closeRequest.
- ^ self
+ self closeRequest.
+ ^ self
].
(aTopView isPartner or:[aTopView isMaster]) ifTrue:[
- aTopView application closeRequest.
- self closeRequest.
- ^ self.
+ aTopView application closeRequest.
+ self closeRequest.
+ ^ self.
].
aTopView isSlave ifTrue:[
- aTopView closeRequest
+ aTopView closeRequest
] ifFalse:[
- aTopView application closeRequest.
+ aTopView application closeRequest.
]
!
@@ -4008,18 +4008,18 @@
"/ to remember the accept vs. cancel case.
"/
self window isModal ifTrue:[
- masterApplication notNil ifTrue:[
- masterApplication window topView == self window topView ifTrue:[
- masterApplication window isModal ifTrue:[
- masterApplication doAccept.
- ^ self.
- ].
- ].
- ].
-
- "/ mhmh - is this a good idea ?
- self perform:#accept ifNotUnderstood:[self closeRequest].
- ^ self
+ masterApplication notNil ifTrue:[
+ masterApplication window topView == self window topView ifTrue:[
+ masterApplication window isModal ifTrue:[
+ masterApplication doAccept.
+ ^ self.
+ ].
+ ].
+ ].
+
+ "/ mhmh - is this a good idea ?
+ self perform:#accept ifNotUnderstood:[self closeRequest].
+ ^ self
].
^ self "/ nothing done here ...
@@ -4039,9 +4039,9 @@
"/ to remember the accept vs. cancel case.
"/
self window isModal ifTrue:[
- "/ mhmh - is this a good idea ?
- self perform:#cancel ifNotUnderstood:[self closeRequest].
- ^ self
+ "/ mhmh - is this a good idea ?
+ self perform:#cancel ifNotUnderstood:[self closeRequest].
+ ^ self
].
^ self "/ nothing done here ...
!
@@ -4063,10 +4063,10 @@
window := self window.
(window notNil and:[window isTopView]) ifTrue:[
- DefaultExtents isNil ifTrue:[
- DefaultExtents := Dictionary new.
- ].
- DefaultExtents at:self class name put:(window extent).
+ DefaultExtents isNil ifTrue:[
+ DefaultExtents := Dictionary new.
+ ].
+ DefaultExtents at:self class name put:(window extent).
].
"Created: / 31-07-2013 / 14:41:33 / cg"
@@ -4475,15 +4475,15 @@
|ret|
self
- withCursor:aCursor do:[
- |time|
-
- time := Time millisecondsToRun:[ ret := aBlock value].
- time := UserPreferences current waitCursorVisibleTime - time.
- time > 0 ifTrue:[
- Delay waitForMilliseconds:time.
- ].
- ].
+ withCursor:aCursor do:[
+ |time|
+
+ time := Time millisecondsToRun:[ ret := aBlock value].
+ time := UserPreferences current waitCursorVisibleTime - time.
+ time > 0 ifTrue:[
+ Delay waitForMilliseconds:time.
+ ].
+ ].
^ ret.
"Modified (comment): / 12-09-2011 / 12:14:31 / cg"
@@ -4547,9 +4547,9 @@
the same way as events for a view are pushable."
^ self
- dispatchEvent:event
- withFocusOn:nil
- delegate:true
+ dispatchEvent:event
+ withFocusOn:nil
+ delegate:true
!
@@ -4581,9 +4581,9 @@
the same way as events for a view are pushable."
^ self
- dispatchEvent:event
- withFocusOn:focusViewOrNil
- delegate:true
+ dispatchEvent:event
+ withFocusOn:focusViewOrNil
+ delegate:true
!
@@ -4594,11 +4594,11 @@
the same way as events for a view are pushable."
^ self
- dispatchEvent:event
- type:event type
- arguments:(event arguments)
- withFocusOn:focusViewOrNil
- delegate:doDelegate
+ dispatchEvent:event
+ type:event type
+ arguments:(event arguments)
+ withFocusOn:focusViewOrNil
+ delegate:doDelegate
!
@@ -4632,8 +4632,8 @@
Typically, the command is one like 'openPath:', as generated in StandaloneStartup."
command = 'openPath' ifTrue:[
- self processOpenPathCommand:argument.
- ^ self.
+ self processOpenPathCommand:argument.
+ ^ self.
].
Transcript showCR: 'Invalid command received: ', command.
@@ -4662,11 +4662,11 @@
|w k|
builder notNil ifTrue:[
- (w := builder window) notNil ifTrue:[
- (k := w keyboardProcessor) notNil ifTrue:[
- ^ k requestForWindowClose
- ]
- ]
+ (w := builder window) notNil ifTrue:[
+ (k := w keyboardProcessor) notNil ifTrue:[
+ ^ k requestForWindowClose
+ ]
+ ]
].
^ true
@@ -4697,16 +4697,8 @@
!ApplicationModel class methodsFor:'documentation'!
-version
- ^ '$Header$'
-!
-
version_CVS
^ '$Header$'
-!
-
-version_FileRepository
- ^ '$Path: stx/libview2/ApplicationModel.st, Version: 1, User: cg, Time: 2018-08-18T16:09:45.930$'
! !