ApplicationModel.st
author Claus Gittinger <cg@exept.de>
Wed, 17 May 2000 19:44:45 +0200
changeset 1372 1395b98e1597
parent 1368 a7f3406239aa
child 1377 85ce073f8a2b
permissions -rw-r--r--
*** empty log message ***
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
50
53bc56e07e8f Initial revision
claus
parents:
diff changeset
     1
"
53bc56e07e8f Initial revision
claus
parents:
diff changeset
     2
 COPYRIGHT (c) 1995 by Claus Gittinger
53bc56e07e8f Initial revision
claus
parents:
diff changeset
     3
	      All Rights Reserved
53bc56e07e8f Initial revision
claus
parents:
diff changeset
     4
53bc56e07e8f Initial revision
claus
parents:
diff changeset
     5
 This software is furnished under a license and may be used
53bc56e07e8f Initial revision
claus
parents:
diff changeset
     6
 only in accordance with the terms of that license and with the
53bc56e07e8f Initial revision
claus
parents:
diff changeset
     7
 inclusion of the above copyright notice.   This software may not
53bc56e07e8f Initial revision
claus
parents:
diff changeset
     8
 be provided or otherwise made available to, or used by, any
53bc56e07e8f Initial revision
claus
parents:
diff changeset
     9
 other person.  No title to or ownership of the software is
53bc56e07e8f Initial revision
claus
parents:
diff changeset
    10
 hereby transferred.
53bc56e07e8f Initial revision
claus
parents:
diff changeset
    11
"
53bc56e07e8f Initial revision
claus
parents:
diff changeset
    12
1368
a7f3406239aa fixed specificationFor - responsibleFor check
tm
parents: 1361
diff changeset
    13
"{ Package: 'stx:libview2' }"
a7f3406239aa fixed specificationFor - responsibleFor check
tm
parents: 1361
diff changeset
    14
50
53bc56e07e8f Initial revision
claus
parents:
diff changeset
    15
Model subclass:#ApplicationModel
588
106b7def4d65 added a handle for a master application (for subApps)
Claus Gittinger <cg@exept.de>
parents: 521
diff changeset
    16
	instanceVariableNames:'builder resources device masterApplication'
389
1af1890c6f0b ST-80 compatibility
Claus Gittinger <cg@exept.de>
parents: 371
diff changeset
    17
	classVariableNames:'DefaultLabels DefaultVisuals'
142
6c6259d788a4 added withReadCursorDo: / withExecuteCursorDo:
Claus Gittinger <cg@exept.de>
parents: 138
diff changeset
    18
	poolDictionaries:''
6c6259d788a4 added withReadCursorDo: / withExecuteCursorDo:
Claus Gittinger <cg@exept.de>
parents: 138
diff changeset
    19
	category:'Interface-Framework'
50
53bc56e07e8f Initial revision
claus
parents:
diff changeset
    20
!
53bc56e07e8f Initial revision
claus
parents:
diff changeset
    21
138
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
    22
ApplicationModel class instanceVariableNames:'ClassResources'
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
    23
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
    24
"
1332
504987f6065c support for delayed update - it may be of general interest
Claus Gittinger <cg@exept.de>
parents: 1330
diff changeset
    25
 No other class instance variables are inherited by this class.
138
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
    26
"
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
    27
!
52
6dc870beba69 *** empty log message ***
claus
parents: 50
diff changeset
    28
361
765fe20a26d1 fixed #openOnDevice:;
Claus Gittinger <cg@exept.de>
parents: 330
diff changeset
    29
!ApplicationModel class methodsFor:'documentation'!
50
53bc56e07e8f Initial revision
claus
parents:
diff changeset
    30
53bc56e07e8f Initial revision
claus
parents:
diff changeset
    31
copyright
53bc56e07e8f Initial revision
claus
parents:
diff changeset
    32
"
53bc56e07e8f Initial revision
claus
parents:
diff changeset
    33
 COPYRIGHT (c) 1995 by Claus Gittinger
53bc56e07e8f Initial revision
claus
parents:
diff changeset
    34
	      All Rights Reserved
53bc56e07e8f Initial revision
claus
parents:
diff changeset
    35
53bc56e07e8f Initial revision
claus
parents:
diff changeset
    36
 This software is furnished under a license and may be used
53bc56e07e8f Initial revision
claus
parents:
diff changeset
    37
 only in accordance with the terms of that license and with the
53bc56e07e8f Initial revision
claus
parents:
diff changeset
    38
 inclusion of the above copyright notice.   This software may not
53bc56e07e8f Initial revision
claus
parents:
diff changeset
    39
 be provided or otherwise made available to, or used by, any
53bc56e07e8f Initial revision
claus
parents:
diff changeset
    40
 other person.  No title to or ownership of the software is
53bc56e07e8f Initial revision
claus
parents:
diff changeset
    41
 hereby transferred.
53bc56e07e8f Initial revision
claus
parents:
diff changeset
    42
"
53bc56e07e8f Initial revision
claus
parents:
diff changeset
    43
!
53bc56e07e8f Initial revision
claus
parents:
diff changeset
    44
53bc56e07e8f Initial revision
claus
parents:
diff changeset
    45
documentation
53bc56e07e8f Initial revision
claus
parents:
diff changeset
    46
"
53bc56e07e8f Initial revision
claus
parents:
diff changeset
    47
    Since many ST-80 classes are subclasses of ApplicationModel, this class
53bc56e07e8f Initial revision
claus
parents:
diff changeset
    48
    is provided here to allow easier porting of ST-80 code.
57
3984019e8f5f *** empty log message ***
claus
parents: 52
diff changeset
    49
429
3311c88f2a0e dialog opening stuff
ca
parents: 428
diff changeset
    50
    It does not (currently) provide all functionality and is NOT
63
claus
parents: 61
diff changeset
    51
    compatible to the corresponding ST80 class; therefore, manual
50
53bc56e07e8f Initial revision
claus
parents:
diff changeset
    52
    changes have to be made to get those applications to run under ST/X.
57
3984019e8f5f *** empty log message ***
claus
parents: 52
diff changeset
    53
    (but at least, this enables you to fileIn that code and have a superclass
78
claus
parents: 72
diff changeset
    54
     for them)
claus
parents: 72
diff changeset
    55
claus
parents: 72
diff changeset
    56
    As time goes by, ST/X applications are going to be converted to
330
d7ce98930ad3 Rename Launcher-->OldLauncher, NewLauncher-->Launcher.
Stefan Vogel <sv@exept.de>
parents: 313
diff changeset
    57
    become subclasses of this abstract class - see Launcher for a
78
claus
parents: 72
diff changeset
    58
    first concrete example.
claus
parents: 72
diff changeset
    59
215
369b0376e859 commentary
Claus Gittinger <cg@exept.de>
parents: 187
diff changeset
    60
78
claus
parents: 72
diff changeset
    61
    ApplicationModel is prepared to build a view from a windowSpec, as
215
369b0376e859 commentary
Claus Gittinger <cg@exept.de>
parents: 187
diff changeset
    62
    created by the windowBuilder. If your subclass does not provide such
78
claus
parents: 72
diff changeset
    63
    a spec, you should at least redefine:
claus
parents: 72
diff changeset
    64
215
369b0376e859 commentary
Claus Gittinger <cg@exept.de>
parents: 187
diff changeset
    65
        #openInterface   - to create a topview and open it
78
claus
parents: 72
diff changeset
    66
claus
parents: 72
diff changeset
    67
    you may want to redefine:
claus
parents: 72
diff changeset
    68
215
369b0376e859 commentary
Claus Gittinger <cg@exept.de>
parents: 187
diff changeset
    69
        #closeRequest    - to catch window closing
369b0376e859 commentary
Claus Gittinger <cg@exept.de>
parents: 187
diff changeset
    70
        #focusSequence   - to define a sequence for focus-stepping
78
claus
parents: 72
diff changeset
    71
50
53bc56e07e8f Initial revision
claus
parents:
diff changeset
    72
215
369b0376e859 commentary
Claus Gittinger <cg@exept.de>
parents: 187
diff changeset
    73
    Once the interfaceBuilder is finished & released, subclasses can
369b0376e859 commentary
Claus Gittinger <cg@exept.de>
parents: 187
diff changeset
    74
    alternatively provide the spec via a #windowSpec method.
369b0376e859 commentary
Claus Gittinger <cg@exept.de>
parents: 187
diff changeset
    75
52
6dc870beba69 *** empty log message ***
claus
parents: 50
diff changeset
    76
    The classResources have been put into this class to allow ST/X
57
3984019e8f5f *** empty log message ***
claus
parents: 52
diff changeset
    77
    applications (which used to be subclasses of StandardSystemView)
3984019e8f5f *** empty log message ***
claus
parents: 52
diff changeset
    78
    to migrate smoothly into ApplicationModels (which is better design ...).
52
6dc870beba69 *** empty log message ***
claus
parents: 50
diff changeset
    79
6dc870beba69 *** empty log message ***
claus
parents: 50
diff changeset
    80
215
369b0376e859 commentary
Claus Gittinger <cg@exept.de>
parents: 187
diff changeset
    81
    [Instance variables:]
369b0376e859 commentary
Claus Gittinger <cg@exept.de>
parents: 187
diff changeset
    82
        resources    ResourcePack       language string translation
369b0376e859 commentary
Claus Gittinger <cg@exept.de>
parents: 187
diff changeset
    83
369b0376e859 commentary
Claus Gittinger <cg@exept.de>
parents: 187
diff changeset
    84
        builder      WindowBuilder      a builder who knows how to create
369b0376e859 commentary
Claus Gittinger <cg@exept.de>
parents: 187
diff changeset
    85
                                        a window hierarchy from a specification
78
claus
parents: 72
diff changeset
    86
claus
parents: 72
diff changeset
    87
claus
parents: 72
diff changeset
    88
    Notice: this class was implemented using protocol information
claus
parents: 72
diff changeset
    89
    from alpha testers and PD code - it may not be complete or compatible to
claus
parents: 72
diff changeset
    90
    the corresponding ST-80 class. If you encounter any incompatibilities,
claus
parents: 72
diff changeset
    91
    please forward a note to the ST/X team.
215
369b0376e859 commentary
Claus Gittinger <cg@exept.de>
parents: 187
diff changeset
    92
369b0376e859 commentary
Claus Gittinger <cg@exept.de>
parents: 187
diff changeset
    93
221
ea942fe5dc04 documentation
Claus Gittinger <cg@exept.de>
parents: 215
diff changeset
    94
    [author:]
ea942fe5dc04 documentation
Claus Gittinger <cg@exept.de>
parents: 215
diff changeset
    95
        Claus Gittinger
ea942fe5dc04 documentation
Claus Gittinger <cg@exept.de>
parents: 215
diff changeset
    96
215
369b0376e859 commentary
Claus Gittinger <cg@exept.de>
parents: 187
diff changeset
    97
    [see also:]
369b0376e859 commentary
Claus Gittinger <cg@exept.de>
parents: 187
diff changeset
    98
        StandardSystemView
369b0376e859 commentary
Claus Gittinger <cg@exept.de>
parents: 187
diff changeset
    99
        WindowGroup DeviceWorkstation
50
53bc56e07e8f Initial revision
claus
parents:
diff changeset
   100
"
53bc56e07e8f Initial revision
claus
parents:
diff changeset
   101
! !
53bc56e07e8f Initial revision
claus
parents:
diff changeset
   102
361
765fe20a26d1 fixed #openOnDevice:;
Claus Gittinger <cg@exept.de>
parents: 330
diff changeset
   103
!ApplicationModel class methodsFor:'initialization'!
52
6dc870beba69 *** empty log message ***
claus
parents: 50
diff changeset
   104
6dc870beba69 *** empty log message ***
claus
parents: 50
diff changeset
   105
initialize 
6dc870beba69 *** empty log message ***
claus
parents: 50
diff changeset
   106
    self == ApplicationModel ifTrue:[
389
1af1890c6f0b ST-80 compatibility
Claus Gittinger <cg@exept.de>
parents: 371
diff changeset
   107
        Smalltalk addDependent:self
1af1890c6f0b ST-80 compatibility
Claus Gittinger <cg@exept.de>
parents: 371
diff changeset
   108
    ].
1af1890c6f0b ST-80 compatibility
Claus Gittinger <cg@exept.de>
parents: 371
diff changeset
   109
    DefaultLabels isNil ifTrue:[
1af1890c6f0b ST-80 compatibility
Claus Gittinger <cg@exept.de>
parents: 371
diff changeset
   110
        DefaultLabels := IdentityDictionary new
1af1890c6f0b ST-80 compatibility
Claus Gittinger <cg@exept.de>
parents: 371
diff changeset
   111
    ].
1af1890c6f0b ST-80 compatibility
Claus Gittinger <cg@exept.de>
parents: 371
diff changeset
   112
    DefaultVisuals isNil ifTrue:[
1af1890c6f0b ST-80 compatibility
Claus Gittinger <cg@exept.de>
parents: 371
diff changeset
   113
        DefaultVisuals := IdentityDictionary new
1af1890c6f0b ST-80 compatibility
Claus Gittinger <cg@exept.de>
parents: 371
diff changeset
   114
    ].
52
6dc870beba69 *** empty log message ***
claus
parents: 50
diff changeset
   115
6dc870beba69 *** empty log message ***
claus
parents: 50
diff changeset
   116
    "
6dc870beba69 *** empty log message ***
claus
parents: 50
diff changeset
   117
     ApplicationModel initialize
6dc870beba69 *** empty log message ***
claus
parents: 50
diff changeset
   118
    "
389
1af1890c6f0b ST-80 compatibility
Claus Gittinger <cg@exept.de>
parents: 371
diff changeset
   119
1af1890c6f0b ST-80 compatibility
Claus Gittinger <cg@exept.de>
parents: 371
diff changeset
   120
    "Modified: 28.1.1997 / 12:31:38 / cg"
52
6dc870beba69 *** empty log message ***
claus
parents: 50
diff changeset
   121
! !
6dc870beba69 *** empty log message ***
claus
parents: 50
diff changeset
   122
361
765fe20a26d1 fixed #openOnDevice:;
Claus Gittinger <cg@exept.de>
parents: 330
diff changeset
   123
!ApplicationModel class methodsFor:'instance creation'!
52
6dc870beba69 *** empty log message ***
claus
parents: 50
diff changeset
   124
6dc870beba69 *** empty log message ***
claus
parents: 50
diff changeset
   125
new
215
369b0376e859 commentary
Claus Gittinger <cg@exept.de>
parents: 187
diff changeset
   126
    "return a new initialized instance"
369b0376e859 commentary
Claus Gittinger <cg@exept.de>
parents: 187
diff changeset
   127
1372
1395b98e1597 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
   128
    |inst|
1395b98e1597 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
   129
1395b98e1597 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
   130
    inst := super basicNew.
1395b98e1597 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
   131
    inst basicInitialize.
1395b98e1597 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
   132
    inst initialize.
1395b98e1597 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
   133
    ^ inst
215
369b0376e859 commentary
Claus Gittinger <cg@exept.de>
parents: 187
diff changeset
   134
369b0376e859 commentary
Claus Gittinger <cg@exept.de>
parents: 187
diff changeset
   135
    "Modified: 24.4.1996 / 09:42:14 / cg"
311
fa222d8a208c allow opening an app on another device
Claus Gittinger <cg@exept.de>
parents: 310
diff changeset
   136
!
fa222d8a208c allow opening an app on another device
Claus Gittinger <cg@exept.de>
parents: 310
diff changeset
   137
fa222d8a208c allow opening an app on another device
Claus Gittinger <cg@exept.de>
parents: 310
diff changeset
   138
onDevice:aDevice
fa222d8a208c allow opening an app on another device
Claus Gittinger <cg@exept.de>
parents: 310
diff changeset
   139
    "return a new initialized instance, which shall open its interface
fa222d8a208c allow opening an app on another device
Claus Gittinger <cg@exept.de>
parents: 310
diff changeset
   140
     on aDevice."
fa222d8a208c allow opening an app on another device
Claus Gittinger <cg@exept.de>
parents: 310
diff changeset
   141
1110
2977fe9f2184 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1109
diff changeset
   142
    ^ (super basicNew basicInitialize
311
fa222d8a208c allow opening an app on another device
Claus Gittinger <cg@exept.de>
parents: 310
diff changeset
   143
        setDevice:aDevice) initialize
fa222d8a208c allow opening an app on another device
Claus Gittinger <cg@exept.de>
parents: 310
diff changeset
   144
fa222d8a208c allow opening an app on another device
Claus Gittinger <cg@exept.de>
parents: 310
diff changeset
   145
    "Modified: 24.4.1996 / 09:42:14 / cg"
fa222d8a208c allow opening an app on another device
Claus Gittinger <cg@exept.de>
parents: 310
diff changeset
   146
    "Created: 5.7.1996 / 12:19:15 / cg"
52
6dc870beba69 *** empty log message ***
claus
parents: 50
diff changeset
   147
! !
6dc870beba69 *** empty log message ***
claus
parents: 50
diff changeset
   148
421
e163e734b31c changed binding access
ca
parents: 402
diff changeset
   149
!ApplicationModel class methodsFor:'accessing'!
e163e734b31c changed binding access
ca
parents: 402
diff changeset
   150
e163e734b31c changed binding access
ca
parents: 402
diff changeset
   151
application
e163e734b31c changed binding access
ca
parents: 402
diff changeset
   152
    ^ self
e163e734b31c changed binding access
ca
parents: 402
diff changeset
   153
e163e734b31c changed binding access
ca
parents: 402
diff changeset
   154
! !
e163e734b31c changed binding access
ca
parents: 402
diff changeset
   155
599
681af9f06019 help features
ca
parents: 594
diff changeset
   156
!ApplicationModel class methodsFor:'active help'!
681af9f06019 help features
ca
parents: 594
diff changeset
   157
681af9f06019 help features
ca
parents: 594
diff changeset
   158
helpSpec
681af9f06019 help features
ca
parents: 594
diff changeset
   159
    ^ IdentityDictionary new.
681af9f06019 help features
ca
parents: 594
diff changeset
   160
! !
681af9f06019 help features
ca
parents: 594
diff changeset
   161
421
e163e734b31c changed binding access
ca
parents: 402
diff changeset
   162
!ApplicationModel class methodsFor:'bindings'!
e163e734b31c changed binding access
ca
parents: 402
diff changeset
   163
e163e734b31c changed binding access
ca
parents: 402
diff changeset
   164
actionFor:aKey
e163e734b31c changed binding access
ca
parents: 402
diff changeset
   165
    "sent by the builder to ask for an actionBlock for
e163e734b31c changed binding access
ca
parents: 402
diff changeset
   166
     a Button. The argument, aKey comes from an UI-spec
e163e734b31c changed binding access
ca
parents: 402
diff changeset
   167
     for a buttons #action property.
e163e734b31c changed binding access
ca
parents: 402
diff changeset
   168
     Here, a corresponding message is sent to myself,
e163e734b31c changed binding access
ca
parents: 402
diff changeset
   169
     which ought to be defined in the application subclass.
e163e734b31c changed binding access
ca
parents: 402
diff changeset
   170
     Alternatively, a subclass may redefine this method, to provide
e163e734b31c changed binding access
ca
parents: 402
diff changeset
   171
     actionBlocks from a Dictionary or whatever.
e163e734b31c changed binding access
ca
parents: 402
diff changeset
   172
     Typically, a block is returned there."
e163e734b31c changed binding access
ca
parents: 402
diff changeset
   173
e163e734b31c changed binding access
ca
parents: 402
diff changeset
   174
    ^ nil
e163e734b31c changed binding access
ca
parents: 402
diff changeset
   175
e163e734b31c changed binding access
ca
parents: 402
diff changeset
   176
e163e734b31c changed binding access
ca
parents: 402
diff changeset
   177
!
e163e734b31c changed binding access
ca
parents: 402
diff changeset
   178
715
bedd651e731c actionFor:aKey withValue:aValue
ca
parents: 713
diff changeset
   179
actionFor:aKey withValue:aValue
bedd651e731c actionFor:aKey withValue:aValue
ca
parents: 713
diff changeset
   180
    "sent by the builder to ask for an actionBlock for
bedd651e731c actionFor:aKey withValue:aValue
ca
parents: 713
diff changeset
   181
     a Button which passes a value to the actionMethod. 
bedd651e731c actionFor:aKey withValue:aValue
ca
parents: 713
diff changeset
   182
     The argument, aKey comes from an UI-spec
bedd651e731c actionFor:aKey withValue:aValue
ca
parents: 713
diff changeset
   183
     for a buttons #action property.
bedd651e731c actionFor:aKey withValue:aValue
ca
parents: 713
diff changeset
   184
     Here, a corresponding message is sent to myself,
bedd651e731c actionFor:aKey withValue:aValue
ca
parents: 713
diff changeset
   185
     which ought to be defined in the application subclass.
bedd651e731c actionFor:aKey withValue:aValue
ca
parents: 713
diff changeset
   186
     Alternatively, a subclass may redefine this method, to provide
bedd651e731c actionFor:aKey withValue:aValue
ca
parents: 713
diff changeset
   187
     actionBlocks from a Dictionary or whatever.
bedd651e731c actionFor:aKey withValue:aValue
ca
parents: 713
diff changeset
   188
     Typically, a block is returned there."
bedd651e731c actionFor:aKey withValue:aValue
ca
parents: 713
diff changeset
   189
bedd651e731c actionFor:aKey withValue:aValue
ca
parents: 713
diff changeset
   190
    ^ nil
bedd651e731c actionFor:aKey withValue:aValue
ca
parents: 713
diff changeset
   191
bedd651e731c actionFor:aKey withValue:aValue
ca
parents: 713
diff changeset
   192
bedd651e731c actionFor:aKey withValue:aValue
ca
parents: 713
diff changeset
   193
!
bedd651e731c actionFor:aKey withValue:aValue
ca
parents: 713
diff changeset
   194
421
e163e734b31c changed binding access
ca
parents: 402
diff changeset
   195
aspectFor:aKey
e163e734b31c changed binding access
ca
parents: 402
diff changeset
   196
    "sent by the builder to ask for an aspect (a data model).
e163e734b31c changed binding access
ca
parents: 402
diff changeset
   197
     The argument, aKey comes from an UI-spec
e163e734b31c changed binding access
ca
parents: 402
diff changeset
   198
     for a components #aspect property.
e163e734b31c changed binding access
ca
parents: 402
diff changeset
   199
     Here, a corresponding message is sent to myself,
e163e734b31c changed binding access
ca
parents: 402
diff changeset
   200
     which ought to be defined in the application subclass.
e163e734b31c changed binding access
ca
parents: 402
diff changeset
   201
     Alternatively, a subclass may redefine this method, to provide
e163e734b31c changed binding access
ca
parents: 402
diff changeset
   202
     holders from a Dictionary or whatever.
e163e734b31c changed binding access
ca
parents: 402
diff changeset
   203
     Typically, a valueHolder is returned there."
e163e734b31c changed binding access
ca
parents: 402
diff changeset
   204
723
1b6645c38f89 class queries for aspect
Claus Gittinger <cg@exept.de>
parents: 715
diff changeset
   205
    ^ self perform:aKey
421
e163e734b31c changed binding access
ca
parents: 402
diff changeset
   206
723
1b6645c38f89 class queries for aspect
Claus Gittinger <cg@exept.de>
parents: 715
diff changeset
   207
    "/ ^ nil
1b6645c38f89 class queries for aspect
Claus Gittinger <cg@exept.de>
parents: 715
diff changeset
   208
1b6645c38f89 class queries for aspect
Claus Gittinger <cg@exept.de>
parents: 715
diff changeset
   209
    "Modified: / 27.10.1997 / 13:43:12 / cg"
421
e163e734b31c changed binding access
ca
parents: 402
diff changeset
   210
!
e163e734b31c changed binding access
ca
parents: 402
diff changeset
   211
e163e734b31c changed binding access
ca
parents: 402
diff changeset
   212
clientFor:aKey
e163e734b31c changed binding access
ca
parents: 402
diff changeset
   213
    "sent by the builder to ask for an application provided
e163e734b31c changed binding access
ca
parents: 402
diff changeset
   214
     subcanvas's application.
e163e734b31c changed binding access
ca
parents: 402
diff changeset
   215
     The argument, aKey comes from an UI-spec
e163e734b31c changed binding access
ca
parents: 402
diff changeset
   216
     for a subcanvas's #client property.
e163e734b31c changed binding access
ca
parents: 402
diff changeset
   217
     Here, a corresponding message is sent to myself,
e163e734b31c changed binding access
ca
parents: 402
diff changeset
   218
     which ought to be defined in the application subclass.
e163e734b31c changed binding access
ca
parents: 402
diff changeset
   219
     Alternatively, a subclass may redefine this method, to provide
e163e734b31c changed binding access
ca
parents: 402
diff changeset
   220
     appModels from a Dictionary or whatever.
e163e734b31c changed binding access
ca
parents: 402
diff changeset
   221
     Typically, an applicationModel is returned there."
e163e734b31c changed binding access
ca
parents: 402
diff changeset
   222
e163e734b31c changed binding access
ca
parents: 402
diff changeset
   223
    ^ nil
e163e734b31c changed binding access
ca
parents: 402
diff changeset
   224
e163e734b31c changed binding access
ca
parents: 402
diff changeset
   225
!
e163e734b31c changed binding access
ca
parents: 402
diff changeset
   226
e163e734b31c changed binding access
ca
parents: 402
diff changeset
   227
componentFor:aKey
e163e734b31c changed binding access
ca
parents: 402
diff changeset
   228
    "sent by the builder to ask for an application provided
e163e734b31c changed binding access
ca
parents: 402
diff changeset
   229
     component.
e163e734b31c changed binding access
ca
parents: 402
diff changeset
   230
     The argument, aKey comes from an UI-spec
e163e734b31c changed binding access
ca
parents: 402
diff changeset
   231
     for a viewHolders #view property.
e163e734b31c changed binding access
ca
parents: 402
diff changeset
   232
     Here, a corresponding message is sent to myself,
e163e734b31c changed binding access
ca
parents: 402
diff changeset
   233
     which ought to be defined in the application subclass.
e163e734b31c changed binding access
ca
parents: 402
diff changeset
   234
     Alternatively, a subclass may redefine this method, to provide
e163e734b31c changed binding access
ca
parents: 402
diff changeset
   235
     holders from a Dictionary or whatever.
e163e734b31c changed binding access
ca
parents: 402
diff changeset
   236
     Typically, a view is returned there."
e163e734b31c changed binding access
ca
parents: 402
diff changeset
   237
427
e8dffb2f3e1e checkin from browser
ca
parents: 421
diff changeset
   238
    (self respondsTo:aKey) ifTrue:[
e8dffb2f3e1e checkin from browser
ca
parents: 421
diff changeset
   239
        ^ self perform:aKey
e8dffb2f3e1e checkin from browser
ca
parents: 421
diff changeset
   240
    ].
e8dffb2f3e1e checkin from browser
ca
parents: 421
diff changeset
   241
    ^ nil
421
e163e734b31c changed binding access
ca
parents: 402
diff changeset
   242
!
e163e734b31c changed binding access
ca
parents: 402
diff changeset
   243
e163e734b31c changed binding access
ca
parents: 402
diff changeset
   244
labelFor:aKey
e163e734b31c changed binding access
ca
parents: 402
diff changeset
   245
    "sent by the builder to ask for an application provided
e163e734b31c changed binding access
ca
parents: 402
diff changeset
   246
     label for a component.
e163e734b31c changed binding access
ca
parents: 402
diff changeset
   247
     The argument, aKey comes from an UI-spec
e163e734b31c changed binding access
ca
parents: 402
diff changeset
   248
     for a components #label property.
e163e734b31c changed binding access
ca
parents: 402
diff changeset
   249
     Here, a corresponding message is sent to myself,
e163e734b31c changed binding access
ca
parents: 402
diff changeset
   250
     which ought to be defined in the application subclass.
e163e734b31c changed binding access
ca
parents: 402
diff changeset
   251
     Alternatively, a subclass may redefine this method, to provide
e163e734b31c changed binding access
ca
parents: 402
diff changeset
   252
     labels from a Dictionary or whatever.
e163e734b31c changed binding access
ca
parents: 402
diff changeset
   253
     Typically, a string is returned there."
e163e734b31c changed binding access
ca
parents: 402
diff changeset
   254
e163e734b31c changed binding access
ca
parents: 402
diff changeset
   255
    (self application respondsTo:aKey) ifTrue:[
e163e734b31c changed binding access
ca
parents: 402
diff changeset
   256
        ^ self application perform:aKey
e163e734b31c changed binding access
ca
parents: 402
diff changeset
   257
    ].
e163e734b31c changed binding access
ca
parents: 402
diff changeset
   258
    ^ self application labelAt:aKey ifAbsent:nil
e163e734b31c changed binding access
ca
parents: 402
diff changeset
   259
e163e734b31c changed binding access
ca
parents: 402
diff changeset
   260
!
e163e734b31c changed binding access
ca
parents: 402
diff changeset
   261
e163e734b31c changed binding access
ca
parents: 402
diff changeset
   262
listFor:aKey
e163e734b31c changed binding access
ca
parents: 402
diff changeset
   263
    "sent by the builder to ask for an application provided
e163e734b31c changed binding access
ca
parents: 402
diff changeset
   264
     holder for a list.
e163e734b31c changed binding access
ca
parents: 402
diff changeset
   265
     The argument, aKey comes from an UI-spec
e163e734b31c changed binding access
ca
parents: 402
diff changeset
   266
     for a listWidgets #list property.
e163e734b31c changed binding access
ca
parents: 402
diff changeset
   267
     Here, a corresponding message is sent to myself,
e163e734b31c changed binding access
ca
parents: 402
diff changeset
   268
     which ought to be defined in the application subclass.
e163e734b31c changed binding access
ca
parents: 402
diff changeset
   269
     Alternatively, a subclass may redefine this method, to provide
e163e734b31c changed binding access
ca
parents: 402
diff changeset
   270
     holders from a Dictionary or whatever.
e163e734b31c changed binding access
ca
parents: 402
diff changeset
   271
     Typically, a list-holding model (SelectionInList) is returned there."
e163e734b31c changed binding access
ca
parents: 402
diff changeset
   272
483
bf49c2e7285f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 482
diff changeset
   273
    |app|
421
e163e734b31c changed binding access
ca
parents: 402
diff changeset
   274
483
bf49c2e7285f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 482
diff changeset
   275
    (app := self application) notNil ifTrue:[
bf49c2e7285f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 482
diff changeset
   276
        (app respondsTo:aKey) ifTrue:[
bf49c2e7285f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 482
diff changeset
   277
            ^ app perform:aKey
bf49c2e7285f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 482
diff changeset
   278
        ]
bf49c2e7285f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 482
diff changeset
   279
    ].
bf49c2e7285f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 482
diff changeset
   280
    ^ nil.
bf49c2e7285f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 482
diff changeset
   281
bf49c2e7285f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 482
diff changeset
   282
    "Modified: 4.3.1997 / 00:53:03 / cg"
421
e163e734b31c changed binding access
ca
parents: 402
diff changeset
   283
!
e163e734b31c changed binding access
ca
parents: 402
diff changeset
   284
e163e734b31c changed binding access
ca
parents: 402
diff changeset
   285
menuFor:aKey
e163e734b31c changed binding access
ca
parents: 402
diff changeset
   286
    "sent by the builder to ask for an application provided
e163e734b31c changed binding access
ca
parents: 402
diff changeset
   287
     holder for a menu.
e163e734b31c changed binding access
ca
parents: 402
diff changeset
   288
     The argument, aKey comes from an UI-spec
e163e734b31c changed binding access
ca
parents: 402
diff changeset
   289
     for a widgets #menu property.
e163e734b31c changed binding access
ca
parents: 402
diff changeset
   290
     Here, a corresponding message is sent to myself,
e163e734b31c changed binding access
ca
parents: 402
diff changeset
   291
     which ought to be defined in the application subclass.
e163e734b31c changed binding access
ca
parents: 402
diff changeset
   292
     Alternatively, a subclass may redefine this method, to provide
e163e734b31c changed binding access
ca
parents: 402
diff changeset
   293
     holders from a Dictionary or whatever.
e163e734b31c changed binding access
ca
parents: 402
diff changeset
   294
     Typically, a menu or a menu-holding valueHolder is returned there."
e163e734b31c changed binding access
ca
parents: 402
diff changeset
   295
e163e734b31c changed binding access
ca
parents: 402
diff changeset
   296
    ^ self application perform:aKey
e163e734b31c changed binding access
ca
parents: 402
diff changeset
   297
e163e734b31c changed binding access
ca
parents: 402
diff changeset
   298
!
e163e734b31c changed binding access
ca
parents: 402
diff changeset
   299
e163e734b31c changed binding access
ca
parents: 402
diff changeset
   300
specificationFor:aKey
e163e734b31c changed binding access
ca
parents: 402
diff changeset
   301
    "sent by the builder to ask for an application provided
825
98429ad39f5d #specificationFor: asks the class about the window specification.
Stefan Vogel <sv@exept.de>
parents: 788
diff changeset
   302
     specification for a subcanvas or subspecification.
421
e163e734b31c changed binding access
ca
parents: 402
diff changeset
   303
     The argument, aKey comes from an UI-spec
825
98429ad39f5d #specificationFor: asks the class about the window specification.
Stefan Vogel <sv@exept.de>
parents: 788
diff changeset
   304
     for a subcanvases #specification property (minorKey).
421
e163e734b31c changed binding access
ca
parents: 402
diff changeset
   305
     Here, a corresponding message is sent to myself,
e163e734b31c changed binding access
ca
parents: 402
diff changeset
   306
     which ought to be defined in the application subclass.
e163e734b31c changed binding access
ca
parents: 402
diff changeset
   307
     Alternatively, a subclass may redefine this method, to provide
825
98429ad39f5d #specificationFor: asks the class about the window specification.
Stefan Vogel <sv@exept.de>
parents: 788
diff changeset
   308
     interfaceSpecifications from a Dictionary or whatever.
98429ad39f5d #specificationFor: asks the class about the window specification.
Stefan Vogel <sv@exept.de>
parents: 788
diff changeset
   309
     Typically, an interfaceSpecification is returned there."
421
e163e734b31c changed binding access
ca
parents: 402
diff changeset
   310
e163e734b31c changed binding access
ca
parents: 402
diff changeset
   311
    ^ self application perform:aKey
e163e734b31c changed binding access
ca
parents: 402
diff changeset
   312
825
98429ad39f5d #specificationFor: asks the class about the window specification.
Stefan Vogel <sv@exept.de>
parents: 788
diff changeset
   313
    "Modified: / 5.2.1998 / 00:21:57 / stefan"
421
e163e734b31c changed binding access
ca
parents: 402
diff changeset
   314
!
e163e734b31c changed binding access
ca
parents: 402
diff changeset
   315
e163e734b31c changed binding access
ca
parents: 402
diff changeset
   316
visualFor:aKey
e163e734b31c changed binding access
ca
parents: 402
diff changeset
   317
    "sent by the builder to ask for an application provided
e163e734b31c changed binding access
ca
parents: 402
diff changeset
   318
     image or element for a label.
e163e734b31c changed binding access
ca
parents: 402
diff changeset
   319
     The argument, aKey comes from an UI-spec
e163e734b31c changed binding access
ca
parents: 402
diff changeset
   320
     for a widgets #label property, if LabelIsImage is turned on.
e163e734b31c changed binding access
ca
parents: 402
diff changeset
   321
     Here, a corresponding message is sent to myself,
e163e734b31c changed binding access
ca
parents: 402
diff changeset
   322
     which ought to be defined in the application subclass.
e163e734b31c changed binding access
ca
parents: 402
diff changeset
   323
     Alternatively, a subclass may redefine this method, to provide
e163e734b31c changed binding access
ca
parents: 402
diff changeset
   324
     images from a Dictionary or whatever.
e163e734b31c changed binding access
ca
parents: 402
diff changeset
   325
     Typically, an image is returned there."
e163e734b31c changed binding access
ca
parents: 402
diff changeset
   326
e163e734b31c changed binding access
ca
parents: 402
diff changeset
   327
    (self application respondsTo:aKey) ifTrue:[
e163e734b31c changed binding access
ca
parents: 402
diff changeset
   328
        ^ self application perform:aKey
e163e734b31c changed binding access
ca
parents: 402
diff changeset
   329
    ].
e163e734b31c changed binding access
ca
parents: 402
diff changeset
   330
    ^ self application visualAt:aKey ifAbsent:nil
e163e734b31c changed binding access
ca
parents: 402
diff changeset
   331
e163e734b31c changed binding access
ca
parents: 402
diff changeset
   332
e163e734b31c changed binding access
ca
parents: 402
diff changeset
   333
! !
e163e734b31c changed binding access
ca
parents: 402
diff changeset
   334
361
765fe20a26d1 fixed #openOnDevice:;
Claus Gittinger <cg@exept.de>
parents: 330
diff changeset
   335
!ApplicationModel class methodsFor:'change & update'!
52
6dc870beba69 *** empty log message ***
claus
parents: 50
diff changeset
   336
302
edd5c8754ac8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 287
diff changeset
   337
update:something with:aParameter from:changedObject
69
claus
parents: 63
diff changeset
   338
    "flush resources on language changes"
claus
parents: 63
diff changeset
   339
52
6dc870beba69 *** empty log message ***
claus
parents: 50
diff changeset
   340
    something == #Language ifTrue:[
302
edd5c8754ac8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 287
diff changeset
   341
        "flush resources on language changes"
edd5c8754ac8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 287
diff changeset
   342
        self flushAllClassResources
52
6dc870beba69 *** empty log message ***
claus
parents: 50
diff changeset
   343
    ]
302
edd5c8754ac8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 287
diff changeset
   344
edd5c8754ac8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 287
diff changeset
   345
    "Created: 15.6.1996 / 15:13:29 / cg"
52
6dc870beba69 *** empty log message ***
claus
parents: 50
diff changeset
   346
! !
6dc870beba69 *** empty log message ***
claus
parents: 50
diff changeset
   347
421
e163e734b31c changed binding access
ca
parents: 402
diff changeset
   348
!ApplicationModel class methodsFor:'defaults'!
e163e734b31c changed binding access
ca
parents: 402
diff changeset
   349
1194
38f0d0580956 provide a default about dialog
Claus Gittinger <cg@exept.de>
parents: 1152
diff changeset
   350
defaultIcon
38f0d0580956 provide a default about dialog
Claus Gittinger <cg@exept.de>
parents: 1152
diff changeset
   351
    ^ nil
38f0d0580956 provide a default about dialog
Claus Gittinger <cg@exept.de>
parents: 1152
diff changeset
   352
!
38f0d0580956 provide a default about dialog
Claus Gittinger <cg@exept.de>
parents: 1152
diff changeset
   353
421
e163e734b31c changed binding access
ca
parents: 402
diff changeset
   354
labelAt:aKey
e163e734b31c changed binding access
ca
parents: 402
diff changeset
   355
    ^ nil
e163e734b31c changed binding access
ca
parents: 402
diff changeset
   356
!
e163e734b31c changed binding access
ca
parents: 402
diff changeset
   357
e163e734b31c changed binding access
ca
parents: 402
diff changeset
   358
labelAt:aKey ifAbsent:aBlock
e163e734b31c changed binding access
ca
parents: 402
diff changeset
   359
    ^ aBlock value
e163e734b31c changed binding access
ca
parents: 402
diff changeset
   360
!
e163e734b31c changed binding access
ca
parents: 402
diff changeset
   361
e163e734b31c changed binding access
ca
parents: 402
diff changeset
   362
labelAt:aKey put:aValue
e163e734b31c changed binding access
ca
parents: 402
diff changeset
   363
    "/ not yet implemented
e163e734b31c changed binding access
ca
parents: 402
diff changeset
   364
!
e163e734b31c changed binding access
ca
parents: 402
diff changeset
   365
e163e734b31c changed binding access
ca
parents: 402
diff changeset
   366
labels
e163e734b31c changed binding access
ca
parents: 402
diff changeset
   367
    "/ not yet implemented
e163e734b31c changed binding access
ca
parents: 402
diff changeset
   368
    ^ nil
e163e734b31c changed binding access
ca
parents: 402
diff changeset
   369
!
e163e734b31c changed binding access
ca
parents: 402
diff changeset
   370
e163e734b31c changed binding access
ca
parents: 402
diff changeset
   371
visualAt:aKey
e163e734b31c changed binding access
ca
parents: 402
diff changeset
   372
    ^ nil
e163e734b31c changed binding access
ca
parents: 402
diff changeset
   373
!
e163e734b31c changed binding access
ca
parents: 402
diff changeset
   374
e163e734b31c changed binding access
ca
parents: 402
diff changeset
   375
visualAt:aKey ifAbsent:aBlock
e163e734b31c changed binding access
ca
parents: 402
diff changeset
   376
    ^ aBlock value
e163e734b31c changed binding access
ca
parents: 402
diff changeset
   377
!
e163e734b31c changed binding access
ca
parents: 402
diff changeset
   378
e163e734b31c changed binding access
ca
parents: 402
diff changeset
   379
visualAt:aKey put:aValue
e163e734b31c changed binding access
ca
parents: 402
diff changeset
   380
    "/ not yet implemented
e163e734b31c changed binding access
ca
parents: 402
diff changeset
   381
!
e163e734b31c changed binding access
ca
parents: 402
diff changeset
   382
e163e734b31c changed binding access
ca
parents: 402
diff changeset
   383
visuals
e163e734b31c changed binding access
ca
parents: 402
diff changeset
   384
    "/ not yet implemented
e163e734b31c changed binding access
ca
parents: 402
diff changeset
   385
    ^ nil
e163e734b31c changed binding access
ca
parents: 402
diff changeset
   386
! !
e163e734b31c changed binding access
ca
parents: 402
diff changeset
   387
361
765fe20a26d1 fixed #openOnDevice:;
Claus Gittinger <cg@exept.de>
parents: 330
diff changeset
   388
!ApplicationModel class methodsFor:'queries'!
63
claus
parents: 61
diff changeset
   389
claus
parents: 61
diff changeset
   390
interfaceSpecFor:aSelector
69
claus
parents: 63
diff changeset
   391
    "return an interface spec"
claus
parents: 63
diff changeset
   392
421
e163e734b31c changed binding access
ca
parents: 402
diff changeset
   393
    ^ UISpecification from:(self application specificationFor:aSelector)
723
1b6645c38f89 class queries for aspect
Claus Gittinger <cg@exept.de>
parents: 715
diff changeset
   394
!
1b6645c38f89 class queries for aspect
Claus Gittinger <cg@exept.de>
parents: 715
diff changeset
   395
1b6645c38f89 class queries for aspect
Claus Gittinger <cg@exept.de>
parents: 715
diff changeset
   396
isVisualStartable
1b6645c38f89 class queries for aspect
Claus Gittinger <cg@exept.de>
parents: 715
diff changeset
   397
    "return true, if this application can be started via #open"
1b6645c38f89 class queries for aspect
Claus Gittinger <cg@exept.de>
parents: 715
diff changeset
   398
1b6645c38f89 class queries for aspect
Claus Gittinger <cg@exept.de>
parents: 715
diff changeset
   399
    (self == ApplicationModel) ifTrue:[^ false "I am abstract"].
866
69fc17d99254 also allow for non-windowSpec applications to be opened via dbl-click
Claus Gittinger <cg@exept.de>
parents: 852
diff changeset
   400
    ((self respondsTo:#open) or:[self class implements:#openInterface]) ifFalse:[^ false].
69fc17d99254 also allow for non-windowSpec applications to be opened via dbl-click
Claus Gittinger <cg@exept.de>
parents: 852
diff changeset
   401
"/    (self respondsTo:#windowSpec) ifFalse:[^ false].
723
1b6645c38f89 class queries for aspect
Claus Gittinger <cg@exept.de>
parents: 715
diff changeset
   402
    ^ true
1b6645c38f89 class queries for aspect
Claus Gittinger <cg@exept.de>
parents: 715
diff changeset
   403
1b6645c38f89 class queries for aspect
Claus Gittinger <cg@exept.de>
parents: 715
diff changeset
   404
    "Created: / 27.10.1997 / 16:38:02 / cg"
866
69fc17d99254 also allow for non-windowSpec applications to be opened via dbl-click
Claus Gittinger <cg@exept.de>
parents: 852
diff changeset
   405
    "Modified: / 14.3.1998 / 16:30:50 / cg"
63
claus
parents: 61
diff changeset
   406
! !
claus
parents: 61
diff changeset
   407
361
765fe20a26d1 fixed #openOnDevice:;
Claus Gittinger <cg@exept.de>
parents: 330
diff changeset
   408
!ApplicationModel class methodsFor:'resources'!
52
6dc870beba69 *** empty log message ***
claus
parents: 50
diff changeset
   409
6dc870beba69 *** empty log message ***
claus
parents: 50
diff changeset
   410
classResources
6dc870beba69 *** empty log message ***
claus
parents: 50
diff changeset
   411
    "if not already loaded, get the classes resourcePack
6dc870beba69 *** empty log message ***
claus
parents: 50
diff changeset
   412
     and return it"
6dc870beba69 *** empty log message ***
claus
parents: 50
diff changeset
   413
6dc870beba69 *** empty log message ***
claus
parents: 50
diff changeset
   414
    ClassResources isNil ifTrue:[
6dc870beba69 *** empty log message ***
claus
parents: 50
diff changeset
   415
	ClassResources := ResourcePack for:self.
6dc870beba69 *** empty log message ***
claus
parents: 50
diff changeset
   416
    ].
6dc870beba69 *** empty log message ***
claus
parents: 50
diff changeset
   417
    ^ ClassResources
6dc870beba69 *** empty log message ***
claus
parents: 50
diff changeset
   418
!
6dc870beba69 *** empty log message ***
claus
parents: 50
diff changeset
   419
6dc870beba69 *** empty log message ***
claus
parents: 50
diff changeset
   420
classResources:aResourcePack
6dc870beba69 *** empty log message ***
claus
parents: 50
diff changeset
   421
    "allow setting of the classResources"
6dc870beba69 *** empty log message ***
claus
parents: 50
diff changeset
   422
6dc870beba69 *** empty log message ***
claus
parents: 50
diff changeset
   423
    ClassResources := aResourcePack
6dc870beba69 *** empty log message ***
claus
parents: 50
diff changeset
   424
!
6dc870beba69 *** empty log message ***
claus
parents: 50
diff changeset
   425
6dc870beba69 *** empty log message ***
claus
parents: 50
diff changeset
   426
flushAllClassResources
6dc870beba69 *** empty log message ***
claus
parents: 50
diff changeset
   427
    "flush all classes resource translations.
6dc870beba69 *** empty log message ***
claus
parents: 50
diff changeset
   428
     Needed after a resource file / language setting has changed."
6dc870beba69 *** empty log message ***
claus
parents: 50
diff changeset
   429
6dc870beba69 *** empty log message ***
claus
parents: 50
diff changeset
   430
    ResourcePack flushCachedResourcePacks.
6dc870beba69 *** empty log message ***
claus
parents: 50
diff changeset
   431
    self flushClassResources.
6dc870beba69 *** empty log message ***
claus
parents: 50
diff changeset
   432
    self allSubclassesDo:[:aClass |
6dc870beba69 *** empty log message ***
claus
parents: 50
diff changeset
   433
	aClass flushClassResources.
6dc870beba69 *** empty log message ***
claus
parents: 50
diff changeset
   434
    ]
6dc870beba69 *** empty log message ***
claus
parents: 50
diff changeset
   435
!
6dc870beba69 *** empty log message ***
claus
parents: 50
diff changeset
   436
6dc870beba69 *** empty log message ***
claus
parents: 50
diff changeset
   437
flushClassResources
6dc870beba69 *** empty log message ***
claus
parents: 50
diff changeset
   438
    "flush classes resource string translations.
6dc870beba69 *** empty log message ***
claus
parents: 50
diff changeset
   439
     Needed whenever a resource file / language setting has changed"
6dc870beba69 *** empty log message ***
claus
parents: 50
diff changeset
   440
6dc870beba69 *** empty log message ***
claus
parents: 50
diff changeset
   441
    ClassResources := nil.
63
claus
parents: 61
diff changeset
   442
!
claus
parents: 61
diff changeset
   443
921
69a82d996936 added #resources for commin interface with instances
Claus Gittinger <cg@exept.de>
parents: 904
diff changeset
   444
resources
69a82d996936 added #resources for commin interface with instances
Claus Gittinger <cg@exept.de>
parents: 904
diff changeset
   445
    "return the applications resources - thats a ResourcePack containing
69a82d996936 added #resources for commin interface with instances
Claus Gittinger <cg@exept.de>
parents: 904
diff changeset
   446
     language strings"
69a82d996936 added #resources for commin interface with instances
Claus Gittinger <cg@exept.de>
parents: 904
diff changeset
   447
69a82d996936 added #resources for commin interface with instances
Claus Gittinger <cg@exept.de>
parents: 904
diff changeset
   448
    ^ self classResources
69a82d996936 added #resources for commin interface with instances
Claus Gittinger <cg@exept.de>
parents: 904
diff changeset
   449
69a82d996936 added #resources for commin interface with instances
Claus Gittinger <cg@exept.de>
parents: 904
diff changeset
   450
    "Created: / 19.5.1998 / 20:14:00 / cg"
69a82d996936 added #resources for commin interface with instances
Claus Gittinger <cg@exept.de>
parents: 904
diff changeset
   451
!
69a82d996936 added #resources for commin interface with instances
Claus Gittinger <cg@exept.de>
parents: 904
diff changeset
   452
63
claus
parents: 61
diff changeset
   453
updateClassResources
claus
parents: 61
diff changeset
   454
    "update my classResources"
claus
parents: 61
diff changeset
   455
claus
parents: 61
diff changeset
   456
    ClassResources := nil.
claus
parents: 61
diff changeset
   457
    self classResources
52
6dc870beba69 *** empty log message ***
claus
parents: 50
diff changeset
   458
! !
6dc870beba69 *** empty log message ***
claus
parents: 50
diff changeset
   459
361
765fe20a26d1 fixed #openOnDevice:;
Claus Gittinger <cg@exept.de>
parents: 330
diff changeset
   460
!ApplicationModel class methodsFor:'startup'!
138
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   461
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   462
open
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   463
    "create an instance of the application and open its view"
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   464
240
09028fa9ff5f return app in class>>open
Claus Gittinger <cg@exept.de>
parents: 221
diff changeset
   465
    ^ self new open
138
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   466
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   467
    "
361
765fe20a26d1 fixed #openOnDevice:;
Claus Gittinger <cg@exept.de>
parents: 330
diff changeset
   468
     Launcher open
138
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   469
    "
240
09028fa9ff5f return app in class>>open
Claus Gittinger <cg@exept.de>
parents: 221
diff changeset
   470
361
765fe20a26d1 fixed #openOnDevice:;
Claus Gittinger <cg@exept.de>
parents: 330
diff changeset
   471
    "Modified: 13.1.1997 / 20:54:50 / cg"
138
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   472
!
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   473
428
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
   474
openAt:aLocation
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
   475
    "create an instance of the application and open its view
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
   476
     at some position."
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
   477
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
   478
    ^ self new openAt:aLocation
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
   479
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
   480
    "Modified: 14.2.1997 / 20:28:41 / cg"
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
   481
!
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
   482
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
   483
openDialogInterface:anInterfaceSymbol
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
   484
    "create an instance of the application and open a view as
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
   485
     specified by anInterfaceSymbol."
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
   486
464
25e6380399c6 allow additional bindings to be passed with #openDialogInterface
Claus Gittinger <cg@exept.de>
parents: 438
diff changeset
   487
    ^ self openDialogInterface:anInterfaceSymbol withBindings:nil
25e6380399c6 allow additional bindings to be passed with #openDialogInterface
Claus Gittinger <cg@exept.de>
parents: 438
diff changeset
   488
25e6380399c6 allow additional bindings to be passed with #openDialogInterface
Claus Gittinger <cg@exept.de>
parents: 438
diff changeset
   489
    "Modified: 5.9.1995 / 17:54:50 / claus"
25e6380399c6 allow additional bindings to be passed with #openDialogInterface
Claus Gittinger <cg@exept.de>
parents: 438
diff changeset
   490
    "Created: 14.2.1997 / 20:33:10 / cg"
25e6380399c6 allow additional bindings to be passed with #openDialogInterface
Claus Gittinger <cg@exept.de>
parents: 438
diff changeset
   491
    "Modified: 28.2.1997 / 14:07:36 / cg"
25e6380399c6 allow additional bindings to be passed with #openDialogInterface
Claus Gittinger <cg@exept.de>
parents: 438
diff changeset
   492
!
25e6380399c6 allow additional bindings to be passed with #openDialogInterface
Claus Gittinger <cg@exept.de>
parents: 438
diff changeset
   493
25e6380399c6 allow additional bindings to be passed with #openDialogInterface
Claus Gittinger <cg@exept.de>
parents: 438
diff changeset
   494
openDialogInterface:anInterfaceSymbol withBindings:bindings
25e6380399c6 allow additional bindings to be passed with #openDialogInterface
Claus Gittinger <cg@exept.de>
parents: 438
diff changeset
   495
    "create an instance of the application and open a view as
25e6380399c6 allow additional bindings to be passed with #openDialogInterface
Claus Gittinger <cg@exept.de>
parents: 438
diff changeset
   496
     specified by anInterfaceSymbol."
25e6380399c6 allow additional bindings to be passed with #openDialogInterface
Claus Gittinger <cg@exept.de>
parents: 438
diff changeset
   497
25e6380399c6 allow additional bindings to be passed with #openDialogInterface
Claus Gittinger <cg@exept.de>
parents: 438
diff changeset
   498
    ^ self new openDialogInterface:anInterfaceSymbol withBindings:bindings
428
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
   499
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
   500
    "Modified: 5.9.1995 / 17:54:50 / claus"
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
   501
    "Modified: 13.1.1997 / 20:55:02 / cg"
464
25e6380399c6 allow additional bindings to be passed with #openDialogInterface
Claus Gittinger <cg@exept.de>
parents: 438
diff changeset
   502
    "Created: 28.2.1997 / 14:07:24 / cg"
428
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
   503
!
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
   504
1305
fd53dd6c4f4a added #openDialogInterfaceSpec:
Claus Gittinger <cg@exept.de>
parents: 1302
diff changeset
   505
openDialogInterfaceSpec:anInterfaceSpec
fd53dd6c4f4a added #openDialogInterfaceSpec:
Claus Gittinger <cg@exept.de>
parents: 1302
diff changeset
   506
    "create an instance of the application and open a view as
fd53dd6c4f4a added #openDialogInterfaceSpec:
Claus Gittinger <cg@exept.de>
parents: 1302
diff changeset
   507
     specified by the given spec."
fd53dd6c4f4a added #openDialogInterfaceSpec:
Claus Gittinger <cg@exept.de>
parents: 1302
diff changeset
   508
fd53dd6c4f4a added #openDialogInterfaceSpec:
Claus Gittinger <cg@exept.de>
parents: 1302
diff changeset
   509
    ^ self new 
fd53dd6c4f4a added #openDialogInterfaceSpec:
Claus Gittinger <cg@exept.de>
parents: 1302
diff changeset
   510
        openDialogInterfaceSpec:anInterfaceSpec 
fd53dd6c4f4a added #openDialogInterfaceSpec:
Claus Gittinger <cg@exept.de>
parents: 1302
diff changeset
   511
        withBindings:nil
fd53dd6c4f4a added #openDialogInterfaceSpec:
Claus Gittinger <cg@exept.de>
parents: 1302
diff changeset
   512
!
fd53dd6c4f4a added #openDialogInterfaceSpec:
Claus Gittinger <cg@exept.de>
parents: 1302
diff changeset
   513
1152
2118fe2c3227 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1132
diff changeset
   514
openDialogInterfaceSpec:anInterfaceSpec withBindings:bindings
2118fe2c3227 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1132
diff changeset
   515
    "create an instance of the application and open a view as
2118fe2c3227 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1132
diff changeset
   516
     specified by the given spec."
2118fe2c3227 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1132
diff changeset
   517
2118fe2c3227 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1132
diff changeset
   518
    ^ self new 
2118fe2c3227 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1132
diff changeset
   519
        openDialogInterfaceSpec:anInterfaceSpec 
2118fe2c3227 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1132
diff changeset
   520
        withBindings:bindings
2118fe2c3227 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1132
diff changeset
   521
2118fe2c3227 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1132
diff changeset
   522
    "Modified: 5.9.1995 / 17:54:50 / claus"
2118fe2c3227 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1132
diff changeset
   523
    "Modified: 13.1.1997 / 20:55:02 / cg"
2118fe2c3227 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1132
diff changeset
   524
    "Created: 28.2.1997 / 14:07:24 / cg"
2118fe2c3227 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1132
diff changeset
   525
!
2118fe2c3227 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1132
diff changeset
   526
933
36d38398b0c0 allow opening an interface by spec.
Claus Gittinger <cg@exept.de>
parents: 931
diff changeset
   527
openDialogSpec:aSpec
36d38398b0c0 allow opening an interface by spec.
Claus Gittinger <cg@exept.de>
parents: 931
diff changeset
   528
    "create an instance of the application and open a view as
36d38398b0c0 allow opening an interface by spec.
Claus Gittinger <cg@exept.de>
parents: 931
diff changeset
   529
     specified by aSpec."
36d38398b0c0 allow opening an interface by spec.
Claus Gittinger <cg@exept.de>
parents: 931
diff changeset
   530
36d38398b0c0 allow opening an interface by spec.
Claus Gittinger <cg@exept.de>
parents: 931
diff changeset
   531
    ^ self openDialogSpec:aSpec withBindings:nil
36d38398b0c0 allow opening an interface by spec.
Claus Gittinger <cg@exept.de>
parents: 931
diff changeset
   532
36d38398b0c0 allow opening an interface by spec.
Claus Gittinger <cg@exept.de>
parents: 931
diff changeset
   533
    "Modified: / 5.9.1995 / 17:54:50 / claus"
36d38398b0c0 allow opening an interface by spec.
Claus Gittinger <cg@exept.de>
parents: 931
diff changeset
   534
    "Modified: / 28.2.1997 / 14:07:36 / cg"
36d38398b0c0 allow opening an interface by spec.
Claus Gittinger <cg@exept.de>
parents: 931
diff changeset
   535
    "Created: / 20.5.1998 / 20:27:08 / cg"
36d38398b0c0 allow opening an interface by spec.
Claus Gittinger <cg@exept.de>
parents: 931
diff changeset
   536
!
36d38398b0c0 allow opening an interface by spec.
Claus Gittinger <cg@exept.de>
parents: 931
diff changeset
   537
36d38398b0c0 allow opening an interface by spec.
Claus Gittinger <cg@exept.de>
parents: 931
diff changeset
   538
openDialogSpec:aSpec withBindings:bindings
36d38398b0c0 allow opening an interface by spec.
Claus Gittinger <cg@exept.de>
parents: 931
diff changeset
   539
    "create an instance of the application and open a view as
36d38398b0c0 allow opening an interface by spec.
Claus Gittinger <cg@exept.de>
parents: 931
diff changeset
   540
     specified by the spec."
36d38398b0c0 allow opening an interface by spec.
Claus Gittinger <cg@exept.de>
parents: 931
diff changeset
   541
36d38398b0c0 allow opening an interface by spec.
Claus Gittinger <cg@exept.de>
parents: 931
diff changeset
   542
    ^ self new openDialogSpec:aSpec withBindings:bindings
36d38398b0c0 allow opening an interface by spec.
Claus Gittinger <cg@exept.de>
parents: 931
diff changeset
   543
36d38398b0c0 allow opening an interface by spec.
Claus Gittinger <cg@exept.de>
parents: 931
diff changeset
   544
    "Modified: / 5.9.1995 / 17:54:50 / claus"
36d38398b0c0 allow opening an interface by spec.
Claus Gittinger <cg@exept.de>
parents: 931
diff changeset
   545
    "Modified: / 13.1.1997 / 20:55:02 / cg"
36d38398b0c0 allow opening an interface by spec.
Claus Gittinger <cg@exept.de>
parents: 931
diff changeset
   546
    "Created: / 20.5.1998 / 20:26:37 / cg"
36d38398b0c0 allow opening an interface by spec.
Claus Gittinger <cg@exept.de>
parents: 931
diff changeset
   547
!
36d38398b0c0 allow opening an interface by spec.
Claus Gittinger <cg@exept.de>
parents: 931
diff changeset
   548
138
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   549
openInterface:anInterfaceSymbol
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   550
    "create an instance of the application and open a view as
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   551
     specified by anInterfaceSymbol."
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   552
361
765fe20a26d1 fixed #openOnDevice:;
Claus Gittinger <cg@exept.de>
parents: 330
diff changeset
   553
    ^ self new openInterface:anInterfaceSymbol
138
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   554
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   555
    "Modified: 5.9.1995 / 17:54:50 / claus"
361
765fe20a26d1 fixed #openOnDevice:;
Claus Gittinger <cg@exept.de>
parents: 330
diff changeset
   556
    "Modified: 13.1.1997 / 20:55:02 / cg"
138
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   557
!
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   558
428
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
   559
openInterface:anInterfaceSymbol at:aPoint
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
   560
    "create an instance of the application and open a view as
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
   561
     specified by anInterfaceSymbol."
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
   562
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
   563
    ^ self new openInterface:anInterfaceSymbol at:aPoint
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
   564
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
   565
    "Modified: 14.2.1997 / 20:28:47 / cg"
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
   566
!
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
   567
657
285350fb3885 open modal
ca
parents: 614
diff changeset
   568
openModal
285350fb3885 open modal
ca
parents: 614
diff changeset
   569
    "create an instance of the application and open its view modal"
285350fb3885 open modal
ca
parents: 614
diff changeset
   570
285350fb3885 open modal
ca
parents: 614
diff changeset
   571
    ^ self new openModal
285350fb3885 open modal
ca
parents: 614
diff changeset
   572
!
285350fb3885 open modal
ca
parents: 614
diff changeset
   573
138
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   574
openOn:anApplicationModel
215
369b0376e859 commentary
Claus Gittinger <cg@exept.de>
parents: 187
diff changeset
   575
    "send an open message to the argument, anApplicationModel.
369b0376e859 commentary
Claus Gittinger <cg@exept.de>
parents: 187
diff changeset
   576
     I dont really understand what this method is useful for ..."
138
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   577
361
765fe20a26d1 fixed #openOnDevice:;
Claus Gittinger <cg@exept.de>
parents: 330
diff changeset
   578
    ^ anApplicationModel open
215
369b0376e859 commentary
Claus Gittinger <cg@exept.de>
parents: 187
diff changeset
   579
361
765fe20a26d1 fixed #openOnDevice:;
Claus Gittinger <cg@exept.de>
parents: 330
diff changeset
   580
    "Modified: 13.1.1997 / 20:55:05 / cg"
138
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   581
!
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   582
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   583
openOnDevice:aDevice
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   584
    "create an instance of the application and open its view
215
369b0376e859 commentary
Claus Gittinger <cg@exept.de>
parents: 187
diff changeset
   585
     on ANOTHER device. 
369b0376e859 commentary
Claus Gittinger <cg@exept.de>
parents: 187
diff changeset
   586
     For more info, read the document on multiple display
369b0376e859 commentary
Claus Gittinger <cg@exept.de>
parents: 187
diff changeset
   587
     support and the documentation of the DeviceWorkstation class."
138
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   588
361
765fe20a26d1 fixed #openOnDevice:;
Claus Gittinger <cg@exept.de>
parents: 330
diff changeset
   589
    ^ (self onDevice:aDevice) open
215
369b0376e859 commentary
Claus Gittinger <cg@exept.de>
parents: 187
diff changeset
   590
361
765fe20a26d1 fixed #openOnDevice:;
Claus Gittinger <cg@exept.de>
parents: 330
diff changeset
   591
    "
765fe20a26d1 fixed #openOnDevice:;
Claus Gittinger <cg@exept.de>
parents: 330
diff changeset
   592
     Launcher openOnDevice:Display
765fe20a26d1 fixed #openOnDevice:;
Claus Gittinger <cg@exept.de>
parents: 330
diff changeset
   593
    "
765fe20a26d1 fixed #openOnDevice:;
Claus Gittinger <cg@exept.de>
parents: 330
diff changeset
   594
765fe20a26d1 fixed #openOnDevice:;
Claus Gittinger <cg@exept.de>
parents: 330
diff changeset
   595
    "Modified: 13.1.1997 / 20:55:27 / cg"
685
49bff60514bc st80 compatibility
Claus Gittinger <cg@exept.de>
parents: 659
diff changeset
   596
!
49bff60514bc st80 compatibility
Claus Gittinger <cg@exept.de>
parents: 659
diff changeset
   597
1279
60b6e72fc942 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1264
diff changeset
   598
openOnXScreenNamed:aScreenName
60b6e72fc942 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1264
diff changeset
   599
    "create an instance of the application and open its view
60b6e72fc942 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1264
diff changeset
   600
     on some X display screen. The argument aScreenName must be 
60b6e72fc942 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1264
diff changeset
   601
     a valid x-display name (i.e. of the form '<host>:<screenNr>' as in 'foo:0').
60b6e72fc942 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1264
diff changeset
   602
     For more info, read the document on multiple display
60b6e72fc942 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1264
diff changeset
   603
     support and the documentation of the DeviceWorkstation class."
60b6e72fc942 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1264
diff changeset
   604
60b6e72fc942 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1264
diff changeset
   605
    |newDevice someScreen|
60b6e72fc942 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1264
diff changeset
   606
60b6e72fc942 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1264
diff changeset
   607
    newDevice := XWorkstation new.
60b6e72fc942 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1264
diff changeset
   608
    newDevice := newDevice initializeFor:aScreenName.
60b6e72fc942 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1264
diff changeset
   609
    newDevice isNil ifTrue:[
1286
48113f78950c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1279
diff changeset
   610
        Screen current notNil ifTrue:[
48113f78950c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1279
diff changeset
   611
            self warn:('Could not open display: ' , aScreenName).
48113f78950c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1279
diff changeset
   612
        ] ifFalse:[
48113f78950c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1279
diff changeset
   613
            ('Could not open display: ' , aScreenName) errorPrintCR
48113f78950c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1279
diff changeset
   614
        ].
1279
60b6e72fc942 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1264
diff changeset
   615
        ^ nil.
60b6e72fc942 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1264
diff changeset
   616
    ].
60b6e72fc942 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1264
diff changeset
   617
    newDevice startDispatch.
60b6e72fc942 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1264
diff changeset
   618
    (someScreen := Screen current) isNil ifTrue:[
60b6e72fc942 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1264
diff changeset
   619
        someScreen := Screen default.
60b6e72fc942 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1264
diff changeset
   620
    ].
60b6e72fc942 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1264
diff changeset
   621
    someScreen notNil ifTrue:[
60b6e72fc942 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1264
diff changeset
   622
        newDevice keyboardMap:(someScreen keyboardMap).
60b6e72fc942 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1264
diff changeset
   623
        newDevice buttonTranslation:(someScreen buttonTranslation).
60b6e72fc942 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1264
diff changeset
   624
    ].
60b6e72fc942 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1264
diff changeset
   625
    "/ arrange for it to finish its event dispatch loop, 
60b6e72fc942 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1264
diff changeset
   626
    "/ when the last view on it is closed.
60b6e72fc942 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1264
diff changeset
   627
    newDevice exitOnLastClose:true.
60b6e72fc942 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1264
diff changeset
   628
60b6e72fc942 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1264
diff changeset
   629
    ^ (self onDevice:newDevice) open
60b6e72fc942 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1264
diff changeset
   630
60b6e72fc942 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1264
diff changeset
   631
    "
60b6e72fc942 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1264
diff changeset
   632
     Launcher openOnXScreenNamed:'sgi:0'
60b6e72fc942 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1264
diff changeset
   633
    "
60b6e72fc942 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1264
diff changeset
   634
60b6e72fc942 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1264
diff changeset
   635
    "Modified: 13.1.1997 / 20:55:27 / cg"
60b6e72fc942 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1264
diff changeset
   636
!
60b6e72fc942 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1264
diff changeset
   637
685
49bff60514bc st80 compatibility
Claus Gittinger <cg@exept.de>
parents: 659
diff changeset
   638
openWithSpec:aSpecSymbol
49bff60514bc st80 compatibility
Claus Gittinger <cg@exept.de>
parents: 659
diff changeset
   639
    "ST80 compatibility:
49bff60514bc st80 compatibility
Claus Gittinger <cg@exept.de>
parents: 659
diff changeset
   640
     mhmh - what is the difference to #openInterface ?"
49bff60514bc st80 compatibility
Claus Gittinger <cg@exept.de>
parents: 659
diff changeset
   641
49bff60514bc st80 compatibility
Claus Gittinger <cg@exept.de>
parents: 659
diff changeset
   642
    ^ self openInterface:aSpecSymbol
49bff60514bc st80 compatibility
Claus Gittinger <cg@exept.de>
parents: 659
diff changeset
   643
49bff60514bc st80 compatibility
Claus Gittinger <cg@exept.de>
parents: 659
diff changeset
   644
    "Modified: 29.8.1997 / 01:16:52 / cg"
138
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   645
! !
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   646
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   647
!ApplicationModel methodsFor:'accessing'!
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   648
421
e163e734b31c changed binding access
ca
parents: 402
diff changeset
   649
application
825
98429ad39f5d #specificationFor: asks the class about the window specification.
Stefan Vogel <sv@exept.de>
parents: 788
diff changeset
   650
    "application knows about interfaceSpecs, menuSpecs etc.
98429ad39f5d #specificationFor: asks the class about the window specification.
Stefan Vogel <sv@exept.de>
parents: 788
diff changeset
   651
     Usually this is my class.
98429ad39f5d #specificationFor: asks the class about the window specification.
Stefan Vogel <sv@exept.de>
parents: 788
diff changeset
   652
     This may be redefined in subclasses"
98429ad39f5d #specificationFor: asks the class about the window specification.
Stefan Vogel <sv@exept.de>
parents: 788
diff changeset
   653
421
e163e734b31c changed binding access
ca
parents: 402
diff changeset
   654
    ^ self class
825
98429ad39f5d #specificationFor: asks the class about the window specification.
Stefan Vogel <sv@exept.de>
parents: 788
diff changeset
   655
98429ad39f5d #specificationFor: asks the class about the window specification.
Stefan Vogel <sv@exept.de>
parents: 788
diff changeset
   656
    "Modified: / 5.2.1998 / 00:45:21 / stefan"
421
e163e734b31c changed binding access
ca
parents: 402
diff changeset
   657
!
e163e734b31c changed binding access
ca
parents: 402
diff changeset
   658
138
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   659
builder
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   660
    "return the applications builder; this one has more information
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   661
     about views, components etc."
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   662
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   663
    ^ builder
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   664
!
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   665
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   666
builder:aBuilder
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   667
    "set the applications builder. Normally, you should not set it
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   668
     directly, but depend on the default builder, as created when the application
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   669
     was created."
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   670
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   671
    builder := aBuilder
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   672
!
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   673
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   674
focusSequence
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   675
    "return a focusSequence for stepping through the applications views.
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   676
     The builder usually keeps track of so-called 'tabable' views.
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   677
     Stepping is done with the FocusNext/FocusPrevius keys, which are 
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   678
     typically bound to Meta-CursorUp/Meta-CursorDown.
730
cc391efb62c0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
   679
     (unless the focus is currently attached to a textEditing view,
cc391efb62c0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
   680
      tabbing is also possible via the tab-key)
138
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   681
     Subclasses which do not use the builder (but instead build their view
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   682
     programmatically) should redefine this method to return a collection of
730
cc391efb62c0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
   683
     views which defines that sequence.
cc391efb62c0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
   684
     Notice, that the focuse sequence is asked for at the time of the tabbing
cc391efb62c0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
   685
     (not only during startup of the view) - so dynamically adding/removing
cc391efb62c0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
   686
     components is possible."
138
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   687
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   688
    builder notNil ifTrue:[
730
cc391efb62c0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
   689
        ^ builder focusSequence
138
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   690
    ].
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   691
    ^ nil
730
cc391efb62c0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
   692
cc391efb62c0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
   693
    "Modified: / 31.10.1997 / 19:11:14 / cg"
138
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   694
!
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   695
594
da97311844fb route to masterApplication to get bindings
ca
parents: 588
diff changeset
   696
masterApplication
da97311844fb route to masterApplication to get bindings
ca
parents: 588
diff changeset
   697
    "return the value of the instance variable 'masterApplication' (automatically generated)"
da97311844fb route to masterApplication to get bindings
ca
parents: 588
diff changeset
   698
da97311844fb route to masterApplication to get bindings
ca
parents: 588
diff changeset
   699
    ^ masterApplication!
da97311844fb route to masterApplication to get bindings
ca
parents: 588
diff changeset
   700
da97311844fb route to masterApplication to get bindings
ca
parents: 588
diff changeset
   701
masterApplication:something
da97311844fb route to masterApplication to get bindings
ca
parents: 588
diff changeset
   702
    "set the value of the instance variable 'masterApplication' (automatically generated)"
da97311844fb route to masterApplication to get bindings
ca
parents: 588
diff changeset
   703
852
671df0a6277d check for bad masterApp setting.
dq
parents: 849
diff changeset
   704
    something == self ifTrue:[
671df0a6277d check for bad masterApp setting.
dq
parents: 849
diff changeset
   705
        self halt:'an application cannot be its own masterApplication'.
671df0a6277d check for bad masterApp setting.
dq
parents: 849
diff changeset
   706
        ^ self
671df0a6277d check for bad masterApp setting.
dq
parents: 849
diff changeset
   707
    ].
671df0a6277d check for bad masterApp setting.
dq
parents: 849
diff changeset
   708
    masterApplication := something.
671df0a6277d check for bad masterApp setting.
dq
parents: 849
diff changeset
   709
!
594
da97311844fb route to masterApplication to get bindings
ca
parents: 588
diff changeset
   710
138
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   711
resources
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   712
    "return the applications resources - thats a ResourcePack containing
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   713
     language strings"
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   714
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   715
    ^ resources
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   716
!
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   717
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   718
window
1074
f422336b1fd1 handle query for window, before window is setup.
Claus Gittinger <cg@exept.de>
parents: 1066
diff changeset
   719
    "return my topWindow - or nil, if I have no window (yet)"
138
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   720
1209
7ed72799d0ee checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1205
diff changeset
   721
    |win|
7ed72799d0ee checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1205
diff changeset
   722
1074
f422336b1fd1 handle query for window, before window is setup.
Claus Gittinger <cg@exept.de>
parents: 1066
diff changeset
   723
    builder isNil ifTrue:[^ nil].
1209
7ed72799d0ee checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1205
diff changeset
   724
    (win := builder window) notNil ifTrue:[
7ed72799d0ee checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1205
diff changeset
   725
        ^ win
7ed72799d0ee checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1205
diff changeset
   726
    ].
7ed72799d0ee checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1205
diff changeset
   727
    masterApplication notNil ifTrue:[
7ed72799d0ee checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1205
diff changeset
   728
        "/ is that true ?
7ed72799d0ee checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1205
diff changeset
   729
        ^ masterApplication window
7ed72799d0ee checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1205
diff changeset
   730
    ].
7ed72799d0ee checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1205
diff changeset
   731
    ^ nil.
1074
f422336b1fd1 handle query for window, before window is setup.
Claus Gittinger <cg@exept.de>
parents: 1066
diff changeset
   732
f422336b1fd1 handle query for window, before window is setup.
Claus Gittinger <cg@exept.de>
parents: 1066
diff changeset
   733
    "Modified: / 18.9.1998 / 15:18:19 / cg"
138
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   734
!
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   735
187
9e35ae67f07c added #window:
Claus Gittinger <cg@exept.de>
parents: 144
diff changeset
   736
window:aTopView
1211
f09ce6b9b03d create a dummy builder when the window is set.
Claus Gittinger <cg@exept.de>
parents: 1209
diff changeset
   737
    "set my topWindow.
f09ce6b9b03d create a dummy builder when the window is set.
Claus Gittinger <cg@exept.de>
parents: 1209
diff changeset
   738
     As a side effect, this creates a dummy builder if non has yet
f09ce6b9b03d create a dummy builder when the window is set.
Claus Gittinger <cg@exept.de>
parents: 1209
diff changeset
   739
     been built. This prevents non-GUI-Painter apps from failing later,
f09ce6b9b03d create a dummy builder when the window is set.
Claus Gittinger <cg@exept.de>
parents: 1209
diff changeset
   740
     when the builder is accessed."
f09ce6b9b03d create a dummy builder when the window is set.
Claus Gittinger <cg@exept.de>
parents: 1209
diff changeset
   741
f09ce6b9b03d create a dummy builder when the window is set.
Claus Gittinger <cg@exept.de>
parents: 1209
diff changeset
   742
    builder isNil ifTrue:[
f09ce6b9b03d create a dummy builder when the window is set.
Claus Gittinger <cg@exept.de>
parents: 1209
diff changeset
   743
        self createBuilder
f09ce6b9b03d create a dummy builder when the window is set.
Claus Gittinger <cg@exept.de>
parents: 1209
diff changeset
   744
    ].
187
9e35ae67f07c added #window:
Claus Gittinger <cg@exept.de>
parents: 144
diff changeset
   745
    builder window:aTopView
9e35ae67f07c added #window:
Claus Gittinger <cg@exept.de>
parents: 144
diff changeset
   746
9e35ae67f07c added #window:
Claus Gittinger <cg@exept.de>
parents: 144
diff changeset
   747
    "Created: 18.4.1996 / 14:55:26 / cg"
9e35ae67f07c added #window:
Claus Gittinger <cg@exept.de>
parents: 144
diff changeset
   748
!
9e35ae67f07c added #window:
Claus Gittinger <cg@exept.de>
parents: 144
diff changeset
   749
138
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   750
windowGroup 
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   751
    "return the applications windowGroup"
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   752
657
285350fb3885 open modal
ca
parents: 614
diff changeset
   753
    |w|
285350fb3885 open modal
ca
parents: 614
diff changeset
   754
1066
3f827dd8983f care for nil builder in #windowGroup.
Claus Gittinger <cg@exept.de>
parents: 1050
diff changeset
   755
    builder notNil ifTrue:[
3f827dd8983f care for nil builder in #windowGroup.
Claus Gittinger <cg@exept.de>
parents: 1050
diff changeset
   756
        (w := builder window) notNil ifTrue:[
3f827dd8983f care for nil builder in #windowGroup.
Claus Gittinger <cg@exept.de>
parents: 1050
diff changeset
   757
            ^ w windowGroup
3f827dd8983f care for nil builder in #windowGroup.
Claus Gittinger <cg@exept.de>
parents: 1050
diff changeset
   758
        ].
657
285350fb3885 open modal
ca
parents: 614
diff changeset
   759
    ].
1050
c062ec647d98 fixed #windowGroup - if there is a masterApp
Claus Gittinger <cg@exept.de>
parents: 1024
diff changeset
   760
    masterApplication notNil ifTrue:[
c062ec647d98 fixed #windowGroup - if there is a masterApp
Claus Gittinger <cg@exept.de>
parents: 1024
diff changeset
   761
        ^ masterApplication windowGroup
c062ec647d98 fixed #windowGroup - if there is a masterApp
Claus Gittinger <cg@exept.de>
parents: 1024
diff changeset
   762
    ].
657
285350fb3885 open modal
ca
parents: 614
diff changeset
   763
    ^ nil
1050
c062ec647d98 fixed #windowGroup - if there is a masterApp
Claus Gittinger <cg@exept.de>
parents: 1024
diff changeset
   764
1066
3f827dd8983f care for nil builder in #windowGroup.
Claus Gittinger <cg@exept.de>
parents: 1050
diff changeset
   765
    "Modified: / 7.9.1998 / 23:37:00 / cg"
138
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   766
! !
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   767
371
ce94ec6a38ee more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
   768
!ApplicationModel methodsFor:'binding access'!
ce94ec6a38ee more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
   769
ce94ec6a38ee more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
   770
actionFor:aKey
ce94ec6a38ee more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
   771
    "sent by the builder to ask for an actionBlock for
ce94ec6a38ee more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
   772
     a Button. The argument, aKey comes from an UI-spec
ce94ec6a38ee more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
   773
     for a buttons #action property.
ce94ec6a38ee more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
   774
     Here, a corresponding message is sent to myself,
ce94ec6a38ee more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
   775
     which ought to be defined in the application subclass.
ce94ec6a38ee more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
   776
     Alternatively, a subclass may redefine this method, to provide
ce94ec6a38ee more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
   777
     actionBlocks from a Dictionary or whatever.
ce94ec6a38ee more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
   778
     Typically, a block is returned there."
ce94ec6a38ee more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
   779
594
da97311844fb route to masterApplication to get bindings
ca
parents: 588
diff changeset
   780
     (self selfResponsibleFor:aKey) ifTrue:[
723
1b6645c38f89 class queries for aspect
Claus Gittinger <cg@exept.de>
parents: 715
diff changeset
   781
         ^ [self perform:aKey]   "/ could use:  MessageSend receiver:self selector:aKey 
594
da97311844fb route to masterApplication to get bindings
ca
parents: 588
diff changeset
   782
     ].
da97311844fb route to masterApplication to get bindings
ca
parents: 588
diff changeset
   783
     ^ masterApplication actionFor:aKey
723
1b6645c38f89 class queries for aspect
Claus Gittinger <cg@exept.de>
parents: 715
diff changeset
   784
1b6645c38f89 class queries for aspect
Claus Gittinger <cg@exept.de>
parents: 715
diff changeset
   785
    "Modified: / 28.10.1997 / 20:34:51 / cg"
371
ce94ec6a38ee more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
   786
!
ce94ec6a38ee more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
   787
715
bedd651e731c actionFor:aKey withValue:aValue
ca
parents: 713
diff changeset
   788
actionFor:aKey withValue:aValue
bedd651e731c actionFor:aKey withValue:aValue
ca
parents: 713
diff changeset
   789
    "sent by the builder to ask for an actionBlock for
bedd651e731c actionFor:aKey withValue:aValue
ca
parents: 713
diff changeset
   790
     a Button which passes a value. 
bedd651e731c actionFor:aKey withValue:aValue
ca
parents: 713
diff changeset
   791
     The argument, aKey comes from an UI-spec for a buttons #action property.
bedd651e731c actionFor:aKey withValue:aValue
ca
parents: 713
diff changeset
   792
     Here, a corresponding message is sent to myself,
bedd651e731c actionFor:aKey withValue:aValue
ca
parents: 713
diff changeset
   793
     which ought to be defined in the application subclass.
bedd651e731c actionFor:aKey withValue:aValue
ca
parents: 713
diff changeset
   794
     Alternatively, a subclass may redefine this method, to provide
bedd651e731c actionFor:aKey withValue:aValue
ca
parents: 713
diff changeset
   795
     actionBlocks from a Dictionary or whatever.
bedd651e731c actionFor:aKey withValue:aValue
ca
parents: 713
diff changeset
   796
     Typically, a block is returned there."
bedd651e731c actionFor:aKey withValue:aValue
ca
parents: 713
diff changeset
   797
bedd651e731c actionFor:aKey withValue:aValue
ca
parents: 713
diff changeset
   798
     (self selfResponsibleFor:aKey) ifTrue:[
bedd651e731c actionFor:aKey withValue:aValue
ca
parents: 713
diff changeset
   799
         ^ [self perform:aKey with:aValue]
bedd651e731c actionFor:aKey withValue:aValue
ca
parents: 713
diff changeset
   800
     ].
bedd651e731c actionFor:aKey withValue:aValue
ca
parents: 713
diff changeset
   801
     ^ masterApplication actionFor:aKey withValue:aValue
bedd651e731c actionFor:aKey withValue:aValue
ca
parents: 713
diff changeset
   802
!
bedd651e731c actionFor:aKey withValue:aValue
ca
parents: 713
diff changeset
   803
371
ce94ec6a38ee more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
   804
aspectFor:aKey
ce94ec6a38ee more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
   805
    "sent by the builder to ask for an aspect (a data model).
ce94ec6a38ee more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
   806
     The argument, aKey comes from an UI-spec
ce94ec6a38ee more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
   807
     for a components #aspect property.
ce94ec6a38ee more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
   808
     Here, a corresponding message is sent to myself,
ce94ec6a38ee more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
   809
     which ought to be defined in the application subclass.
ce94ec6a38ee more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
   810
     Alternatively, a subclass may redefine this method, to provide
ce94ec6a38ee more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
   811
     holders from a Dictionary or whatever.
ce94ec6a38ee more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
   812
     Typically, a valueHolder is returned there."
ce94ec6a38ee more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
   813
963
6ac4bb44a5df better checks for unimplemented aspect methods
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
   814
    (self selfResponsibleFor:aKey) ifTrue:[
969
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
   815
        ^ self perform:aKey
963
6ac4bb44a5df better checks for unimplemented aspect methods
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
   816
    ].
6ac4bb44a5df better checks for unimplemented aspect methods
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
   817
    ^ masterApplication aspectFor:aKey
6ac4bb44a5df better checks for unimplemented aspect methods
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
   818
969
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
   819
    "Modified: / 18.6.1998 / 20:33:23 / cg"
371
ce94ec6a38ee more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
   820
!
ce94ec6a38ee more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
   821
ce94ec6a38ee more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
   822
clientFor:aKey
ce94ec6a38ee more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
   823
    "sent by the builder to ask for an application provided
ce94ec6a38ee more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
   824
     subcanvas's application.
ce94ec6a38ee more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
   825
     The argument, aKey comes from an UI-spec
ce94ec6a38ee more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
   826
     for a subcanvas's #client property.
ce94ec6a38ee more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
   827
     Here, a corresponding message is sent to myself,
ce94ec6a38ee more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
   828
     which ought to be defined in the application subclass.
ce94ec6a38ee more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
   829
     Alternatively, a subclass may redefine this method, to provide
ce94ec6a38ee more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
   830
     appModels from a Dictionary or whatever.
ce94ec6a38ee more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
   831
     Typically, an applicationModel is returned there."
ce94ec6a38ee more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
   832
963
6ac4bb44a5df better checks for unimplemented aspect methods
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
   833
    (self selfResponsibleFor:aKey) ifTrue:[
969
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
   834
        ^ self perform:aKey
963
6ac4bb44a5df better checks for unimplemented aspect methods
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
   835
    ].
6ac4bb44a5df better checks for unimplemented aspect methods
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
   836
    ^ masterApplication clientFor:aKey
6ac4bb44a5df better checks for unimplemented aspect methods
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
   837
969
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
   838
    "Modified: / 18.6.1998 / 20:33:30 / cg"
371
ce94ec6a38ee more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
   839
!
ce94ec6a38ee more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
   840
ce94ec6a38ee more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
   841
componentFor:aKey
ce94ec6a38ee more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
   842
    "sent by the builder to ask for an application provided
ce94ec6a38ee more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
   843
     component.
ce94ec6a38ee more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
   844
     The argument, aKey comes from an UI-spec
ce94ec6a38ee more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
   845
     for a viewHolders #view property.
ce94ec6a38ee more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
   846
     Here, a corresponding message is sent to myself,
ce94ec6a38ee more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
   847
     which ought to be defined in the application subclass.
ce94ec6a38ee more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
   848
     Alternatively, a subclass may redefine this method, to provide
ce94ec6a38ee more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
   849
     holders from a Dictionary or whatever.
ce94ec6a38ee more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
   850
     Typically, a view is returned there."
ce94ec6a38ee more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
   851
963
6ac4bb44a5df better checks for unimplemented aspect methods
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
   852
    (self selfResponsibleFor:aKey) ifTrue:[
969
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
   853
        ^ self perform:aKey
963
6ac4bb44a5df better checks for unimplemented aspect methods
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
   854
    ].
6ac4bb44a5df better checks for unimplemented aspect methods
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
   855
    ^ masterApplication componentFor:aKey
371
ce94ec6a38ee more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
   856
969
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
   857
    "Modified: / 18.6.1998 / 20:33:36 / cg"
371
ce94ec6a38ee more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
   858
!
ce94ec6a38ee more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
   859
594
da97311844fb route to masterApplication to get bindings
ca
parents: 588
diff changeset
   860
helpTextFor:aComponent
1020
faf7b61885fe translate helptexts to national variants.
Claus Gittinger <cg@exept.de>
parents: 1017
diff changeset
   861
    "activeHelp interface: return some help text for a widget component"
594
da97311844fb route to masterApplication to get bindings
ca
parents: 588
diff changeset
   862
614
0e0f08065592 helpTextForKey:
ca
parents: 604
diff changeset
   863
    |key cls|
599
681af9f06019 help features
ca
parents: 594
diff changeset
   864
594
da97311844fb route to masterApplication to get bindings
ca
parents: 588
diff changeset
   865
    builder notNil ifTrue:[
599
681af9f06019 help features
ca
parents: 594
diff changeset
   866
        cls := self class.
681af9f06019 help features
ca
parents: 594
diff changeset
   867
681af9f06019 help features
ca
parents: 594
diff changeset
   868
        (cls respondsTo:#helpSpec) ifTrue:[
681af9f06019 help features
ca
parents: 594
diff changeset
   869
            (key := builder helpKeyFor:aComponent) notNil ifTrue:[
614
0e0f08065592 helpTextForKey:
ca
parents: 604
diff changeset
   870
                ^ self helpTextForKey:key
599
681af9f06019 help features
ca
parents: 594
diff changeset
   871
            ]
681af9f06019 help features
ca
parents: 594
diff changeset
   872
        ]
594
da97311844fb route to masterApplication to get bindings
ca
parents: 588
diff changeset
   873
    ].
614
0e0f08065592 helpTextForKey:
ca
parents: 604
diff changeset
   874
    masterApplication notNil ifTrue:[
0e0f08065592 helpTextForKey:
ca
parents: 604
diff changeset
   875
        ^ masterApplication helpTextFor:aComponent
0e0f08065592 helpTextForKey:
ca
parents: 604
diff changeset
   876
    ].
1020
faf7b61885fe translate helptexts to national variants.
Claus Gittinger <cg@exept.de>
parents: 1017
diff changeset
   877
    ^ nil
faf7b61885fe translate helptexts to national variants.
Claus Gittinger <cg@exept.de>
parents: 1017
diff changeset
   878
faf7b61885fe translate helptexts to national variants.
Claus Gittinger <cg@exept.de>
parents: 1017
diff changeset
   879
    "Modified: / 31.7.1998 / 23:03:10 / cg"
614
0e0f08065592 helpTextForKey:
ca
parents: 604
diff changeset
   880
!
594
da97311844fb route to masterApplication to get bindings
ca
parents: 588
diff changeset
   881
614
0e0f08065592 helpTextForKey:
ca
parents: 604
diff changeset
   882
helpTextForKey:aKey
1020
faf7b61885fe translate helptexts to national variants.
Claus Gittinger <cg@exept.de>
parents: 1017
diff changeset
   883
    "activeHelp interface: return some help text for a key
1332
504987f6065c support for delayed update - it may be of general interest
Claus Gittinger <cg@exept.de>
parents: 1330
diff changeset
   884
     key is the symbol associated with some widget or menu item.
1020
faf7b61885fe translate helptexts to national variants.
Claus Gittinger <cg@exept.de>
parents: 1017
diff changeset
   885
     (from my helpSpec); return a language variant (if available)"
614
0e0f08065592 helpTextForKey:
ca
parents: 604
diff changeset
   886
0e0f08065592 helpTextForKey:
ca
parents: 604
diff changeset
   887
    |cls helpText|
0e0f08065592 helpTextForKey:
ca
parents: 604
diff changeset
   888
0e0f08065592 helpTextForKey:
ca
parents: 604
diff changeset
   889
    cls := self class.
0e0f08065592 helpTextForKey:
ca
parents: 604
diff changeset
   890
0e0f08065592 helpTextForKey:
ca
parents: 604
diff changeset
   891
    (cls respondsTo:#helpSpec) ifTrue:[
0e0f08065592 helpTextForKey:
ca
parents: 604
diff changeset
   892
        helpText := (cls helpSpec) at:aKey ifAbsent:nil
0e0f08065592 helpTextForKey:
ca
parents: 604
diff changeset
   893
    ].
599
681af9f06019 help features
ca
parents: 594
diff changeset
   894
    (masterApplication notNil and:[helpText isNil]) ifTrue:[
614
0e0f08065592 helpTextForKey:
ca
parents: 604
diff changeset
   895
        helpText := masterApplication helpTextForKey:aKey
599
681af9f06019 help features
ca
parents: 594
diff changeset
   896
    ].
1020
faf7b61885fe translate helptexts to national variants.
Claus Gittinger <cg@exept.de>
parents: 1017
diff changeset
   897
    "/ translate.
faf7b61885fe translate helptexts to national variants.
Claus Gittinger <cg@exept.de>
parents: 1017
diff changeset
   898
    resources notNil ifTrue:[
faf7b61885fe translate helptexts to national variants.
Claus Gittinger <cg@exept.de>
parents: 1017
diff changeset
   899
        ^ resources string:helpText
faf7b61885fe translate helptexts to national variants.
Claus Gittinger <cg@exept.de>
parents: 1017
diff changeset
   900
    ].
faf7b61885fe translate helptexts to national variants.
Claus Gittinger <cg@exept.de>
parents: 1017
diff changeset
   901
    ^ helpText
faf7b61885fe translate helptexts to national variants.
Claus Gittinger <cg@exept.de>
parents: 1017
diff changeset
   902
1332
504987f6065c support for delayed update - it may be of general interest
Claus Gittinger <cg@exept.de>
parents: 1330
diff changeset
   903
    "Modified: / 4.2.2000 / 15:30:16 / cg"
594
da97311844fb route to masterApplication to get bindings
ca
parents: 588
diff changeset
   904
!
da97311844fb route to masterApplication to get bindings
ca
parents: 588
diff changeset
   905
371
ce94ec6a38ee more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
   906
labelFor:aKey
ce94ec6a38ee more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
   907
    "sent by the builder to ask for an application provided
ce94ec6a38ee more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
   908
     label for a component.
ce94ec6a38ee more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
   909
     The argument, aKey comes from an UI-spec
ce94ec6a38ee more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
   910
     for a components #label property.
ce94ec6a38ee more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
   911
     Here, a corresponding message is sent to myself,
ce94ec6a38ee more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
   912
     which ought to be defined in the application subclass.
ce94ec6a38ee more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
   913
     Alternatively, a subclass may redefine this method, to provide
ce94ec6a38ee more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
   914
     labels from a Dictionary or whatever.
ce94ec6a38ee more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
   915
     Typically, a string is returned there."
ce94ec6a38ee more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
   916
963
6ac4bb44a5df better checks for unimplemented aspect methods
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
   917
    (self selfResponsibleFor:aKey) ifTrue:[
969
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
   918
        ^ self perform:aKey
963
6ac4bb44a5df better checks for unimplemented aspect methods
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
   919
    ].
6ac4bb44a5df better checks for unimplemented aspect methods
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
   920
    ^ masterApplication labelFor:aKey
371
ce94ec6a38ee more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
   921
969
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
   922
    "Modified: / 18.6.1998 / 20:33:42 / cg"
371
ce94ec6a38ee more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
   923
!
ce94ec6a38ee more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
   924
ce94ec6a38ee more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
   925
listFor:aKey
ce94ec6a38ee more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
   926
    "sent by the builder to ask for an application provided
604
190f3d243635 when asking for a list, look in the aspects as a fall back.
Claus Gittinger <cg@exept.de>
parents: 603
diff changeset
   927
     holder for a list (for example, a popUpLists list).
371
ce94ec6a38ee more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
   928
     The argument, aKey comes from an UI-spec
ce94ec6a38ee more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
   929
     for a listWidgets #list property.
ce94ec6a38ee more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
   930
     Here, a corresponding message is sent to myself,
ce94ec6a38ee more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
   931
     which ought to be defined in the application subclass.
ce94ec6a38ee more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
   932
     Alternatively, a subclass may redefine this method, to provide
ce94ec6a38ee more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
   933
     holders from a Dictionary or whatever.
604
190f3d243635 when asking for a list, look in the aspects as a fall back.
Claus Gittinger <cg@exept.de>
parents: 603
diff changeset
   934
     Typically, a list-holding model (SelectionInList) is returned there.
190f3d243635 when asking for a list, look in the aspects as a fall back.
Claus Gittinger <cg@exept.de>
parents: 603
diff changeset
   935
     If the instance does not provide a value, a corresponding aspect
190f3d243635 when asking for a list, look in the aspects as a fall back.
Claus Gittinger <cg@exept.de>
parents: 603
diff changeset
   936
     is asked for. If that fails as well, the app class is asked as a last
190f3d243635 when asking for a list, look in the aspects as a fall back.
Claus Gittinger <cg@exept.de>
parents: 603
diff changeset
   937
     chance."
190f3d243635 when asking for a list, look in the aspects as a fall back.
Claus Gittinger <cg@exept.de>
parents: 603
diff changeset
   938
190f3d243635 when asking for a list, look in the aspects as a fall back.
Claus Gittinger <cg@exept.de>
parents: 603
diff changeset
   939
    |a|
371
ce94ec6a38ee more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
   940
963
6ac4bb44a5df better checks for unimplemented aspect methods
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
   941
    (self selfResponsibleFor:aKey) ifTrue:[
969
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
   942
        ^ self perform:aKey
421
e163e734b31c changed binding access
ca
parents: 402
diff changeset
   943
    ].
604
190f3d243635 when asking for a list, look in the aspects as a fall back.
Claus Gittinger <cg@exept.de>
parents: 603
diff changeset
   944
    a := self aspectFor:aKey.
190f3d243635 when asking for a list, look in the aspects as a fall back.
Claus Gittinger <cg@exept.de>
parents: 603
diff changeset
   945
    a notNil ifTrue:[
190f3d243635 when asking for a list, look in the aspects as a fall back.
Claus Gittinger <cg@exept.de>
parents: 603
diff changeset
   946
        ^ a
190f3d243635 when asking for a list, look in the aspects as a fall back.
Claus Gittinger <cg@exept.de>
parents: 603
diff changeset
   947
    ].
421
e163e734b31c changed binding access
ca
parents: 402
diff changeset
   948
    ^ self application listFor:aKey
371
ce94ec6a38ee more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
   949
969
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
   950
    "Modified: / 18.6.1998 / 20:33:50 / cg"
371
ce94ec6a38ee more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
   951
!
ce94ec6a38ee more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
   952
ce94ec6a38ee more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
   953
menuFor:aKey
ce94ec6a38ee more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
   954
    "sent by the builder to ask for an application provided
ce94ec6a38ee more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
   955
     holder for a menu.
ce94ec6a38ee more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
   956
     The argument, aKey comes from an UI-spec
ce94ec6a38ee more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
   957
     for a widgets #menu property.
ce94ec6a38ee more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
   958
     Here, a corresponding message is sent to myself,
ce94ec6a38ee more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
   959
     which ought to be defined in the application subclass.
ce94ec6a38ee more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
   960
     Alternatively, a subclass may redefine this method, to provide
ce94ec6a38ee more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
   961
     holders from a Dictionary or whatever.
ce94ec6a38ee more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
   962
     Typically, a menu or a menu-holding valueHolder is returned there."
ce94ec6a38ee more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
   963
849
7e234a4ccaf6 access mechanism for aspects
ca
parents: 825
diff changeset
   964
    (self selfResponsibleFor:aKey) ifTrue:[
969
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
   965
        ^ self perform:aKey
421
e163e734b31c changed binding access
ca
parents: 402
diff changeset
   966
    ].
849
7e234a4ccaf6 access mechanism for aspects
ca
parents: 825
diff changeset
   967
    ^ masterApplication menuFor:aKey
421
e163e734b31c changed binding access
ca
parents: 402
diff changeset
   968
969
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
   969
    "Modified: / 18.6.1998 / 20:33:56 / cg"
421
e163e734b31c changed binding access
ca
parents: 402
diff changeset
   970
!
e163e734b31c changed binding access
ca
parents: 402
diff changeset
   971
e163e734b31c changed binding access
ca
parents: 402
diff changeset
   972
specificationFor:aKey
e163e734b31c changed binding access
ca
parents: 402
diff changeset
   973
    "sent by the builder to ask for an application provided
825
98429ad39f5d #specificationFor: asks the class about the window specification.
Stefan Vogel <sv@exept.de>
parents: 788
diff changeset
   974
     specification for a subcanvas or subspecification.
421
e163e734b31c changed binding access
ca
parents: 402
diff changeset
   975
     The argument, aKey comes from an UI-spec
825
98429ad39f5d #specificationFor: asks the class about the window specification.
Stefan Vogel <sv@exept.de>
parents: 788
diff changeset
   976
     for a subcanvases #specification property (minorKey).
421
e163e734b31c changed binding access
ca
parents: 402
diff changeset
   977
     Here, a corresponding message is sent to myself,
e163e734b31c changed binding access
ca
parents: 402
diff changeset
   978
     which ought to be defined in the application subclass.
e163e734b31c changed binding access
ca
parents: 402
diff changeset
   979
     Alternatively, a subclass may redefine this method, to provide
825
98429ad39f5d #specificationFor: asks the class about the window specification.
Stefan Vogel <sv@exept.de>
parents: 788
diff changeset
   980
     interfaceSpecifications from a Dictionary or whatever.
98429ad39f5d #specificationFor: asks the class about the window specification.
Stefan Vogel <sv@exept.de>
parents: 788
diff changeset
   981
     Typically, an interfaceSpecification is returned there."
98429ad39f5d #specificationFor: asks the class about the window specification.
Stefan Vogel <sv@exept.de>
parents: 788
diff changeset
   982
98429ad39f5d #specificationFor: asks the class about the window specification.
Stefan Vogel <sv@exept.de>
parents: 788
diff changeset
   983
     |app|
421
e163e734b31c changed binding access
ca
parents: 402
diff changeset
   984
1368
a7f3406239aa fixed specificationFor - responsibleFor check
tm
parents: 1361
diff changeset
   985
    "/(self selfResponsibleFor:aKey)       "/ rubbish
a7f3406239aa fixed specificationFor - responsibleFor check
tm
parents: 1361
diff changeset
   986
    (self respondsTo:aKey)
a7f3406239aa fixed specificationFor - responsibleFor check
tm
parents: 1361
diff changeset
   987
    ifTrue:[     
969
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
   988
        ^ self perform:aKey
963
6ac4bb44a5df better checks for unimplemented aspect methods
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
   989
    ].
6ac4bb44a5df better checks for unimplemented aspect methods
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
   990
    ((app := self application) respondsTo:aKey) ifTrue:[
6ac4bb44a5df better checks for unimplemented aspect methods
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
   991
        ^ app perform:aKey
6ac4bb44a5df better checks for unimplemented aspect methods
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
   992
    ].
6ac4bb44a5df better checks for unimplemented aspect methods
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
   993
    ^ masterApplication specificationFor:aKey
825
98429ad39f5d #specificationFor: asks the class about the window specification.
Stefan Vogel <sv@exept.de>
parents: 788
diff changeset
   994
98429ad39f5d #specificationFor: asks the class about the window specification.
Stefan Vogel <sv@exept.de>
parents: 788
diff changeset
   995
    "Modified: / 5.2.1998 / 00:31:39 / stefan"
969
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
   996
    "Modified: / 18.6.1998 / 20:34:02 / cg"
371
ce94ec6a38ee more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
   997
!
ce94ec6a38ee more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
   998
ce94ec6a38ee more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
   999
visualFor:aKey
ce94ec6a38ee more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
  1000
    "sent by the builder to ask for an application provided
ce94ec6a38ee more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
  1001
     image or element for a label.
ce94ec6a38ee more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
  1002
     The argument, aKey comes from an UI-spec
ce94ec6a38ee more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
  1003
     for a widgets #label property, if LabelIsImage is turned on.
ce94ec6a38ee more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
  1004
     Here, a corresponding message is sent to myself,
ce94ec6a38ee more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
  1005
     which ought to be defined in the application subclass.
ce94ec6a38ee more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
  1006
     Alternatively, a subclass may redefine this method, to provide
ce94ec6a38ee more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
  1007
     images from a Dictionary or whatever.
ce94ec6a38ee more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
  1008
     Typically, an image is returned there."
ce94ec6a38ee more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
  1009
421
e163e734b31c changed binding access
ca
parents: 402
diff changeset
  1010
    ^ self application visualFor:aKey
371
ce94ec6a38ee more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
  1011
ce94ec6a38ee more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
  1012
! !
ce94ec6a38ee more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
  1013
1332
504987f6065c support for delayed update - it may be of general interest
Claus Gittinger <cg@exept.de>
parents: 1330
diff changeset
  1014
!ApplicationModel methodsFor:'change & update'!
504987f6065c support for delayed update - it may be of general interest
Claus Gittinger <cg@exept.de>
parents: 1330
diff changeset
  1015
504987f6065c support for delayed update - it may be of general interest
Claus Gittinger <cg@exept.de>
parents: 1330
diff changeset
  1016
delayedUpdate:something with:aParameter from:changedObject
504987f6065c support for delayed update - it may be of general interest
Claus Gittinger <cg@exept.de>
parents: 1330
diff changeset
  1017
    "support for delayed updates - 
504987f6065c support for delayed update - it may be of general interest
Claus Gittinger <cg@exept.de>
parents: 1330
diff changeset
  1018
     subclasses which invoke #enqueueDelayedUpdate:with:from:
504987f6065c support for delayed update - it may be of general interest
Claus Gittinger <cg@exept.de>
parents: 1330
diff changeset
  1019
     must also redefine this method, and perform the actual update there."
504987f6065c support for delayed update - it may be of general interest
Claus Gittinger <cg@exept.de>
parents: 1330
diff changeset
  1020
504987f6065c support for delayed update - it may be of general interest
Claus Gittinger <cg@exept.de>
parents: 1330
diff changeset
  1021
    self subclassResponsibility
504987f6065c support for delayed update - it may be of general interest
Claus Gittinger <cg@exept.de>
parents: 1330
diff changeset
  1022
504987f6065c support for delayed update - it may be of general interest
Claus Gittinger <cg@exept.de>
parents: 1330
diff changeset
  1023
    "Created: / 4.2.2000 / 14:31:36 / cg"
504987f6065c support for delayed update - it may be of general interest
Claus Gittinger <cg@exept.de>
parents: 1330
diff changeset
  1024
!
504987f6065c support for delayed update - it may be of general interest
Claus Gittinger <cg@exept.de>
parents: 1330
diff changeset
  1025
504987f6065c support for delayed update - it may be of general interest
Claus Gittinger <cg@exept.de>
parents: 1330
diff changeset
  1026
enqueueDelayedUpdate:something with:aParameter from:changedObject
504987f6065c support for delayed update - it may be of general interest
Claus Gittinger <cg@exept.de>
parents: 1330
diff changeset
  1027
    "support for delayed updates - to be invoked from a concrete classes
504987f6065c support for delayed update - it may be of general interest
Claus Gittinger <cg@exept.de>
parents: 1330
diff changeset
  1028
     #update:with:from: method.
504987f6065c support for delayed update - it may be of general interest
Claus Gittinger <cg@exept.de>
parents: 1330
diff changeset
  1029
     This will enqueue a delayed update, and resend #delayedUpdate:with:from:
504987f6065c support for delayed update - it may be of general interest
Claus Gittinger <cg@exept.de>
parents: 1330
diff changeset
  1030
     whenever the receiver is handling events.
504987f6065c support for delayed update - it may be of general interest
Claus Gittinger <cg@exept.de>
parents: 1330
diff changeset
  1031
     Especially useful, if many updates arrive at high frequenc, to avoid
504987f6065c support for delayed update - it may be of general interest
Claus Gittinger <cg@exept.de>
parents: 1330
diff changeset
  1032
     multiple redraws."
504987f6065c support for delayed update - it may be of general interest
Claus Gittinger <cg@exept.de>
parents: 1330
diff changeset
  1033
1361
41a53daee5cb enqueueDelayedMessage
Claus Gittinger <cg@exept.de>
parents: 1359
diff changeset
  1034
    ^ self
41a53daee5cb enqueueDelayedMessage
Claus Gittinger <cg@exept.de>
parents: 1359
diff changeset
  1035
        enqueueMessage:#delayedUpdate:with:from:
41a53daee5cb enqueueDelayedMessage
Claus Gittinger <cg@exept.de>
parents: 1359
diff changeset
  1036
        for:self
41a53daee5cb enqueueDelayedMessage
Claus Gittinger <cg@exept.de>
parents: 1359
diff changeset
  1037
        arguments:(Array 
41a53daee5cb enqueueDelayedMessage
Claus Gittinger <cg@exept.de>
parents: 1359
diff changeset
  1038
                        with:something 
41a53daee5cb enqueueDelayedMessage
Claus Gittinger <cg@exept.de>
parents: 1359
diff changeset
  1039
                        with:aParameter 
41a53daee5cb enqueueDelayedMessage
Claus Gittinger <cg@exept.de>
parents: 1359
diff changeset
  1040
                        with:changedObject).
41a53daee5cb enqueueDelayedMessage
Claus Gittinger <cg@exept.de>
parents: 1359
diff changeset
  1041
41a53daee5cb enqueueDelayedMessage
Claus Gittinger <cg@exept.de>
parents: 1359
diff changeset
  1042
    "Modified: / 26.2.2000 / 18:01:44 / cg"
41a53daee5cb enqueueDelayedMessage
Claus Gittinger <cg@exept.de>
parents: 1359
diff changeset
  1043
!
41a53daee5cb enqueueDelayedMessage
Claus Gittinger <cg@exept.de>
parents: 1359
diff changeset
  1044
41a53daee5cb enqueueDelayedMessage
Claus Gittinger <cg@exept.de>
parents: 1359
diff changeset
  1045
enqueueMessage:selector for:someone arguments:argList
41a53daee5cb enqueueDelayedMessage
Claus Gittinger <cg@exept.de>
parents: 1359
diff changeset
  1046
    |window sensor|
1332
504987f6065c support for delayed update - it may be of general interest
Claus Gittinger <cg@exept.de>
parents: 1330
diff changeset
  1047
504987f6065c support for delayed update - it may be of general interest
Claus Gittinger <cg@exept.de>
parents: 1330
diff changeset
  1048
    (window := self window) notNil ifTrue:[
504987f6065c support for delayed update - it may be of general interest
Claus Gittinger <cg@exept.de>
parents: 1330
diff changeset
  1049
        sensor := window sensor.
504987f6065c support for delayed update - it may be of general interest
Claus Gittinger <cg@exept.de>
parents: 1330
diff changeset
  1050
    ].
504987f6065c support for delayed update - it may be of general interest
Claus Gittinger <cg@exept.de>
parents: 1330
diff changeset
  1051
    sensor isNil ifTrue:[
504987f6065c support for delayed update - it may be of general interest
Claus Gittinger <cg@exept.de>
parents: 1330
diff changeset
  1052
        "/ already closed, or not yet open
504987f6065c support for delayed update - it may be of general interest
Claus Gittinger <cg@exept.de>
parents: 1330
diff changeset
  1053
1361
41a53daee5cb enqueueDelayedMessage
Claus Gittinger <cg@exept.de>
parents: 1359
diff changeset
  1054
        ^ someone perform:selector withArguments:argList.
1332
504987f6065c support for delayed update - it may be of general interest
Claus Gittinger <cg@exept.de>
parents: 1330
diff changeset
  1055
    ].
504987f6065c support for delayed update - it may be of general interest
Claus Gittinger <cg@exept.de>
parents: 1330
diff changeset
  1056
504987f6065c support for delayed update - it may be of general interest
Claus Gittinger <cg@exept.de>
parents: 1330
diff changeset
  1057
    "/
504987f6065c support for delayed update - it may be of general interest
Claus Gittinger <cg@exept.de>
parents: 1330
diff changeset
  1058
    "/ if such an update is already in the queue, ignore it.
504987f6065c support for delayed update - it may be of general interest
Claus Gittinger <cg@exept.de>
parents: 1330
diff changeset
  1059
    "/ Otherwise push it as an event, to be handled when I am back
504987f6065c support for delayed update - it may be of general interest
Claus Gittinger <cg@exept.de>
parents: 1330
diff changeset
  1060
    "/
504987f6065c support for delayed update - it may be of general interest
Claus Gittinger <cg@exept.de>
parents: 1330
diff changeset
  1061
    (sensor 
1361
41a53daee5cb enqueueDelayedMessage
Claus Gittinger <cg@exept.de>
parents: 1359
diff changeset
  1062
      hasEvent:selector
41a53daee5cb enqueueDelayedMessage
Claus Gittinger <cg@exept.de>
parents: 1359
diff changeset
  1063
      for:someone
1332
504987f6065c support for delayed update - it may be of general interest
Claus Gittinger <cg@exept.de>
parents: 1330
diff changeset
  1064
      withArguments:argList) ifTrue:[
504987f6065c support for delayed update - it may be of general interest
Claus Gittinger <cg@exept.de>
parents: 1330
diff changeset
  1065
        ^ self
504987f6065c support for delayed update - it may be of general interest
Claus Gittinger <cg@exept.de>
parents: 1330
diff changeset
  1066
    ].
504987f6065c support for delayed update - it may be of general interest
Claus Gittinger <cg@exept.de>
parents: 1330
diff changeset
  1067
    sensor
1361
41a53daee5cb enqueueDelayedMessage
Claus Gittinger <cg@exept.de>
parents: 1359
diff changeset
  1068
      pushUserEvent:selector
41a53daee5cb enqueueDelayedMessage
Claus Gittinger <cg@exept.de>
parents: 1359
diff changeset
  1069
      for:someone
1332
504987f6065c support for delayed update - it may be of general interest
Claus Gittinger <cg@exept.de>
parents: 1330
diff changeset
  1070
      withArguments:argList
504987f6065c support for delayed update - it may be of general interest
Claus Gittinger <cg@exept.de>
parents: 1330
diff changeset
  1071
504987f6065c support for delayed update - it may be of general interest
Claus Gittinger <cg@exept.de>
parents: 1330
diff changeset
  1072
    "Modified: / 5.2.2000 / 00:01:54 / cg"
1361
41a53daee5cb enqueueDelayedMessage
Claus Gittinger <cg@exept.de>
parents: 1359
diff changeset
  1073
    "Created: / 26.2.2000 / 18:01:31 / cg"
1332
504987f6065c support for delayed update - it may be of general interest
Claus Gittinger <cg@exept.de>
parents: 1330
diff changeset
  1074
! !
504987f6065c support for delayed update - it may be of general interest
Claus Gittinger <cg@exept.de>
parents: 1330
diff changeset
  1075
428
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  1076
!ApplicationModel methodsFor:'component manipulations'!
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  1077
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  1078
components:aSymbolOrArray do:aBlock
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  1079
    "evaluate aBlock for all components listed aSymbolOrArray."
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  1080
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  1081
    |coll|
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  1082
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  1083
    aSymbolOrArray isSymbol ifTrue:[
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  1084
        "/ a single components name
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  1085
        coll := Array with:aSymbolOrArray
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  1086
    ] ifFalse:[
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  1087
        coll := aSymbolOrArray
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  1088
    ].
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  1089
    coll do:[:aSymbol |
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  1090
        |component|
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  1091
500
3a387d00c0ff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 483
diff changeset
  1092
        (component := self componentFor:aSymbol) isNil ifFalse:[
428
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  1093
            aBlock value:component
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  1094
        ]
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  1095
    ]
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  1096
500
3a387d00c0ff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 483
diff changeset
  1097
    "Modified: 26.3.1997 / 16:23:14 / cg"
428
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  1098
!
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  1099
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  1100
disable:aSymbolOrArray
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  1101
    "disable the components whose id's are aSymbolOrArray."
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  1102
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  1103
    self components:aSymbolOrArray do:[:comp | comp disable]
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  1104
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  1105
    "Modified: 14.2.1997 / 17:32:09 / cg"
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  1106
!
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  1107
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  1108
enable:aSymbolOrArray
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  1109
    "enables the component(s) identified by aSymbolOrArray."
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  1110
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  1111
    self components:aSymbolOrArray do:[:comp | comp enable]
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  1112
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  1113
    "Modified: 14.2.1997 / 17:32:19 / cg"
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  1114
!
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  1115
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  1116
invalidate:aSymbolOrArray
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  1117
    "invalidates the component(s) identified by aSymbolOrArray."
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  1118
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  1119
    self components:aSymbolOrArray do:[:comp | comp invalidate]
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  1120
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  1121
    "Modified: 14.2.1997 / 17:32:28 / cg"
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  1122
!
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  1123
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  1124
makeInvisible:aSymbolOrArray
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  1125
    "makes the components whose id's are aSymbolOrArray invisible"
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  1126
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  1127
    self components:aSymbolOrArray do:[:comp | comp beInvisible]
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  1128
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  1129
    "Modified: 14.2.1997 / 17:32:42 / cg"
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  1130
!
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  1131
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  1132
makeReadOnly:aSymbolOrArray
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  1133
    "make all components identified by aSymbolOrArray read only
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  1134
     (for editText components)."
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  1135
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  1136
    self components:aSymbolOrArray do:[:comp | comp readOnly:true]
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  1137
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  1138
    "Modified: 14.2.1997 / 17:36:22 / cg"
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  1139
!
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  1140
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  1141
makeVisible:aSymbolOrArray
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  1142
    "makes the components whose id's are aSymbolOrArray visible"
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  1143
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  1144
    self components:aSymbolOrArray do:[:comp | comp beVisible]
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  1145
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  1146
    "Modified: 14.2.1997 / 17:32:52 / cg"
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  1147
!
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  1148
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  1149
makeWritable:aSymbolOrArray
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  1150
    "make all components identified by aSymbolOrArray writable 
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  1151
     (for editText components)."
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  1152
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  1153
    self components:aSymbolOrArray do:[:comp | comp readOnly:false]
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  1154
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  1155
    "Created: 14.2.1997 / 17:36:17 / cg"
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  1156
! !
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  1157
901
55496ab4edae checkin from browser
Claus Gittinger <cg@exept.de>
parents: 866
diff changeset
  1158
!ApplicationModel methodsFor:'copying'!
55496ab4edae checkin from browser
Claus Gittinger <cg@exept.de>
parents: 866
diff changeset
  1159
55496ab4edae checkin from browser
Claus Gittinger <cg@exept.de>
parents: 866
diff changeset
  1160
postCopy
55496ab4edae checkin from browser
Claus Gittinger <cg@exept.de>
parents: 866
diff changeset
  1161
    builder := device := nil.
55496ab4edae checkin from browser
Claus Gittinger <cg@exept.de>
parents: 866
diff changeset
  1162
55496ab4edae checkin from browser
Claus Gittinger <cg@exept.de>
parents: 866
diff changeset
  1163
    "Created: / 19.4.1998 / 11:44:44 / cg"
55496ab4edae checkin from browser
Claus Gittinger <cg@exept.de>
parents: 866
diff changeset
  1164
! !
55496ab4edae checkin from browser
Claus Gittinger <cg@exept.de>
parents: 866
diff changeset
  1165
428
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  1166
!ApplicationModel methodsFor:'drag & drop'!
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  1167
521
2937b6c596b3 drop arg is always a collection
Claus Gittinger <cg@exept.de>
parents: 500
diff changeset
  1168
canDrop:aCollectionOfDropObjects in:aComponent
428
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  1169
    "drop manager asked if a drop is possible
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  1170
     - should be redefined by apps which can do it, to return true"
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  1171
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  1172
    ^ false
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  1173
521
2937b6c596b3 drop arg is always a collection
Claus Gittinger <cg@exept.de>
parents: 500
diff changeset
  1174
    "Modified: 11.4.1997 / 12:42:47 / cg"
428
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  1175
!
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  1176
521
2937b6c596b3 drop arg is always a collection
Claus Gittinger <cg@exept.de>
parents: 500
diff changeset
  1177
drop:aCollectionOfDropObjects in:aComponent at:aPoint
428
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  1178
    "drop manager wants to drop.
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  1179
     This is ony sent, if #canDrop:in: returned true.
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  1180
     Must be redefined in apps which return true to #canDrop."
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  1181
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  1182
    self subclassResponsibility
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  1183
521
2937b6c596b3 drop arg is always a collection
Claus Gittinger <cg@exept.de>
parents: 500
diff changeset
  1184
    "Modified: 11.4.1997 / 12:43:19 / cg"
428
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  1185
! !
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  1186
429
3311c88f2a0e dialog opening stuff
ca
parents: 428
diff changeset
  1187
!ApplicationModel methodsFor:'easy bindings'!
3311c88f2a0e dialog opening stuff
ca
parents: 428
diff changeset
  1188
730
cc391efb62c0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  1189
registerInterestIn:aValueModel using:aSelectorOrArray
429
3311c88f2a0e dialog opening stuff
ca
parents: 428
diff changeset
  1190
    "Register interest in a change in aValueModel using information in aSelectorOrArray.
3311c88f2a0e dialog opening stuff
ca
parents: 428
diff changeset
  1191
     aSelectorOrArray can be one of three things:  
3311c88f2a0e dialog opening stuff
ca
parents: 428
diff changeset
  1192
3311c88f2a0e dialog opening stuff
ca
parents: 428
diff changeset
  1193
            1) nil                  in which case no interest is registered
3311c88f2a0e dialog opening stuff
ca
parents: 428
diff changeset
  1194
            2) a selector           in which case the receiver is understood to be self
3311c88f2a0e dialog opening stuff
ca
parents: 428
diff changeset
  1195
            3) an Array             in which case the size is two where the first element is the
713
548898fdd1dc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 711
diff changeset
  1196
                                    message to be sent and the second element is the receiver."
429
3311c88f2a0e dialog opening stuff
ca
parents: 428
diff changeset
  1197
730
cc391efb62c0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  1198
    aSelectorOrArray isNil ifTrue:[^ aValueModel].
429
3311c88f2a0e dialog opening stuff
ca
parents: 428
diff changeset
  1199
713
548898fdd1dc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 711
diff changeset
  1200
    (aSelectorOrArray isArray) ifTrue:[
730
cc391efb62c0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  1201
        aValueModel onChangeSend:(aSelectorOrArray at:1) to:(aSelectorOrArray at:2)
429
3311c88f2a0e dialog opening stuff
ca
parents: 428
diff changeset
  1202
    ] ifFalse: [
3311c88f2a0e dialog opening stuff
ca
parents: 428
diff changeset
  1203
        aValueModel onChangeSend:aSelectorOrArray to:self
3311c88f2a0e dialog opening stuff
ca
parents: 428
diff changeset
  1204
    ].
3311c88f2a0e dialog opening stuff
ca
parents: 428
diff changeset
  1205
    ^aValueModel
3311c88f2a0e dialog opening stuff
ca
parents: 428
diff changeset
  1206
730
cc391efb62c0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  1207
    "Modified: / 31.10.1997 / 18:19:44 / cg"
429
3311c88f2a0e dialog opening stuff
ca
parents: 428
diff changeset
  1208
!
3311c88f2a0e dialog opening stuff
ca
parents: 428
diff changeset
  1209
3311c88f2a0e dialog opening stuff
ca
parents: 428
diff changeset
  1210
valueHolderFor:aSelector initialValue:anObject
3311c88f2a0e dialog opening stuff
ca
parents: 428
diff changeset
  1211
    "Return a ValueHolder on anObject." 
3311c88f2a0e dialog opening stuff
ca
parents: 428
diff changeset
  1212
3311c88f2a0e dialog opening stuff
ca
parents: 428
diff changeset
  1213
    ^ self valueHolderFor:aSelector initialValue:anObject changeMessage:nil
3311c88f2a0e dialog opening stuff
ca
parents: 428
diff changeset
  1214
3311c88f2a0e dialog opening stuff
ca
parents: 428
diff changeset
  1215
3311c88f2a0e dialog opening stuff
ca
parents: 428
diff changeset
  1216
!
3311c88f2a0e dialog opening stuff
ca
parents: 428
diff changeset
  1217
937
b4a2ba99d791 oops - forgot to add the new valueHolder to the bindings
Claus Gittinger <cg@exept.de>
parents: 933
diff changeset
  1218
valueHolderFor:aSelector initialValue:anObject changeMessage:aSelectorOrArrayOrNil
b4a2ba99d791 oops - forgot to add the new valueHolder to the bindings
Claus Gittinger <cg@exept.de>
parents: 933
diff changeset
  1219
    "Return a ValueHolder on anObject.  aSelectorOrArrayOrNil is the change information 
429
3311c88f2a0e dialog opening stuff
ca
parents: 428
diff changeset
  1220
     for the ValueHolder.  This argument is either a Symbol or an Array of two elements.  
3311c88f2a0e dialog opening stuff
ca
parents: 428
diff changeset
  1221
     If it is a Symbol, then it is the change message and the interested object is understood
3311c88f2a0e dialog opening stuff
ca
parents: 428
diff changeset
  1222
     to be the reciever.  If it is an Array, then the first element is the change message and 
3311c88f2a0e dialog opening stuff
ca
parents: 428
diff changeset
  1223
     the second element is the interested object. " 
3311c88f2a0e dialog opening stuff
ca
parents: 428
diff changeset
  1224
937
b4a2ba99d791 oops - forgot to add the new valueHolder to the bindings
Claus Gittinger <cg@exept.de>
parents: 933
diff changeset
  1225
    |holder|
b4a2ba99d791 oops - forgot to add the new valueHolder to the bindings
Claus Gittinger <cg@exept.de>
parents: 933
diff changeset
  1226
713
548898fdd1dc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 711
diff changeset
  1227
    (builder bindings includesKey:aSelector) ifFalse:[
937
b4a2ba99d791 oops - forgot to add the new valueHolder to the bindings
Claus Gittinger <cg@exept.de>
parents: 933
diff changeset
  1228
        holder := ValueHolder with:anObject.
b4a2ba99d791 oops - forgot to add the new valueHolder to the bindings
Claus Gittinger <cg@exept.de>
parents: 933
diff changeset
  1229
        builder aspectAt:aSelector put:holder.
b4a2ba99d791 oops - forgot to add the new valueHolder to the bindings
Claus Gittinger <cg@exept.de>
parents: 933
diff changeset
  1230
        aSelectorOrArrayOrNil notNil ifTrue:[
b4a2ba99d791 oops - forgot to add the new valueHolder to the bindings
Claus Gittinger <cg@exept.de>
parents: 933
diff changeset
  1231
            ^ self registerInterestIn:holder using:aSelectorOrArrayOrNil
b4a2ba99d791 oops - forgot to add the new valueHolder to the bindings
Claus Gittinger <cg@exept.de>
parents: 933
diff changeset
  1232
        ].
b4a2ba99d791 oops - forgot to add the new valueHolder to the bindings
Claus Gittinger <cg@exept.de>
parents: 933
diff changeset
  1233
        ^ holder
429
3311c88f2a0e dialog opening stuff
ca
parents: 428
diff changeset
  1234
    ].
713
548898fdd1dc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 711
diff changeset
  1235
    ^ builder aspectAt:aSelector
429
3311c88f2a0e dialog opening stuff
ca
parents: 428
diff changeset
  1236
937
b4a2ba99d791 oops - forgot to add the new valueHolder to the bindings
Claus Gittinger <cg@exept.de>
parents: 933
diff changeset
  1237
    "Modified: / 21.5.1998 / 03:31:28 / cg"
429
3311c88f2a0e dialog opening stuff
ca
parents: 428
diff changeset
  1238
! !
3311c88f2a0e dialog opening stuff
ca
parents: 428
diff changeset
  1239
1017
4bc113495af2 part of the activeHelp framework moved from ToolApplicationModel.
Claus Gittinger <cg@exept.de>
parents: 995
diff changeset
  1240
!ApplicationModel methodsFor:'help'!
4bc113495af2 part of the activeHelp framework moved from ToolApplicationModel.
Claus Gittinger <cg@exept.de>
parents: 995
diff changeset
  1241
1194
38f0d0580956 provide a default about dialog
Claus Gittinger <cg@exept.de>
parents: 1152
diff changeset
  1242
openAboutThisApplication
38f0d0580956 provide a default about dialog
Claus Gittinger <cg@exept.de>
parents: 1152
diff changeset
  1243
    "opens an about box for this application."
38f0d0580956 provide a default about dialog
Claus Gittinger <cg@exept.de>
parents: 1152
diff changeset
  1244
38f0d0580956 provide a default about dialog
Claus Gittinger <cg@exept.de>
parents: 1152
diff changeset
  1245
    |rev box myClass clsRev image msg|
38f0d0580956 provide a default about dialog
Claus Gittinger <cg@exept.de>
parents: 1152
diff changeset
  1246
38f0d0580956 provide a default about dialog
Claus Gittinger <cg@exept.de>
parents: 1152
diff changeset
  1247
    rev := ''.
38f0d0580956 provide a default about dialog
Claus Gittinger <cg@exept.de>
parents: 1152
diff changeset
  1248
    myClass := self class.
38f0d0580956 provide a default about dialog
Claus Gittinger <cg@exept.de>
parents: 1152
diff changeset
  1249
38f0d0580956 provide a default about dialog
Claus Gittinger <cg@exept.de>
parents: 1152
diff changeset
  1250
    (clsRev := myClass revision) notNil ifTrue: [rev := '  (rev: ', clsRev printString, ')'].
38f0d0580956 provide a default about dialog
Claus Gittinger <cg@exept.de>
parents: 1152
diff changeset
  1251
38f0d0580956 provide a default about dialog
Claus Gittinger <cg@exept.de>
parents: 1152
diff changeset
  1252
    msg := '\' withCRs , myClass name asBoldText, rev.
38f0d0580956 provide a default about dialog
Claus Gittinger <cg@exept.de>
parents: 1152
diff changeset
  1253
38f0d0580956 provide a default about dialog
Claus Gittinger <cg@exept.de>
parents: 1152
diff changeset
  1254
    AboutBox isNil ifTrue:[
38f0d0580956 provide a default about dialog
Claus Gittinger <cg@exept.de>
parents: 1152
diff changeset
  1255
        "/ this handles bad installations of ST/X,
38f0d0580956 provide a default about dialog
Claus Gittinger <cg@exept.de>
parents: 1152
diff changeset
  1256
        "/ where the AboutBox is missing.
38f0d0580956 provide a default about dialog
Claus Gittinger <cg@exept.de>
parents: 1152
diff changeset
  1257
        "/ (May vanish in the future)
38f0d0580956 provide a default about dialog
Claus Gittinger <cg@exept.de>
parents: 1152
diff changeset
  1258
        ^ self information:msg
38f0d0580956 provide a default about dialog
Claus Gittinger <cg@exept.de>
parents: 1152
diff changeset
  1259
    ].
38f0d0580956 provide a default about dialog
Claus Gittinger <cg@exept.de>
parents: 1152
diff changeset
  1260
38f0d0580956 provide a default about dialog
Claus Gittinger <cg@exept.de>
parents: 1152
diff changeset
  1261
    box := AboutBox title:msg.
38f0d0580956 provide a default about dialog
Claus Gittinger <cg@exept.de>
parents: 1152
diff changeset
  1262
38f0d0580956 provide a default about dialog
Claus Gittinger <cg@exept.de>
parents: 1152
diff changeset
  1263
    image := self class defaultIcon.
38f0d0580956 provide a default about dialog
Claus Gittinger <cg@exept.de>
parents: 1152
diff changeset
  1264
    image notNil ifTrue:[
38f0d0580956 provide a default about dialog
Claus Gittinger <cg@exept.de>
parents: 1152
diff changeset
  1265
        box image:image
38f0d0580956 provide a default about dialog
Claus Gittinger <cg@exept.de>
parents: 1152
diff changeset
  1266
    ].
38f0d0580956 provide a default about dialog
Claus Gittinger <cg@exept.de>
parents: 1152
diff changeset
  1267
    box   label:'About This Application'.
38f0d0580956 provide a default about dialog
Claus Gittinger <cg@exept.de>
parents: 1152
diff changeset
  1268
    box   autoHideAfter:10 with:[].
38f0d0580956 provide a default about dialog
Claus Gittinger <cg@exept.de>
parents: 1152
diff changeset
  1269
    box   showAtPointer.
38f0d0580956 provide a default about dialog
Claus Gittinger <cg@exept.de>
parents: 1152
diff changeset
  1270
38f0d0580956 provide a default about dialog
Claus Gittinger <cg@exept.de>
parents: 1152
diff changeset
  1271
38f0d0580956 provide a default about dialog
Claus Gittinger <cg@exept.de>
parents: 1152
diff changeset
  1272
!
38f0d0580956 provide a default about dialog
Claus Gittinger <cg@exept.de>
parents: 1152
diff changeset
  1273
1214
6045d3950688 openHelpViewOnFile
tm
parents: 1211
diff changeset
  1274
openHelpViewOnFile:pathToHelpText
6045d3950688 openHelpViewOnFile
tm
parents: 1211
diff changeset
  1275
    "open a help viewer (as opened by the help buttons).
6045d3950688 openHelpViewOnFile
tm
parents: 1211
diff changeset
  1276
     The argument is a relative path within the help directory
6045d3950688 openHelpViewOnFile
tm
parents: 1211
diff changeset
  1277
     (but a file under the current directory is tried first)"
6045d3950688 openHelpViewOnFile
tm
parents: 1211
diff changeset
  1278
6045d3950688 openHelpViewOnFile
tm
parents: 1211
diff changeset
  1279
    self withWaitCursorDo:[
6045d3950688 openHelpViewOnFile
tm
parents: 1211
diff changeset
  1280
        HTMLDocumentView openFullOnHelpFile:pathToHelpText
6045d3950688 openHelpViewOnFile
tm
parents: 1211
diff changeset
  1281
    ]
6045d3950688 openHelpViewOnFile
tm
parents: 1211
diff changeset
  1282
6045d3950688 openHelpViewOnFile
tm
parents: 1211
diff changeset
  1283
!
6045d3950688 openHelpViewOnFile
tm
parents: 1211
diff changeset
  1284
1017
4bc113495af2 part of the activeHelp framework moved from ToolApplicationModel.
Claus Gittinger <cg@exept.de>
parents: 995
diff changeset
  1285
showActiveHelp:aHelpText for:view
4bc113495af2 part of the activeHelp framework moved from ToolApplicationModel.
Claus Gittinger <cg@exept.de>
parents: 995
diff changeset
  1286
    "This is invoked from the activeHelp event listener, to display some popup-help
4bc113495af2 part of the activeHelp framework moved from ToolApplicationModel.
Claus Gittinger <cg@exept.de>
parents: 995
diff changeset
  1287
     for a component. If false is returned, the help manager will pop up
4bc113495af2 part of the activeHelp framework moved from ToolApplicationModel.
Claus Gittinger <cg@exept.de>
parents: 995
diff changeset
  1288
     some active help bubble; if true is returned, it will assume that the
4bc113495af2 part of the activeHelp framework moved from ToolApplicationModel.
Claus Gittinger <cg@exept.de>
parents: 995
diff changeset
  1289
     help text has been already displayed and will not do any further actions.
4bc113495af2 part of the activeHelp framework moved from ToolApplicationModel.
Claus Gittinger <cg@exept.de>
parents: 995
diff changeset
  1290
     Here, we accept the help text, and push an event into out own input
4bc113495af2 part of the activeHelp framework moved from ToolApplicationModel.
Claus Gittinger <cg@exept.de>
parents: 995
diff changeset
  1291
     queue, so that the help text will be displayed asyncronously by myself,
4bc113495af2 part of the activeHelp framework moved from ToolApplicationModel.
Claus Gittinger <cg@exept.de>
parents: 995
diff changeset
  1292
     vis the #showHelp:for: method.
4bc113495af2 part of the activeHelp framework moved from ToolApplicationModel.
Claus Gittinger <cg@exept.de>
parents: 995
diff changeset
  1293
     This can be redefined in concrete classes to handle active help differently."
4bc113495af2 part of the activeHelp framework moved from ToolApplicationModel.
Claus Gittinger <cg@exept.de>
parents: 995
diff changeset
  1294
4bc113495af2 part of the activeHelp framework moved from ToolApplicationModel.
Claus Gittinger <cg@exept.de>
parents: 995
diff changeset
  1295
    |wg mySensor|
4bc113495af2 part of the activeHelp framework moved from ToolApplicationModel.
Claus Gittinger <cg@exept.de>
parents: 995
diff changeset
  1296
1050
c062ec647d98 fixed #windowGroup - if there is a masterApp
Claus Gittinger <cg@exept.de>
parents: 1024
diff changeset
  1297
    self showingHelp ifFalse: [
c062ec647d98 fixed #windowGroup - if there is a masterApp
Claus Gittinger <cg@exept.de>
parents: 1024
diff changeset
  1298
        ^ true
c062ec647d98 fixed #windowGroup - if there is a masterApp
Claus Gittinger <cg@exept.de>
parents: 1024
diff changeset
  1299
    ].
1017
4bc113495af2 part of the activeHelp framework moved from ToolApplicationModel.
Claus Gittinger <cg@exept.de>
parents: 995
diff changeset
  1300
1024
0d62cb3da243 switch on active help / no activeHelp event listener to the masterApp
tz
parents: 1020
diff changeset
  1301
"/    masterApplication notNil ifTrue:[
0d62cb3da243 switch on active help / no activeHelp event listener to the masterApp
tz
parents: 1020
diff changeset
  1302
"/        (masterApplication showActiveHelp:aHelpText for:view) ifTrue:[
0d62cb3da243 switch on active help / no activeHelp event listener to the masterApp
tz
parents: 1020
diff changeset
  1303
"/            ^ true
0d62cb3da243 switch on active help / no activeHelp event listener to the masterApp
tz
parents: 1020
diff changeset
  1304
"/        ]
0d62cb3da243 switch on active help / no activeHelp event listener to the masterApp
tz
parents: 1020
diff changeset
  1305
"/    ].
1017
4bc113495af2 part of the activeHelp framework moved from ToolApplicationModel.
Claus Gittinger <cg@exept.de>
parents: 995
diff changeset
  1306
4bc113495af2 part of the activeHelp framework moved from ToolApplicationModel.
Claus Gittinger <cg@exept.de>
parents: 995
diff changeset
  1307
    "/ NEW: push it into the event queue, to have it displayed
4bc113495af2 part of the activeHelp framework moved from ToolApplicationModel.
Claus Gittinger <cg@exept.de>
parents: 995
diff changeset
  1308
    "/ syncronously with other events.
4bc113495af2 part of the activeHelp framework moved from ToolApplicationModel.
Claus Gittinger <cg@exept.de>
parents: 995
diff changeset
  1309
    "/ (also any errors are reported as occurring in my context;
4bc113495af2 part of the activeHelp framework moved from ToolApplicationModel.
Claus Gittinger <cg@exept.de>
parents: 995
diff changeset
  1310
    "/  instead of occurring in the activeHelp context).
4bc113495af2 part of the activeHelp framework moved from ToolApplicationModel.
Claus Gittinger <cg@exept.de>
parents: 995
diff changeset
  1311
4bc113495af2 part of the activeHelp framework moved from ToolApplicationModel.
Claus Gittinger <cg@exept.de>
parents: 995
diff changeset
  1312
    (wg := self windowGroup) notNil ifTrue:[
4bc113495af2 part of the activeHelp framework moved from ToolApplicationModel.
Claus Gittinger <cg@exept.de>
parents: 995
diff changeset
  1313
        mySensor := wg sensor.
4bc113495af2 part of the activeHelp framework moved from ToolApplicationModel.
Claus Gittinger <cg@exept.de>
parents: 995
diff changeset
  1314
        mySensor notNil ifTrue:[
4bc113495af2 part of the activeHelp framework moved from ToolApplicationModel.
Claus Gittinger <cg@exept.de>
parents: 995
diff changeset
  1315
            mySensor flushEventsFor:self withType:#showHelp:for:.
4bc113495af2 part of the activeHelp framework moved from ToolApplicationModel.
Claus Gittinger <cg@exept.de>
parents: 995
diff changeset
  1316
            mySensor 
4bc113495af2 part of the activeHelp framework moved from ToolApplicationModel.
Claus Gittinger <cg@exept.de>
parents: 995
diff changeset
  1317
                pushUserEvent:#showHelp:for: for:self 
4bc113495af2 part of the activeHelp framework moved from ToolApplicationModel.
Claus Gittinger <cg@exept.de>
parents: 995
diff changeset
  1318
                withArguments:(Array with:aHelpText with:view).
1050
c062ec647d98 fixed #windowGroup - if there is a masterApp
Claus Gittinger <cg@exept.de>
parents: 1024
diff changeset
  1319
            ^ true
c062ec647d98 fixed #windowGroup - if there is a masterApp
Claus Gittinger <cg@exept.de>
parents: 1024
diff changeset
  1320
        ]
1017
4bc113495af2 part of the activeHelp framework moved from ToolApplicationModel.
Claus Gittinger <cg@exept.de>
parents: 995
diff changeset
  1321
    ].
4bc113495af2 part of the activeHelp framework moved from ToolApplicationModel.
Claus Gittinger <cg@exept.de>
parents: 995
diff changeset
  1322
1050
c062ec647d98 fixed #windowGroup - if there is a masterApp
Claus Gittinger <cg@exept.de>
parents: 1024
diff changeset
  1323
    "/ mhmh - can this happen ?
1017
4bc113495af2 part of the activeHelp framework moved from ToolApplicationModel.
Claus Gittinger <cg@exept.de>
parents: 995
diff changeset
  1324
1050
c062ec647d98 fixed #windowGroup - if there is a masterApp
Claus Gittinger <cg@exept.de>
parents: 1024
diff changeset
  1325
    ^ true
c062ec647d98 fixed #windowGroup - if there is a masterApp
Claus Gittinger <cg@exept.de>
parents: 1024
diff changeset
  1326
c062ec647d98 fixed #windowGroup - if there is a masterApp
Claus Gittinger <cg@exept.de>
parents: 1024
diff changeset
  1327
    "Modified: / 21.8.1998 / 16:00:37 / cg"
1017
4bc113495af2 part of the activeHelp framework moved from ToolApplicationModel.
Claus Gittinger <cg@exept.de>
parents: 995
diff changeset
  1328
!
4bc113495af2 part of the activeHelp framework moved from ToolApplicationModel.
Claus Gittinger <cg@exept.de>
parents: 995
diff changeset
  1329
4bc113495af2 part of the activeHelp framework moved from ToolApplicationModel.
Claus Gittinger <cg@exept.de>
parents: 995
diff changeset
  1330
showHelp:aHelpText for:view
4bc113495af2 part of the activeHelp framework moved from ToolApplicationModel.
Claus Gittinger <cg@exept.de>
parents: 995
diff changeset
  1331
    "actual method which is supposed to display the help text.
4bc113495af2 part of the activeHelp framework moved from ToolApplicationModel.
Claus Gittinger <cg@exept.de>
parents: 995
diff changeset
  1332
     Should be redefined in concrete classes, to put the help text
4bc113495af2 part of the activeHelp framework moved from ToolApplicationModel.
Claus Gittinger <cg@exept.de>
parents: 995
diff changeset
  1333
     into some info label, or the windows title bar.
4bc113495af2 part of the activeHelp framework moved from ToolApplicationModel.
Claus Gittinger <cg@exept.de>
parents: 995
diff changeset
  1334
     Here, the help text is ignored."
4bc113495af2 part of the activeHelp framework moved from ToolApplicationModel.
Claus Gittinger <cg@exept.de>
parents: 995
diff changeset
  1335
4bc113495af2 part of the activeHelp framework moved from ToolApplicationModel.
Claus Gittinger <cg@exept.de>
parents: 995
diff changeset
  1336
    masterApplication notNil ifTrue:[
4bc113495af2 part of the activeHelp framework moved from ToolApplicationModel.
Claus Gittinger <cg@exept.de>
parents: 995
diff changeset
  1337
        masterApplication showHelp:aHelpText for:view
4bc113495af2 part of the activeHelp framework moved from ToolApplicationModel.
Claus Gittinger <cg@exept.de>
parents: 995
diff changeset
  1338
    ].
4bc113495af2 part of the activeHelp framework moved from ToolApplicationModel.
Claus Gittinger <cg@exept.de>
parents: 995
diff changeset
  1339
4bc113495af2 part of the activeHelp framework moved from ToolApplicationModel.
Claus Gittinger <cg@exept.de>
parents: 995
diff changeset
  1340
    "Modified: / 31.7.1998 / 19:13:59 / cg"
4bc113495af2 part of the activeHelp framework moved from ToolApplicationModel.
Claus Gittinger <cg@exept.de>
parents: 995
diff changeset
  1341
!
4bc113495af2 part of the activeHelp framework moved from ToolApplicationModel.
Claus Gittinger <cg@exept.de>
parents: 995
diff changeset
  1342
4bc113495af2 part of the activeHelp framework moved from ToolApplicationModel.
Claus Gittinger <cg@exept.de>
parents: 995
diff changeset
  1343
showingHelp
1024
0d62cb3da243 switch on active help / no activeHelp event listener to the masterApp
tz
parents: 1020
diff changeset
  1344
    "return true, if the activeHelp manager should invoke my #showHelp:for:
1017
4bc113495af2 part of the activeHelp framework moved from ToolApplicationModel.
Claus Gittinger <cg@exept.de>
parents: 995
diff changeset
  1345
     method, when the mouse pointer is moved over my widgets.
1024
0d62cb3da243 switch on active help / no activeHelp event listener to the masterApp
tz
parents: 1020
diff changeset
  1346
     The default here is true, however, the #showHelp:for: methods are empty.
1017
4bc113495af2 part of the activeHelp framework moved from ToolApplicationModel.
Claus Gittinger <cg@exept.de>
parents: 995
diff changeset
  1347
     These should be redefined to put the help text into some info label,
4bc113495af2 part of the activeHelp framework moved from ToolApplicationModel.
Claus Gittinger <cg@exept.de>
parents: 995
diff changeset
  1348
     or into the views title bar.
4bc113495af2 part of the activeHelp framework moved from ToolApplicationModel.
Claus Gittinger <cg@exept.de>
parents: 995
diff changeset
  1349
     You may also redefine the showingHelp/showingHelp: methods, to
4bc113495af2 part of the activeHelp framework moved from ToolApplicationModel.
Claus Gittinger <cg@exept.de>
parents: 995
diff changeset
  1350
     remember the flag setting."
4bc113495af2 part of the activeHelp framework moved from ToolApplicationModel.
Claus Gittinger <cg@exept.de>
parents: 995
diff changeset
  1351
4bc113495af2 part of the activeHelp framework moved from ToolApplicationModel.
Claus Gittinger <cg@exept.de>
parents: 995
diff changeset
  1352
    ^ true
4bc113495af2 part of the activeHelp framework moved from ToolApplicationModel.
Claus Gittinger <cg@exept.de>
parents: 995
diff changeset
  1353
4bc113495af2 part of the activeHelp framework moved from ToolApplicationModel.
Claus Gittinger <cg@exept.de>
parents: 995
diff changeset
  1354
    "Modified: / 31.7.1998 / 17:55:31 / cg"
4bc113495af2 part of the activeHelp framework moved from ToolApplicationModel.
Claus Gittinger <cg@exept.de>
parents: 995
diff changeset
  1355
! !
4bc113495af2 part of the activeHelp framework moved from ToolApplicationModel.
Claus Gittinger <cg@exept.de>
parents: 995
diff changeset
  1356
52
6dc870beba69 *** empty log message ***
claus
parents: 50
diff changeset
  1357
!ApplicationModel methodsFor:'initialization'!
6dc870beba69 *** empty log message ***
claus
parents: 50
diff changeset
  1358
138
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
  1359
addTopViewsToCurrentProject
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
  1360
    "add all of my topViews to the current projects list of views.
371
ce94ec6a38ee more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
  1361
     This allows hiding views on a per-project basis.
ce94ec6a38ee more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
  1362
     Applications which do not want to be switched with projects
ce94ec6a38ee more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
  1363
     (such as the Launcher), may redefine this to a noop."
85
claus
parents: 83
diff changeset
  1364
138
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
  1365
    self windowGroup topViews do:[:aView |
371
ce94ec6a38ee more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
  1366
        aView addToCurrentProject
138
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
  1367
    ]
371
ce94ec6a38ee more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
  1368
ce94ec6a38ee more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
  1369
    "Modified: 17.1.1997 / 19:43:39 / cg"
85
claus
parents: 83
diff changeset
  1370
!
claus
parents: 83
diff changeset
  1371
63
claus
parents: 61
diff changeset
  1372
basicInitialize
69
claus
parents: 63
diff changeset
  1373
    "initialize the application.
371
ce94ec6a38ee more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
  1374
     Since ST-80 applications seem commonly to redefine #initialize
69
claus
parents: 63
diff changeset
  1375
     without doing a super initialize, the real initialization is
claus
parents: 63
diff changeset
  1376
     done here ..."
claus
parents: 63
diff changeset
  1377
311
fa222d8a208c allow opening an app on another device
Claus Gittinger <cg@exept.de>
parents: 310
diff changeset
  1378
    device := Screen current.
fa222d8a208c allow opening an app on another device
Claus Gittinger <cg@exept.de>
parents: 310
diff changeset
  1379
72
claus
parents: 71
diff changeset
  1380
    "claus: I wanted to delay the creation & assignment of the
claus
parents: 71
diff changeset
  1381
     builder till later, to allow setting to another builder.
claus
parents: 71
diff changeset
  1382
     however, some ST-80 code accesses the builder right after instance
claus
parents: 71
diff changeset
  1383
     creation ..."
claus
parents: 71
diff changeset
  1384
claus
parents: 71
diff changeset
  1385
"/    "
claus
parents: 71
diff changeset
  1386
"/     Create a windowBuilder to have someone around which
claus
parents: 71
diff changeset
  1387
"/     understands the builder protocol. Since UIBuilder is not present
claus
parents: 71
diff changeset
  1388
"/     in all systems, this allows operation without one (unless a spec
claus
parents: 71
diff changeset
  1389
"/     is read later ...)
claus
parents: 71
diff changeset
  1390
"/    "
975
7edaf9f69ef7 must create the builder just before building
Claus Gittinger <cg@exept.de>
parents: 969
diff changeset
  1391
7edaf9f69ef7 must create the builder just before building
Claus Gittinger <cg@exept.de>
parents: 969
diff changeset
  1392
    "/ changed - cg; create the builder later.
7edaf9f69ef7 must create the builder just before building
Claus Gittinger <cg@exept.de>
parents: 969
diff changeset
  1393
    "/ some apps (RefactoringBrowser) depend on this being set
7edaf9f69ef7 must create the builder just before building
Claus Gittinger <cg@exept.de>
parents: 969
diff changeset
  1394
    "/ late.
7edaf9f69ef7 must create the builder just before building
Claus Gittinger <cg@exept.de>
parents: 969
diff changeset
  1395
7edaf9f69ef7 must create the builder just before building
Claus Gittinger <cg@exept.de>
parents: 969
diff changeset
  1396
"/    builder := self builderClass new.
7edaf9f69ef7 must create the builder just before building
Claus Gittinger <cg@exept.de>
parents: 969
diff changeset
  1397
"/    builder notNil ifTrue:[builder application:self].
52
6dc870beba69 *** empty log message ***
claus
parents: 50
diff changeset
  1398
    resources := self class classResources.
311
fa222d8a208c allow opening an app on another device
Claus Gittinger <cg@exept.de>
parents: 310
diff changeset
  1399
980
3764f680134d allow subclass to redefine subCanvas-pre/postBuilds;
Claus Gittinger <cg@exept.de>
parents: 978
diff changeset
  1400
    "Modified: / 20.6.1998 / 11:53:36 / cg"
138
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
  1401
!
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
  1402
63
claus
parents: 61
diff changeset
  1403
initialize
83
claus
parents: 81
diff changeset
  1404
    "nothing done here;
claus
parents: 81
diff changeset
  1405
     but can be redefined in concrete applications"
311
fa222d8a208c allow opening an app on another device
Claus Gittinger <cg@exept.de>
parents: 310
diff changeset
  1406
!
fa222d8a208c allow opening an app on another device
Claus Gittinger <cg@exept.de>
parents: 310
diff changeset
  1407
fa222d8a208c allow opening an app on another device
Claus Gittinger <cg@exept.de>
parents: 310
diff changeset
  1408
setDevice:aDevice
fa222d8a208c allow opening an app on another device
Claus Gittinger <cg@exept.de>
parents: 310
diff changeset
  1409
    "set the device (i.e. some Screen), where the application
fa222d8a208c allow opening an app on another device
Claus Gittinger <cg@exept.de>
parents: 310
diff changeset
  1410
     shall open its view(s).
371
ce94ec6a38ee more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
  1411
     The default device (if not set here) will be the current screen."
311
fa222d8a208c allow opening an app on another device
Claus Gittinger <cg@exept.de>
parents: 310
diff changeset
  1412
fa222d8a208c allow opening an app on another device
Claus Gittinger <cg@exept.de>
parents: 310
diff changeset
  1413
    device := aDevice
fa222d8a208c allow opening an app on another device
Claus Gittinger <cg@exept.de>
parents: 310
diff changeset
  1414
fa222d8a208c allow opening an app on another device
Claus Gittinger <cg@exept.de>
parents: 310
diff changeset
  1415
    "Created: 5.7.1996 / 12:01:40 / cg"
371
ce94ec6a38ee more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
  1416
    "Modified: 17.1.1997 / 19:44:09 / cg"
138
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
  1417
! !
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
  1418
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
  1419
!ApplicationModel methodsFor:'misc'!
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
  1420
928
0933dc87a851 translate information
Claus Gittinger <cg@exept.de>
parents: 925
diff changeset
  1421
information:aString
0933dc87a851 translate information
Claus Gittinger <cg@exept.de>
parents: 925
diff changeset
  1422
    "like Objects information, but translates the string via the
0933dc87a851 translate information
Claus Gittinger <cg@exept.de>
parents: 925
diff changeset
  1423
     resourcePack, thus giving a translated string automatically"
0933dc87a851 translate information
Claus Gittinger <cg@exept.de>
parents: 925
diff changeset
  1424
0933dc87a851 translate information
Claus Gittinger <cg@exept.de>
parents: 925
diff changeset
  1425
    super information:(resources string:aString) withCRs
0933dc87a851 translate information
Claus Gittinger <cg@exept.de>
parents: 925
diff changeset
  1426
0933dc87a851 translate information
Claus Gittinger <cg@exept.de>
parents: 925
diff changeset
  1427
    "Created: / 20.5.1998 / 03:48:43 / cg"
0933dc87a851 translate information
Claus Gittinger <cg@exept.de>
parents: 925
diff changeset
  1428
!
0933dc87a851 translate information
Claus Gittinger <cg@exept.de>
parents: 925
diff changeset
  1429
287
7a733e0b5465 cursor stuff
Claus Gittinger <cg@exept.de>
parents: 240
diff changeset
  1430
restoreCursors
7a733e0b5465 cursor stuff
Claus Gittinger <cg@exept.de>
parents: 240
diff changeset
  1431
    "restore the original cursors in all of my views"
7a733e0b5465 cursor stuff
Claus Gittinger <cg@exept.de>
parents: 240
diff changeset
  1432
7a733e0b5465 cursor stuff
Claus Gittinger <cg@exept.de>
parents: 240
diff changeset
  1433
    ^ self window windowGroup restoreCursors
7a733e0b5465 cursor stuff
Claus Gittinger <cg@exept.de>
parents: 240
diff changeset
  1434
7a733e0b5465 cursor stuff
Claus Gittinger <cg@exept.de>
parents: 240
diff changeset
  1435
    "Created: 1.6.1996 / 17:01:24 / cg"
7a733e0b5465 cursor stuff
Claus Gittinger <cg@exept.de>
parents: 240
diff changeset
  1436
!
7a733e0b5465 cursor stuff
Claus Gittinger <cg@exept.de>
parents: 240
diff changeset
  1437
7a733e0b5465 cursor stuff
Claus Gittinger <cg@exept.de>
parents: 240
diff changeset
  1438
showCursor:aCursor
7a733e0b5465 cursor stuff
Claus Gittinger <cg@exept.de>
parents: 240
diff changeset
  1439
    "set all of my views cursor to aCursor.
7a733e0b5465 cursor stuff
Claus Gittinger <cg@exept.de>
parents: 240
diff changeset
  1440
     It can be restored with #restoreCursor."
7a733e0b5465 cursor stuff
Claus Gittinger <cg@exept.de>
parents: 240
diff changeset
  1441
7a733e0b5465 cursor stuff
Claus Gittinger <cg@exept.de>
parents: 240
diff changeset
  1442
    ^ self window windowGroup showCursor:aCursor
7a733e0b5465 cursor stuff
Claus Gittinger <cg@exept.de>
parents: 240
diff changeset
  1443
7a733e0b5465 cursor stuff
Claus Gittinger <cg@exept.de>
parents: 240
diff changeset
  1444
    "Created: 1.6.1996 / 17:01:09 / cg"
7a733e0b5465 cursor stuff
Claus Gittinger <cg@exept.de>
parents: 240
diff changeset
  1445
!
7a733e0b5465 cursor stuff
Claus Gittinger <cg@exept.de>
parents: 240
diff changeset
  1446
925
40209ab29c73 redefined #warn:, to translate the text
Claus Gittinger <cg@exept.de>
parents: 921
diff changeset
  1447
warn:aString
40209ab29c73 redefined #warn:, to translate the text
Claus Gittinger <cg@exept.de>
parents: 921
diff changeset
  1448
    "like Objects warn, but translates the string via the
40209ab29c73 redefined #warn:, to translate the text
Claus Gittinger <cg@exept.de>
parents: 921
diff changeset
  1449
     resourcePack, thus giving a translated string automatically"
40209ab29c73 redefined #warn:, to translate the text
Claus Gittinger <cg@exept.de>
parents: 921
diff changeset
  1450
40209ab29c73 redefined #warn:, to translate the text
Claus Gittinger <cg@exept.de>
parents: 921
diff changeset
  1451
    super warn:(resources string:aString) withCRs
40209ab29c73 redefined #warn:, to translate the text
Claus Gittinger <cg@exept.de>
parents: 921
diff changeset
  1452
40209ab29c73 redefined #warn:, to translate the text
Claus Gittinger <cg@exept.de>
parents: 921
diff changeset
  1453
    "Created: / 20.5.1998 / 01:14:52 / cg"
40209ab29c73 redefined #warn:, to translate the text
Claus Gittinger <cg@exept.de>
parents: 921
diff changeset
  1454
!
40209ab29c73 redefined #warn:, to translate the text
Claus Gittinger <cg@exept.de>
parents: 921
diff changeset
  1455
1349
fb1270fff111 added #warn:with: and #warn:with:with:
Claus Gittinger <cg@exept.de>
parents: 1337
diff changeset
  1456
warn:aString with:arg
fb1270fff111 added #warn:with: and #warn:with:with:
Claus Gittinger <cg@exept.de>
parents: 1337
diff changeset
  1457
    "like Objects warn, but translates the string via the
fb1270fff111 added #warn:with: and #warn:with:with:
Claus Gittinger <cg@exept.de>
parents: 1337
diff changeset
  1458
     resourcePack, thus giving a translated string automatically"
fb1270fff111 added #warn:with: and #warn:with:with:
Claus Gittinger <cg@exept.de>
parents: 1337
diff changeset
  1459
fb1270fff111 added #warn:with: and #warn:with:with:
Claus Gittinger <cg@exept.de>
parents: 1337
diff changeset
  1460
    super warn:(resources string:aString with:arg) withCRs
fb1270fff111 added #warn:with: and #warn:with:with:
Claus Gittinger <cg@exept.de>
parents: 1337
diff changeset
  1461
fb1270fff111 added #warn:with: and #warn:with:with:
Claus Gittinger <cg@exept.de>
parents: 1337
diff changeset
  1462
!
fb1270fff111 added #warn:with: and #warn:with:with:
Claus Gittinger <cg@exept.de>
parents: 1337
diff changeset
  1463
fb1270fff111 added #warn:with: and #warn:with:with:
Claus Gittinger <cg@exept.de>
parents: 1337
diff changeset
  1464
warn:aString with:arg1 with:arg2
fb1270fff111 added #warn:with: and #warn:with:with:
Claus Gittinger <cg@exept.de>
parents: 1337
diff changeset
  1465
    "like Objects warn, but translates the string via the
fb1270fff111 added #warn:with: and #warn:with:with:
Claus Gittinger <cg@exept.de>
parents: 1337
diff changeset
  1466
     resourcePack, thus giving a translated string automatically"
fb1270fff111 added #warn:with: and #warn:with:with:
Claus Gittinger <cg@exept.de>
parents: 1337
diff changeset
  1467
fb1270fff111 added #warn:with: and #warn:with:with:
Claus Gittinger <cg@exept.de>
parents: 1337
diff changeset
  1468
    super warn:(resources string:aString with:arg1 with:arg2) withCRs
fb1270fff111 added #warn:with: and #warn:with:with:
Claus Gittinger <cg@exept.de>
parents: 1337
diff changeset
  1469
fb1270fff111 added #warn:with: and #warn:with:with:
Claus Gittinger <cg@exept.de>
parents: 1337
diff changeset
  1470
!
fb1270fff111 added #warn:with: and #warn:with:with:
Claus Gittinger <cg@exept.de>
parents: 1337
diff changeset
  1471
1350
cf8c3c79df78 added #warn:with:with:with:
Claus Gittinger <cg@exept.de>
parents: 1349
diff changeset
  1472
warn:aString with:arg1 with:arg2 with:arg3
cf8c3c79df78 added #warn:with:with:with:
Claus Gittinger <cg@exept.de>
parents: 1349
diff changeset
  1473
    "like Objects warn, but translates the string via the
cf8c3c79df78 added #warn:with:with:with:
Claus Gittinger <cg@exept.de>
parents: 1349
diff changeset
  1474
     resourcePack, thus giving a translated string automatically"
cf8c3c79df78 added #warn:with:with:with:
Claus Gittinger <cg@exept.de>
parents: 1349
diff changeset
  1475
cf8c3c79df78 added #warn:with:with:with:
Claus Gittinger <cg@exept.de>
parents: 1349
diff changeset
  1476
    super warn:(resources string:aString with:arg1 with:arg2 with:arg3) withCRs
cf8c3c79df78 added #warn:with:with:with:
Claus Gittinger <cg@exept.de>
parents: 1349
diff changeset
  1477
cf8c3c79df78 added #warn:with:with:with:
Claus Gittinger <cg@exept.de>
parents: 1349
diff changeset
  1478
!
cf8c3c79df78 added #warn:with:with:with:
Claus Gittinger <cg@exept.de>
parents: 1349
diff changeset
  1479
1358
3870ff2d5ce3 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1350
diff changeset
  1480
warn:aString with:arg1 with:arg2 with:arg3 with:arg4
3870ff2d5ce3 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1350
diff changeset
  1481
    "like Objects warn, but translates the string via the
3870ff2d5ce3 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1350
diff changeset
  1482
     resourcePack, thus giving a translated string automatically"
3870ff2d5ce3 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1350
diff changeset
  1483
3870ff2d5ce3 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1350
diff changeset
  1484
    super warn:(resources string:aString with:arg1 with:arg2 with:arg3 with:arg4) withCRs
3870ff2d5ce3 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1350
diff changeset
  1485
3870ff2d5ce3 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1350
diff changeset
  1486
    "Created: / 23.2.2000 / 09:43:04 / cg"
3870ff2d5ce3 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1350
diff changeset
  1487
!
3870ff2d5ce3 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1350
diff changeset
  1488
138
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
  1489
withCursor:aCursor do:aBlock
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
  1490
    "evaluate aBlock, showing aCursor in my topView and all of its subviews.
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
  1491
     Return the value of aBlock."
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
  1492
1075
5b52a4b70c5d care for non-window in withCursor:do:
Claus Gittinger <cg@exept.de>
parents: 1074
diff changeset
  1493
    |w ret|
5b52a4b70c5d care for non-window in withCursor:do:
Claus Gittinger <cg@exept.de>
parents: 1074
diff changeset
  1494
5b52a4b70c5d care for non-window in withCursor:do:
Claus Gittinger <cg@exept.de>
parents: 1074
diff changeset
  1495
    w := self window.
5b52a4b70c5d care for non-window in withCursor:do:
Claus Gittinger <cg@exept.de>
parents: 1074
diff changeset
  1496
    w notNil ifTrue:[
5b52a4b70c5d care for non-window in withCursor:do:
Claus Gittinger <cg@exept.de>
parents: 1074
diff changeset
  1497
        ^ w withCursor:aCursor do:aBlock
5b52a4b70c5d care for non-window in withCursor:do:
Claus Gittinger <cg@exept.de>
parents: 1074
diff changeset
  1498
    ].
5b52a4b70c5d care for non-window in withCursor:do:
Claus Gittinger <cg@exept.de>
parents: 1074
diff changeset
  1499
    aCursor showWhile:[ret := aBlock value].
5b52a4b70c5d care for non-window in withCursor:do:
Claus Gittinger <cg@exept.de>
parents: 1074
diff changeset
  1500
    ^ ret.
5b52a4b70c5d care for non-window in withCursor:do:
Claus Gittinger <cg@exept.de>
parents: 1074
diff changeset
  1501
5b52a4b70c5d care for non-window in withCursor:do:
Claus Gittinger <cg@exept.de>
parents: 1074
diff changeset
  1502
    "Modified: / 23.9.1998 / 17:00:25 / cg"
63
claus
parents: 61
diff changeset
  1503
!
claus
parents: 61
diff changeset
  1504
142
6c6259d788a4 added withReadCursorDo: / withExecuteCursorDo:
Claus Gittinger <cg@exept.de>
parents: 138
diff changeset
  1505
withExecuteCursorDo:aBlock
6c6259d788a4 added withReadCursorDo: / withExecuteCursorDo:
Claus Gittinger <cg@exept.de>
parents: 138
diff changeset
  1506
    "evaluate aBlock, showing an executeCursor in my topView and all of its subviews.
6c6259d788a4 added withReadCursorDo: / withExecuteCursorDo:
Claus Gittinger <cg@exept.de>
parents: 138
diff changeset
  1507
     Return the value of aBlock."
6c6259d788a4 added withReadCursorDo: / withExecuteCursorDo:
Claus Gittinger <cg@exept.de>
parents: 138
diff changeset
  1508
6c6259d788a4 added withReadCursorDo: / withExecuteCursorDo:
Claus Gittinger <cg@exept.de>
parents: 138
diff changeset
  1509
    ^ self withCursor:(Cursor execute) do:aBlock
6c6259d788a4 added withReadCursorDo: / withExecuteCursorDo:
Claus Gittinger <cg@exept.de>
parents: 138
diff changeset
  1510
6c6259d788a4 added withReadCursorDo: / withExecuteCursorDo:
Claus Gittinger <cg@exept.de>
parents: 138
diff changeset
  1511
    "Created: 14.12.1995 / 20:57:03 / cg"
6c6259d788a4 added withReadCursorDo: / withExecuteCursorDo:
Claus Gittinger <cg@exept.de>
parents: 138
diff changeset
  1512
!
6c6259d788a4 added withReadCursorDo: / withExecuteCursorDo:
Claus Gittinger <cg@exept.de>
parents: 138
diff changeset
  1513
6c6259d788a4 added withReadCursorDo: / withExecuteCursorDo:
Claus Gittinger <cg@exept.de>
parents: 138
diff changeset
  1514
withReadCursorDo:aBlock
6c6259d788a4 added withReadCursorDo: / withExecuteCursorDo:
Claus Gittinger <cg@exept.de>
parents: 138
diff changeset
  1515
    "evaluate aBlock, showing a readCursor in my topView and all of its subviews.
6c6259d788a4 added withReadCursorDo: / withExecuteCursorDo:
Claus Gittinger <cg@exept.de>
parents: 138
diff changeset
  1516
     Return the value of aBlock."
6c6259d788a4 added withReadCursorDo: / withExecuteCursorDo:
Claus Gittinger <cg@exept.de>
parents: 138
diff changeset
  1517
6c6259d788a4 added withReadCursorDo: / withExecuteCursorDo:
Claus Gittinger <cg@exept.de>
parents: 138
diff changeset
  1518
    ^ self withCursor:(Cursor read) do:aBlock
6c6259d788a4 added withReadCursorDo: / withExecuteCursorDo:
Claus Gittinger <cg@exept.de>
parents: 138
diff changeset
  1519
6c6259d788a4 added withReadCursorDo: / withExecuteCursorDo:
Claus Gittinger <cg@exept.de>
parents: 138
diff changeset
  1520
    "Created: 14.12.1995 / 20:56:47 / cg"
6c6259d788a4 added withReadCursorDo: / withExecuteCursorDo:
Claus Gittinger <cg@exept.de>
parents: 138
diff changeset
  1521
    "Modified: 14.12.1995 / 20:57:36 / cg"
6c6259d788a4 added withReadCursorDo: / withExecuteCursorDo:
Claus Gittinger <cg@exept.de>
parents: 138
diff changeset
  1522
!
6c6259d788a4 added withReadCursorDo: / withExecuteCursorDo:
Claus Gittinger <cg@exept.de>
parents: 138
diff changeset
  1523
138
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
  1524
withWaitCursorDo:aBlock
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
  1525
    "evaluate aBlock, showing a waitCursor in my topView and all of its subviews.
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
  1526
     Return the value of aBlock."
63
claus
parents: 61
diff changeset
  1527
138
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
  1528
    ^ self withCursor:Cursor wait do:aBlock
52
6dc870beba69 *** empty log message ***
claus
parents: 50
diff changeset
  1529
! !
57
3984019e8f5f *** empty log message ***
claus
parents: 52
diff changeset
  1530
428
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  1531
!ApplicationModel methodsFor:'opening'!
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  1532
1115
7fa80d141ed3 added #allButOpen
Claus Gittinger <cg@exept.de>
parents: 1110
diff changeset
  1533
allButOpen
7fa80d141ed3 added #allButOpen
Claus Gittinger <cg@exept.de>
parents: 1110
diff changeset
  1534
    "create my views from the windowSpec, but do not open the main window."
7fa80d141ed3 added #allButOpen
Claus Gittinger <cg@exept.de>
parents: 1110
diff changeset
  1535
7fa80d141ed3 added #allButOpen
Claus Gittinger <cg@exept.de>
parents: 1110
diff changeset
  1536
    ^ self allButOpenInterface:#windowSpec.
7fa80d141ed3 added #allButOpen
Claus Gittinger <cg@exept.de>
parents: 1110
diff changeset
  1537
7fa80d141ed3 added #allButOpen
Claus Gittinger <cg@exept.de>
parents: 1110
diff changeset
  1538
    "Modified: / 19.6.1998 / 01:48:26 / cg"
7fa80d141ed3 added #allButOpen
Claus Gittinger <cg@exept.de>
parents: 1110
diff changeset
  1539
!
7fa80d141ed3 added #allButOpen
Claus Gittinger <cg@exept.de>
parents: 1110
diff changeset
  1540
63
claus
parents: 61
diff changeset
  1541
allButOpenFrom:aSpec
931
9d8e155b931c added #openSpec: and #openSpecModal:
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
  1542
    "create my views but do not open the main window.
9d8e155b931c added #openSpec: and #openSpecModal:
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
  1543
     The argument is a spec which defines the interface."
69
claus
parents: 63
diff changeset
  1544
723
1b6645c38f89 class queries for aspect
Claus Gittinger <cg@exept.de>
parents: 715
diff changeset
  1545
    |realBuilder window|
71
claus
parents: 69
diff changeset
  1546
72
claus
parents: 71
diff changeset
  1547
"/ DISABLED; see comment in basicInitialize
claus
parents: 71
diff changeset
  1548
"/
claus
parents: 71
diff changeset
  1549
"/    "
claus
parents: 71
diff changeset
  1550
"/     here, we kludge a bit: up to now, the builder was an
claus
parents: 71
diff changeset
  1551
"/     instance of the no-op WindowBuilder. Now, it becomes
claus
parents: 71
diff changeset
  1552
"/     a UIBuilder ....
claus
parents: 71
diff changeset
  1553
"/     This allows for ApplicationModels without a UIBuilder
claus
parents: 71
diff changeset
  1554
"/     if not needed.
claus
parents: 71
diff changeset
  1555
"/    "
claus
parents: 71
diff changeset
  1556
"/    realBuilder := UIBuilder new.
claus
parents: 71
diff changeset
  1557
"/    builder := realBuilder.
claus
parents: 71
diff changeset
  1558
"/    builder application:self.
claus
parents: 71
diff changeset
  1559
"/    builder bindings:builder bindings.
71
claus
parents: 69
diff changeset
  1560
901
55496ab4edae checkin from browser
Claus Gittinger <cg@exept.de>
parents: 866
diff changeset
  1561
    builder isNil ifTrue:[
978
cd056a68d67a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 975
diff changeset
  1562
        self createBuilder.
901
55496ab4edae checkin from browser
Claus Gittinger <cg@exept.de>
parents: 866
diff changeset
  1563
    ].
55496ab4edae checkin from browser
Claus Gittinger <cg@exept.de>
parents: 866
diff changeset
  1564
63
claus
parents: 61
diff changeset
  1565
    self preBuildWith:builder.
claus
parents: 61
diff changeset
  1566
    builder buildFromSpec:aSpec.
723
1b6645c38f89 class queries for aspect
Claus Gittinger <cg@exept.de>
parents: 715
diff changeset
  1567
    window := builder window.
1b6645c38f89 class queries for aspect
Claus Gittinger <cg@exept.de>
parents: 715
diff changeset
  1568
    window model:self.
1b6645c38f89 class queries for aspect
Claus Gittinger <cg@exept.de>
parents: 715
diff changeset
  1569
    (window respondsTo:#application:) ifTrue:[
1b6645c38f89 class queries for aspect
Claus Gittinger <cg@exept.de>
parents: 715
diff changeset
  1570
        window application:self.
472
40eaf3d339c9 set application after allButOpenFrom:
ca
parents: 464
diff changeset
  1571
    ].
1024
0d62cb3da243 switch on active help / no activeHelp event listener to the masterApp
tz
parents: 1020
diff changeset
  1572
    self showingHelp ifTrue: [ActiveHelp startFor: self].
63
claus
parents: 61
diff changeset
  1573
    self postBuildWith:builder.
723
1b6645c38f89 class queries for aspect
Claus Gittinger <cg@exept.de>
parents: 715
diff changeset
  1574
978
cd056a68d67a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 975
diff changeset
  1575
    "Modified: / 19.6.1998 / 03:35:31 / cg"
63
claus
parents: 61
diff changeset
  1576
!
57
3984019e8f5f *** empty log message ***
claus
parents: 52
diff changeset
  1577
138
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
  1578
allButOpenInterface:aSymbol
931
9d8e155b931c added #openSpec: and #openSpecModal:
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
  1579
    "create my views but do not open the main window.
9d8e155b931c added #openSpec: and #openSpecModal:
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
  1580
     The argument specifies a selector of a method,
1115
7fa80d141ed3 added #allButOpen
Claus Gittinger <cg@exept.de>
parents: 1110
diff changeset
  1581
     which when sent to myself should return a spec.
7fa80d141ed3 added #allButOpen
Claus Gittinger <cg@exept.de>
parents: 1110
diff changeset
  1582
     Notice, this returns the windowBuilder."
138
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
  1583
975
7edaf9f69ef7 must create the builder just before building
Claus Gittinger <cg@exept.de>
parents: 969
diff changeset
  1584
    self allButOpenFrom:(self interfaceSpecFor:aSymbol).
138
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
  1585
    ^ builder
770
86ff2c263a8d instance asks class for #interfaceSpecFor:
Claus Gittinger <cg@exept.de>
parents: 767
diff changeset
  1586
975
7edaf9f69ef7 must create the builder just before building
Claus Gittinger <cg@exept.de>
parents: 969
diff changeset
  1587
    "Modified: / 19.6.1998 / 01:48:26 / cg"
138
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
  1588
!
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
  1589
969
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
  1590
buildSubCanvas:spec withBuilder:aBuilder
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
  1591
    "build a subcanvases spec into aSubcanvas"
786
91d5639d9999 forward closeRequests to my masterApp, if I have one.
ca
parents: 770
diff changeset
  1592
1330
61af7e3cde29 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1305
diff changeset
  1593
    |sameApp prevSpec prevSource specToBuild|
995
63d1b9ce554b Avoid invoking pre/postBuild twice for subCanvases which
Claus Gittinger <cg@exept.de>
parents: 983
diff changeset
  1594
969
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
  1595
    builder isNil ifTrue:[
980
3764f680134d allow subclass to redefine subCanvas-pre/postBuilds;
Claus Gittinger <cg@exept.de>
parents: 978
diff changeset
  1596
        builder := aBuilder.
3764f680134d allow subclass to redefine subCanvas-pre/postBuilds;
Claus Gittinger <cg@exept.de>
parents: 978
diff changeset
  1597
        aBuilder isNil ifTrue:[
3764f680134d allow subclass to redefine subCanvas-pre/postBuilds;
Claus Gittinger <cg@exept.de>
parents: 978
diff changeset
  1598
            self createBuilder
3764f680134d allow subclass to redefine subCanvas-pre/postBuilds;
Claus Gittinger <cg@exept.de>
parents: 978
diff changeset
  1599
        ]
1205
a631dc401a71 remember builders old spec&source, when reused to build a
tm
parents: 1194
diff changeset
  1600
    ] ifFalse:[
a631dc401a71 remember builders old spec&source, when reused to build a
tm
parents: 1194
diff changeset
  1601
        prevSpec := aBuilder spec.
a631dc401a71 remember builders old spec&source, when reused to build a
tm
parents: 1194
diff changeset
  1602
        prevSource := aBuilder source.
786
91d5639d9999 forward closeRequests to my masterApp, if I have one.
ca
parents: 770
diff changeset
  1603
    ].
980
3764f680134d allow subclass to redefine subCanvas-pre/postBuilds;
Claus Gittinger <cg@exept.de>
parents: 978
diff changeset
  1604
969
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
  1605
    aBuilder source:self.
995
63d1b9ce554b Avoid invoking pre/postBuild twice for subCanvases which
Claus Gittinger <cg@exept.de>
parents: 983
diff changeset
  1606
63d1b9ce554b Avoid invoking pre/postBuild twice for subCanvases which
Claus Gittinger <cg@exept.de>
parents: 983
diff changeset
  1607
    "/ if the subcanvases appModel is NOT the same as
63d1b9ce554b Avoid invoking pre/postBuild twice for subCanvases which
Claus Gittinger <cg@exept.de>
parents: 983
diff changeset
  1608
    "/ the topApp, it must be pre/post-built.
63d1b9ce554b Avoid invoking pre/postBuild twice for subCanvases which
Claus Gittinger <cg@exept.de>
parents: 983
diff changeset
  1609
    "/ Otherwise, we invoke pre/post-builtAsSubcanvas.
63d1b9ce554b Avoid invoking pre/postBuild twice for subCanvases which
Claus Gittinger <cg@exept.de>
parents: 983
diff changeset
  1610
    "/ which provides a hook for redefinition in concrete appModels.
63d1b9ce554b Avoid invoking pre/postBuild twice for subCanvases which
Claus Gittinger <cg@exept.de>
parents: 983
diff changeset
  1611
    "/ This avoids invoking pre/postBuild twice for subCanvases which
63d1b9ce554b Avoid invoking pre/postBuild twice for subCanvases which
Claus Gittinger <cg@exept.de>
parents: 983
diff changeset
  1612
    "/ have the topApp as appModel.
63d1b9ce554b Avoid invoking pre/postBuild twice for subCanvases which
Claus Gittinger <cg@exept.de>
parents: 983
diff changeset
  1613
63d1b9ce554b Avoid invoking pre/postBuild twice for subCanvases which
Claus Gittinger <cg@exept.de>
parents: 983
diff changeset
  1614
    sameApp := aBuilder application == aBuilder window topView application.
63d1b9ce554b Avoid invoking pre/postBuild twice for subCanvases which
Claus Gittinger <cg@exept.de>
parents: 983
diff changeset
  1615
    sameApp ifTrue:[
63d1b9ce554b Avoid invoking pre/postBuild twice for subCanvases which
Claus Gittinger <cg@exept.de>
parents: 983
diff changeset
  1616
        self preBuildAsSubcanvasWith:aBuilder.
63d1b9ce554b Avoid invoking pre/postBuild twice for subCanvases which
Claus Gittinger <cg@exept.de>
parents: 983
diff changeset
  1617
    ] ifFalse:[
63d1b9ce554b Avoid invoking pre/postBuild twice for subCanvases which
Claus Gittinger <cg@exept.de>
parents: 983
diff changeset
  1618
        self preBuildWith:aBuilder.
63d1b9ce554b Avoid invoking pre/postBuild twice for subCanvases which
Claus Gittinger <cg@exept.de>
parents: 983
diff changeset
  1619
    ].
1330
61af7e3cde29 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1305
diff changeset
  1620
61af7e3cde29 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1305
diff changeset
  1621
    "/ subapps should not build the menu and other fullSpec stuff.
1224
52c9d0e95138 when building a fullSpec for existing view,
Claus Gittinger <cg@exept.de>
parents: 1217
diff changeset
  1622
    spec class == FullSpec ifTrue:[
1330
61af7e3cde29 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1305
diff changeset
  1623
        specToBuild := spec component.
1224
52c9d0e95138 when building a fullSpec for existing view,
Claus Gittinger <cg@exept.de>
parents: 1217
diff changeset
  1624
    ] ifFalse:[
1330
61af7e3cde29 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1305
diff changeset
  1625
        specToBuild := spec.
1224
52c9d0e95138 when building a fullSpec for existing view,
Claus Gittinger <cg@exept.de>
parents: 1217
diff changeset
  1626
    ].
1330
61af7e3cde29 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1305
diff changeset
  1627
    aBuilder buildFromSpec:specToBuild.
61af7e3cde29 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1305
diff changeset
  1628
995
63d1b9ce554b Avoid invoking pre/postBuild twice for subCanvases which
Claus Gittinger <cg@exept.de>
parents: 983
diff changeset
  1629
    sameApp ifTrue:[
63d1b9ce554b Avoid invoking pre/postBuild twice for subCanvases which
Claus Gittinger <cg@exept.de>
parents: 983
diff changeset
  1630
        self postBuildAsSubcanvasWith:aBuilder.
63d1b9ce554b Avoid invoking pre/postBuild twice for subCanvases which
Claus Gittinger <cg@exept.de>
parents: 983
diff changeset
  1631
    ] ifFalse:[
63d1b9ce554b Avoid invoking pre/postBuild twice for subCanvases which
Claus Gittinger <cg@exept.de>
parents: 983
diff changeset
  1632
        self postBuildWith:aBuilder.
63d1b9ce554b Avoid invoking pre/postBuild twice for subCanvases which
Claus Gittinger <cg@exept.de>
parents: 983
diff changeset
  1633
    ].
1205
a631dc401a71 remember builders old spec&source, when reused to build a
tm
parents: 1194
diff changeset
  1634
a631dc401a71 remember builders old spec&source, when reused to build a
tm
parents: 1194
diff changeset
  1635
    prevSpec notNil ifTrue:[
a631dc401a71 remember builders old spec&source, when reused to build a
tm
parents: 1194
diff changeset
  1636
        "/ restore state in builder if original builder was used
a631dc401a71 remember builders old spec&source, when reused to build a
tm
parents: 1194
diff changeset
  1637
        aBuilder spec:prevSpec.
a631dc401a71 remember builders old spec&source, when reused to build a
tm
parents: 1194
diff changeset
  1638
        aBuilder source:prevSource.
a631dc401a71 remember builders old spec&source, when reused to build a
tm
parents: 1194
diff changeset
  1639
    ].
a631dc401a71 remember builders old spec&source, when reused to build a
tm
parents: 1194
diff changeset
  1640
969
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
  1641
    ^ aBuilder
435
68081adabd45 checkin from browser
ca
parents: 432
diff changeset
  1642
969
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
  1643
    "Created: / 18.6.1998 / 20:08:45 / cg"
995
63d1b9ce554b Avoid invoking pre/postBuild twice for subCanvases which
Claus Gittinger <cg@exept.de>
parents: 983
diff changeset
  1644
    "Modified: / 8.7.1998 / 18:30:46 / cg"
138
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
  1645
!
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
  1646
69
claus
parents: 63
diff changeset
  1647
open
claus
parents: 63
diff changeset
  1648
    "open a standard interface"
claus
parents: 63
diff changeset
  1649
240
09028fa9ff5f return app in class>>open
Claus Gittinger <cg@exept.de>
parents: 221
diff changeset
  1650
    ^ self openInterface
09028fa9ff5f return app in class>>open
Claus Gittinger <cg@exept.de>
parents: 221
diff changeset
  1651
09028fa9ff5f return app in class>>open
Claus Gittinger <cg@exept.de>
parents: 221
diff changeset
  1652
    "Modified: 3.5.1996 / 13:39:15 / cg"
69
claus
parents: 63
diff changeset
  1653
!
claus
parents: 63
diff changeset
  1654
428
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  1655
openAt:aPoint
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  1656
    "open a standard interface at some point"
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  1657
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  1658
    ^ self openInterfaceAt:aPoint
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  1659
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  1660
    "Modified: 3.5.1996 / 13:39:15 / cg"
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  1661
    "Created: 14.2.1997 / 20:17:41 / cg"
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  1662
!
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  1663
969
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
  1664
openDialog
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
  1665
    "open the window - assumes that the builder has already setup
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
  1666
     the interface."
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
  1667
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
  1668
    ^ builder openDialog.
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
  1669
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
  1670
    "Modified: 14.2.1997 / 20:32:52 / cg"
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
  1671
!
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
  1672
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
  1673
openDialogInterface:aSelector
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
  1674
    "open a dialog"
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
  1675
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
  1676
    ^ self openDialogInterface:aSelector withBindings:nil
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
  1677
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
  1678
    "Modified: 28.2.1997 / 14:08:01 / cg"
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
  1679
!
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
  1680
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
  1681
openDialogInterface:aSelector withBindings:bindings
1152
2118fe2c3227 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1132
diff changeset
  1682
    "open a dialog, given a spec-selector"
969
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
  1683
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
  1684
    ^ SimpleDialog new 
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
  1685
        openFor:self 
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
  1686
        interface:aSelector 
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
  1687
        withBindings:bindings
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
  1688
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
  1689
    "Created: / 28.2.1997 / 14:07:45 / cg"
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
  1690
    "Modified: / 23.1.1998 / 18:18:14 / cg"
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
  1691
!
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
  1692
1152
2118fe2c3227 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1132
diff changeset
  1693
openDialogInterfaceSpec:aSpec withBindings:bindings
2118fe2c3227 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1132
diff changeset
  1694
    "open a dialog, given a spec"
2118fe2c3227 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1132
diff changeset
  1695
2118fe2c3227 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1132
diff changeset
  1696
    ^ SimpleDialog new 
2118fe2c3227 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1132
diff changeset
  1697
        openFor:self 
2118fe2c3227 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1132
diff changeset
  1698
        interfaceSpec:aSpec 
2118fe2c3227 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1132
diff changeset
  1699
        withBindings:bindings
2118fe2c3227 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1132
diff changeset
  1700
2118fe2c3227 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1132
diff changeset
  1701
    "Created: / 28.2.1997 / 14:07:45 / cg"
2118fe2c3227 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1132
diff changeset
  1702
    "Modified: / 23.1.1998 / 18:18:14 / cg"
2118fe2c3227 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1132
diff changeset
  1703
!
2118fe2c3227 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1132
diff changeset
  1704
969
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
  1705
openDialogSpec:aSpec withBindings:bindings
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
  1706
    "open a dialog"
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
  1707
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
  1708
    ^ SimpleDialog new 
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
  1709
        openFor:self 
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
  1710
        spec:aSpec 
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
  1711
        withBindings:bindings
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
  1712
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
  1713
    "Modified: / 23.1.1998 / 18:18:14 / cg"
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
  1714
    "Created: / 20.5.1998 / 20:27:56 / cg"
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
  1715
!
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
  1716
63
claus
parents: 61
diff changeset
  1717
openInterface
428
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  1718
    "open a standard interface.
215
369b0376e859 commentary
Claus Gittinger <cg@exept.de>
parents: 187
diff changeset
  1719
78
claus
parents: 72
diff changeset
  1720
     Subclasses which do not have an interfaceSpec 
215
369b0376e859 commentary
Claus Gittinger <cg@exept.de>
parents: 187
diff changeset
  1721
     should redefine this method and create & open their view(s) there.
330
d7ce98930ad3 Rename Launcher-->OldLauncher, NewLauncher-->Launcher.
Stefan Vogel <sv@exept.de>
parents: 313
diff changeset
  1722
     (see Launcher as an example)."
69
claus
parents: 63
diff changeset
  1723
767
acc3850cbf7e pass return values of openXX messages back to caller
Claus Gittinger <cg@exept.de>
parents: 746
diff changeset
  1724
    ^ self openInterface:#windowSpec
215
369b0376e859 commentary
Claus Gittinger <cg@exept.de>
parents: 187
diff changeset
  1725
767
acc3850cbf7e pass return values of openXX messages back to caller
Claus Gittinger <cg@exept.de>
parents: 746
diff changeset
  1726
    "Modified: / 9.9.1996 / 22:39:23 / stefan"
acc3850cbf7e pass return values of openXX messages back to caller
Claus Gittinger <cg@exept.de>
parents: 746
diff changeset
  1727
    "Modified: / 23.1.1998 / 18:16:50 / cg"
57
3984019e8f5f *** empty log message ***
claus
parents: 52
diff changeset
  1728
!
3984019e8f5f *** empty log message ***
claus
parents: 52
diff changeset
  1729
63
claus
parents: 61
diff changeset
  1730
openInterface:aSymbol
215
369b0376e859 commentary
Claus Gittinger <cg@exept.de>
parents: 187
diff changeset
  1731
    "open a specific interface. 
369b0376e859 commentary
Claus Gittinger <cg@exept.de>
parents: 187
diff changeset
  1732
     The argument, aSymbol specifies which interface. The concrete
369b0376e859 commentary
Claus Gittinger <cg@exept.de>
parents: 187
diff changeset
  1733
     application subclass must provide a method with that name,
369b0376e859 commentary
Claus Gittinger <cg@exept.de>
parents: 187
diff changeset
  1734
     which must return an interfaceSpec. This is forwarded to
369b0376e859 commentary
Claus Gittinger <cg@exept.de>
parents: 187
diff changeset
  1735
     the builder to create the views.
69
claus
parents: 63
diff changeset
  1736
     Typically, applications only use one interface, 
78
claus
parents: 72
diff changeset
  1737
     returned by the #windowSpec method."
69
claus
parents: 63
diff changeset
  1738
85
claus
parents: 83
diff changeset
  1739
    self allButOpenInterface:aSymbol.
428
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  1740
    self openWindow.
63
claus
parents: 61
diff changeset
  1741
    ^ builder
215
369b0376e859 commentary
Claus Gittinger <cg@exept.de>
parents: 187
diff changeset
  1742
428
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  1743
    "Modified: 14.2.1997 / 20:25:33 / cg"
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  1744
!
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  1745
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  1746
openInterface:aSymbol at:aLocation
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  1747
    "open a specific interface. 
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  1748
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  1749
     The argument, aSymbol specifies which interface. The concrete
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  1750
     application subclass must provide a method with that name,
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  1751
     which must return an interfaceSpec. This is forwarded to
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  1752
     the builder to create the views.
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  1753
     Typically, applications only use one interface, 
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  1754
     returned by the #windowSpec method."
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  1755
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  1756
    self allButOpenInterface:aSymbol.
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  1757
    self openWindowAt:aLocation.
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  1758
    ^ builder
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  1759
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  1760
    "Created: 14.2.1997 / 20:19:44 / cg"
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  1761
!
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  1762
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  1763
openInterfaceAt:aLocation
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  1764
    "open a standard interface."
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  1765
767
acc3850cbf7e pass return values of openXX messages back to caller
Claus Gittinger <cg@exept.de>
parents: 746
diff changeset
  1766
    ^ self openInterface:#windowSpec at:aLocation
428
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  1767
767
acc3850cbf7e pass return values of openXX messages back to caller
Claus Gittinger <cg@exept.de>
parents: 746
diff changeset
  1768
    "Created: / 14.2.1997 / 20:18:20 / cg"
acc3850cbf7e pass return values of openXX messages back to caller
Claus Gittinger <cg@exept.de>
parents: 746
diff changeset
  1769
    "Modified: / 23.1.1998 / 18:17:13 / cg"
63
claus
parents: 61
diff changeset
  1770
!
claus
parents: 61
diff changeset
  1771
657
285350fb3885 open modal
ca
parents: 614
diff changeset
  1772
openInterfaceModal
1093
002ed1df9f41 cleaned up all #open* methods;
Claus Gittinger <cg@exept.de>
parents: 1075
diff changeset
  1773
    "open a standard interface as a modal dialog.
657
285350fb3885 open modal
ca
parents: 614
diff changeset
  1774
285350fb3885 open modal
ca
parents: 614
diff changeset
  1775
     Subclasses which do not have an interfaceSpec 
285350fb3885 open modal
ca
parents: 614
diff changeset
  1776
     should redefine this method and create & open their view(s) there.
285350fb3885 open modal
ca
parents: 614
diff changeset
  1777
     (see Launcher as an example)."
285350fb3885 open modal
ca
parents: 614
diff changeset
  1778
767
acc3850cbf7e pass return values of openXX messages back to caller
Claus Gittinger <cg@exept.de>
parents: 746
diff changeset
  1779
    ^ self openInterfaceModal:#windowSpec
657
285350fb3885 open modal
ca
parents: 614
diff changeset
  1780
767
acc3850cbf7e pass return values of openXX messages back to caller
Claus Gittinger <cg@exept.de>
parents: 746
diff changeset
  1781
    "Modified: / 9.9.1996 / 22:39:23 / stefan"
acc3850cbf7e pass return values of openXX messages back to caller
Claus Gittinger <cg@exept.de>
parents: 746
diff changeset
  1782
    "Modified: / 23.1.1998 / 18:17:17 / cg"
657
285350fb3885 open modal
ca
parents: 614
diff changeset
  1783
!
285350fb3885 open modal
ca
parents: 614
diff changeset
  1784
285350fb3885 open modal
ca
parents: 614
diff changeset
  1785
openInterfaceModal:aSymbol
1093
002ed1df9f41 cleaned up all #open* methods;
Claus Gittinger <cg@exept.de>
parents: 1075
diff changeset
  1786
    "open a specific interface as a modal dialog. 
657
285350fb3885 open modal
ca
parents: 614
diff changeset
  1787
     The argument, aSymbol specifies which interface. The concrete
285350fb3885 open modal
ca
parents: 614
diff changeset
  1788
     application subclass must provide a method with that name,
285350fb3885 open modal
ca
parents: 614
diff changeset
  1789
     which must return an interfaceSpec. This is forwarded to
285350fb3885 open modal
ca
parents: 614
diff changeset
  1790
     the builder to create the views.
285350fb3885 open modal
ca
parents: 614
diff changeset
  1791
     Typically, applications only use one interface, 
285350fb3885 open modal
ca
parents: 614
diff changeset
  1792
     returned by the #windowSpec method."
285350fb3885 open modal
ca
parents: 614
diff changeset
  1793
285350fb3885 open modal
ca
parents: 614
diff changeset
  1794
    self allButOpenInterface:aSymbol.
285350fb3885 open modal
ca
parents: 614
diff changeset
  1795
    self openWindowModal.
285350fb3885 open modal
ca
parents: 614
diff changeset
  1796
    ^ builder
285350fb3885 open modal
ca
parents: 614
diff changeset
  1797
285350fb3885 open modal
ca
parents: 614
diff changeset
  1798
    "Modified: 14.2.1997 / 20:25:33 / cg"
285350fb3885 open modal
ca
parents: 614
diff changeset
  1799
!
285350fb3885 open modal
ca
parents: 614
diff changeset
  1800
1093
002ed1df9f41 cleaned up all #open* methods;
Claus Gittinger <cg@exept.de>
parents: 1075
diff changeset
  1801
openInterfaceModal:aSymbol at:location
002ed1df9f41 cleaned up all #open* methods;
Claus Gittinger <cg@exept.de>
parents: 1075
diff changeset
  1802
    "open a specific interface modal at some screen location. 
002ed1df9f41 cleaned up all #open* methods;
Claus Gittinger <cg@exept.de>
parents: 1075
diff changeset
  1803
     The argument, aSymbol specifies which interface. The concrete
002ed1df9f41 cleaned up all #open* methods;
Claus Gittinger <cg@exept.de>
parents: 1075
diff changeset
  1804
     application subclass must provide a method with that name,
002ed1df9f41 cleaned up all #open* methods;
Claus Gittinger <cg@exept.de>
parents: 1075
diff changeset
  1805
     which must return an interfaceSpec. This is forwarded to
002ed1df9f41 cleaned up all #open* methods;
Claus Gittinger <cg@exept.de>
parents: 1075
diff changeset
  1806
     the builder to create the views.
002ed1df9f41 cleaned up all #open* methods;
Claus Gittinger <cg@exept.de>
parents: 1075
diff changeset
  1807
     Typically, applications only use one interface, 
002ed1df9f41 cleaned up all #open* methods;
Claus Gittinger <cg@exept.de>
parents: 1075
diff changeset
  1808
     returned by the #windowSpec method."
002ed1df9f41 cleaned up all #open* methods;
Claus Gittinger <cg@exept.de>
parents: 1075
diff changeset
  1809
002ed1df9f41 cleaned up all #open* methods;
Claus Gittinger <cg@exept.de>
parents: 1075
diff changeset
  1810
    self allButOpenInterface:aSymbol.
002ed1df9f41 cleaned up all #open* methods;
Claus Gittinger <cg@exept.de>
parents: 1075
diff changeset
  1811
    self openWindowModalAt:location.
002ed1df9f41 cleaned up all #open* methods;
Claus Gittinger <cg@exept.de>
parents: 1075
diff changeset
  1812
    ^ builder
002ed1df9f41 cleaned up all #open* methods;
Claus Gittinger <cg@exept.de>
parents: 1075
diff changeset
  1813
002ed1df9f41 cleaned up all #open* methods;
Claus Gittinger <cg@exept.de>
parents: 1075
diff changeset
  1814
    "Modified: 14.2.1997 / 20:25:33 / cg"
002ed1df9f41 cleaned up all #open* methods;
Claus Gittinger <cg@exept.de>
parents: 1075
diff changeset
  1815
!
002ed1df9f41 cleaned up all #open* methods;
Claus Gittinger <cg@exept.de>
parents: 1075
diff changeset
  1816
657
285350fb3885 open modal
ca
parents: 614
diff changeset
  1817
openModal
1093
002ed1df9f41 cleaned up all #open* methods;
Claus Gittinger <cg@exept.de>
parents: 1075
diff changeset
  1818
    "open a standard interface as a modal dialog"
657
285350fb3885 open modal
ca
parents: 614
diff changeset
  1819
285350fb3885 open modal
ca
parents: 614
diff changeset
  1820
    ^ self openInterfaceModal
285350fb3885 open modal
ca
parents: 614
diff changeset
  1821
285350fb3885 open modal
ca
parents: 614
diff changeset
  1822
    "Modified: 3.5.1996 / 13:39:15 / cg"
285350fb3885 open modal
ca
parents: 614
diff changeset
  1823
!
285350fb3885 open modal
ca
parents: 614
diff changeset
  1824
362
52212e2a8c84 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 361
diff changeset
  1825
openOnDevice:aDevice
52212e2a8c84 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 361
diff changeset
  1826
    "open a standard interface on some other device"
52212e2a8c84 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 361
diff changeset
  1827
52212e2a8c84 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 361
diff changeset
  1828
    self setDevice:aDevice.
52212e2a8c84 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 361
diff changeset
  1829
    ^ self open
52212e2a8c84 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 361
diff changeset
  1830
52212e2a8c84 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 361
diff changeset
  1831
    "Created: 13.1.1997 / 21:24:11 / cg"
52212e2a8c84 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 361
diff changeset
  1832
    "Modified: 13.1.1997 / 21:24:30 / cg"
52212e2a8c84 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 361
diff changeset
  1833
!
52212e2a8c84 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 361
diff changeset
  1834
931
9d8e155b931c added #openSpec: and #openSpecModal:
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
  1835
openSpec:anInterfaceSpec
9d8e155b931c added #openSpec: and #openSpecModal:
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
  1836
    "open a view as specified in anInterfaceSpec."
9d8e155b931c added #openSpec: and #openSpecModal:
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
  1837
9d8e155b931c added #openSpec: and #openSpecModal:
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
  1838
    self allButOpenFrom:anInterfaceSpec.
9d8e155b931c added #openSpec: and #openSpecModal:
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
  1839
    self openWindow.
9d8e155b931c added #openSpec: and #openSpecModal:
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
  1840
    ^ builder
9d8e155b931c added #openSpec: and #openSpecModal:
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
  1841
9d8e155b931c added #openSpec: and #openSpecModal:
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
  1842
    "Modified: / 14.2.1997 / 20:25:33 / cg"
9d8e155b931c added #openSpec: and #openSpecModal:
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
  1843
    "Created: / 20.5.1998 / 20:08:51 / cg"
9d8e155b931c added #openSpec: and #openSpecModal:
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
  1844
!
9d8e155b931c added #openSpec: and #openSpecModal:
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
  1845
1093
002ed1df9f41 cleaned up all #open* methods;
Claus Gittinger <cg@exept.de>
parents: 1075
diff changeset
  1846
openSpecModal:anInterfaceSpec
931
9d8e155b931c added #openSpec: and #openSpecModal:
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
  1847
    "open an interface spec modal"
9d8e155b931c added #openSpec: and #openSpecModal:
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
  1848
1093
002ed1df9f41 cleaned up all #open* methods;
Claus Gittinger <cg@exept.de>
parents: 1075
diff changeset
  1849
    self allButOpenFrom:anInterfaceSpec.
931
9d8e155b931c added #openSpec: and #openSpecModal:
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
  1850
    self openWindowModal.
9d8e155b931c added #openSpec: and #openSpecModal:
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
  1851
    ^ builder
9d8e155b931c added #openSpec: and #openSpecModal:
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
  1852
9d8e155b931c added #openSpec: and #openSpecModal:
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
  1853
    "Modified: / 14.2.1997 / 20:25:33 / cg"
9d8e155b931c added #openSpec: and #openSpecModal:
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
  1854
    "Created: / 20.5.1998 / 20:20:21 / cg"
9d8e155b931c added #openSpec: and #openSpecModal:
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
  1855
!
9d8e155b931c added #openSpec: and #openSpecModal:
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
  1856
969
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
  1857
openWindow
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
  1858
    "open the window - assumes that the builder has already setup
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
  1859
     the interface."
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
  1860
1093
002ed1df9f41 cleaned up all #open* methods;
Claus Gittinger <cg@exept.de>
parents: 1075
diff changeset
  1861
    builder openWindow.
969
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
  1862
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
  1863
    "Created: 14.2.1997 / 20:20:39 / cg"
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
  1864
!
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
  1865
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
  1866
openWindowAt:aLocation
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
  1867
    "open the window - assumes that the builder has already setup
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
  1868
     the interface."
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
  1869
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
  1870
    builder openWindowAt:aLocation.
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
  1871
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
  1872
    "Created: 14.2.1997 / 20:20:55 / cg"
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
  1873
!
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
  1874
1118
67eb0839e703 added hooks to allow openAtCenter.
Claus Gittinger <cg@exept.de>
parents: 1115
diff changeset
  1875
openWindowAtCenter
67eb0839e703 added hooks to allow openAtCenter.
Claus Gittinger <cg@exept.de>
parents: 1115
diff changeset
  1876
    "open the window centered on the screen
67eb0839e703 added hooks to allow openAtCenter.
Claus Gittinger <cg@exept.de>
parents: 1115
diff changeset
  1877
     - assumes that the builder has already setup the interface."
67eb0839e703 added hooks to allow openAtCenter.
Claus Gittinger <cg@exept.de>
parents: 1115
diff changeset
  1878
67eb0839e703 added hooks to allow openAtCenter.
Claus Gittinger <cg@exept.de>
parents: 1115
diff changeset
  1879
    builder openWindowAt:#center
67eb0839e703 added hooks to allow openAtCenter.
Claus Gittinger <cg@exept.de>
parents: 1115
diff changeset
  1880
67eb0839e703 added hooks to allow openAtCenter.
Claus Gittinger <cg@exept.de>
parents: 1115
diff changeset
  1881
    "Created: 14.2.1997 / 20:20:55 / cg"
67eb0839e703 added hooks to allow openAtCenter.
Claus Gittinger <cg@exept.de>
parents: 1115
diff changeset
  1882
!
67eb0839e703 added hooks to allow openAtCenter.
Claus Gittinger <cg@exept.de>
parents: 1115
diff changeset
  1883
969
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
  1884
openWindowModal
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
  1885
    "open the window - assumes that the builder has already setup
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
  1886
     the interface."
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
  1887
1105
1985b9e86503 care for masterApp notNil but modal mode.
Claus Gittinger <cg@exept.de>
parents: 1093
diff changeset
  1888
"/    builder openDialog.
1985b9e86503 care for masterApp notNil but modal mode.
Claus Gittinger <cg@exept.de>
parents: 1093
diff changeset
  1889
    builder
1985b9e86503 care for masterApp notNil but modal mode.
Claus Gittinger <cg@exept.de>
parents: 1093
diff changeset
  1890
        openAt:nil 
1985b9e86503 care for masterApp notNil but modal mode.
Claus Gittinger <cg@exept.de>
parents: 1093
diff changeset
  1891
        withExtent:nil 
1985b9e86503 care for masterApp notNil but modal mode.
Claus Gittinger <cg@exept.de>
parents: 1093
diff changeset
  1892
        andType:#dialog
969
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
  1893
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
  1894
    "Created: 14.2.1997 / 20:20:39 / cg"
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
  1895
!
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
  1896
1093
002ed1df9f41 cleaned up all #open* methods;
Claus Gittinger <cg@exept.de>
parents: 1075
diff changeset
  1897
openWindowModalAt:aLocation
002ed1df9f41 cleaned up all #open* methods;
Claus Gittinger <cg@exept.de>
parents: 1075
diff changeset
  1898
    "open the window modal - assumes that the builder has already setup
002ed1df9f41 cleaned up all #open* methods;
Claus Gittinger <cg@exept.de>
parents: 1075
diff changeset
  1899
     the interface."
002ed1df9f41 cleaned up all #open* methods;
Claus Gittinger <cg@exept.de>
parents: 1075
diff changeset
  1900
002ed1df9f41 cleaned up all #open* methods;
Claus Gittinger <cg@exept.de>
parents: 1075
diff changeset
  1901
    builder openDialogAt:aLocation.
002ed1df9f41 cleaned up all #open* methods;
Claus Gittinger <cg@exept.de>
parents: 1075
diff changeset
  1902
002ed1df9f41 cleaned up all #open* methods;
Claus Gittinger <cg@exept.de>
parents: 1075
diff changeset
  1903
    "Created: 14.2.1997 / 20:20:55 / cg"
002ed1df9f41 cleaned up all #open* methods;
Claus Gittinger <cg@exept.de>
parents: 1075
diff changeset
  1904
!
002ed1df9f41 cleaned up all #open* methods;
Claus Gittinger <cg@exept.de>
parents: 1075
diff changeset
  1905
1252
485fcf345324 added a hook to allow interception of new-sub-application
ca
parents: 1242
diff changeset
  1906
postApplicationProcessCreate:newProcess windowGroup:newGroup
485fcf345324 added a hook to allow interception of new-sub-application
ca
parents: 1242
diff changeset
  1907
    "this is sent whenever a new application is launched from this app, 
485fcf345324 added a hook to allow interception of new-sub-application
ca
parents: 1242
diff changeset
  1908
     which forks its own windowGroup process. Allows for process group management,
485fcf345324 added a hook to allow interception of new-sub-application
ca
parents: 1242
diff changeset
  1909
     or process-global exception handlers to be installed.
485fcf345324 added a hook to allow interception of new-sub-application
ca
parents: 1242
diff changeset
  1910
     Nothing done here - to be redefined in concrete applications"
485fcf345324 added a hook to allow interception of new-sub-application
ca
parents: 1242
diff changeset
  1911
485fcf345324 added a hook to allow interception of new-sub-application
ca
parents: 1242
diff changeset
  1912
!
485fcf345324 added a hook to allow interception of new-sub-application
ca
parents: 1242
diff changeset
  1913
980
3764f680134d allow subclass to redefine subCanvas-pre/postBuilds;
Claus Gittinger <cg@exept.de>
parents: 978
diff changeset
  1914
postBuildAsSubcanvasWith:aBuilder
3764f680134d allow subclass to redefine subCanvas-pre/postBuilds;
Claus Gittinger <cg@exept.de>
parents: 978
diff changeset
  1915
    "this is sent after an interface is built from a spec as subcanvas.
3764f680134d allow subclass to redefine subCanvas-pre/postBuilds;
Claus Gittinger <cg@exept.de>
parents: 978
diff changeset
  1916
     Can be redefined in subclasses for additional setup after
995
63d1b9ce554b Avoid invoking pre/postBuild twice for subCanvases which
Claus Gittinger <cg@exept.de>
parents: 983
diff changeset
  1917
     the subcanvas view has been built, but not yet opened."
980
3764f680134d allow subclass to redefine subCanvas-pre/postBuilds;
Claus Gittinger <cg@exept.de>
parents: 978
diff changeset
  1918
1242
d36371e70ea5 Call postBuild on subcanvases (cg)
Stefan Vogel <sv@exept.de>
parents: 1224
diff changeset
  1919
    |sameApp|
d36371e70ea5 Call postBuild on subcanvases (cg)
Stefan Vogel <sv@exept.de>
parents: 1224
diff changeset
  1920
d36371e70ea5 Call postBuild on subcanvases (cg)
Stefan Vogel <sv@exept.de>
parents: 1224
diff changeset
  1921
    sameApp := aBuilder application == aBuilder window topView application.
d36371e70ea5 Call postBuild on subcanvases (cg)
Stefan Vogel <sv@exept.de>
parents: 1224
diff changeset
  1922
d36371e70ea5 Call postBuild on subcanvases (cg)
Stefan Vogel <sv@exept.de>
parents: 1224
diff changeset
  1923
    "/ If I am opened as subcanvas in another application
d36371e70ea5 Call postBuild on subcanvases (cg)
Stefan Vogel <sv@exept.de>
parents: 1224
diff changeset
  1924
    "/ then treat this like a regular open.
d36371e70ea5 Call postBuild on subcanvases (cg)
Stefan Vogel <sv@exept.de>
parents: 1224
diff changeset
  1925
    "/ otherwise ignore it.
d36371e70ea5 Call postBuild on subcanvases (cg)
Stefan Vogel <sv@exept.de>
parents: 1224
diff changeset
  1926
    sameApp ifFalse:[
d36371e70ea5 Call postBuild on subcanvases (cg)
Stefan Vogel <sv@exept.de>
parents: 1224
diff changeset
  1927
        self postBuildWith:aBuilder.
d36371e70ea5 Call postBuild on subcanvases (cg)
Stefan Vogel <sv@exept.de>
parents: 1224
diff changeset
  1928
    ]
d36371e70ea5 Call postBuild on subcanvases (cg)
Stefan Vogel <sv@exept.de>
parents: 1224
diff changeset
  1929
995
63d1b9ce554b Avoid invoking pre/postBuild twice for subCanvases which
Claus Gittinger <cg@exept.de>
parents: 983
diff changeset
  1930
    "Modified: / 8.7.1998 / 18:28:55 / cg"
980
3764f680134d allow subclass to redefine subCanvas-pre/postBuilds;
Claus Gittinger <cg@exept.de>
parents: 978
diff changeset
  1931
!
3764f680134d allow subclass to redefine subCanvas-pre/postBuilds;
Claus Gittinger <cg@exept.de>
parents: 978
diff changeset
  1932
138
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
  1933
postBuildWith:aBuilder
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
  1934
    "this is sent after an interface is built from a spec.
657
285350fb3885 open modal
ca
parents: 614
diff changeset
  1935
     Can be redefined in subclasses for additional setup after
285350fb3885 open modal
ca
parents: 614
diff changeset
  1936
     the view has been built, but not yet opened."
138
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
  1937
!
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
  1938
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
  1939
postOpenWith:aBuilder
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
  1940
    "this is sent after the applications main window is opened.
730
cc391efb62c0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  1941
     Can be redefined in subclasses for actions after opening the view."
cc391efb62c0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  1942
1024
0d62cb3da243 switch on active help / no activeHelp event listener to the masterApp
tz
parents: 1020
diff changeset
  1943
138
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
  1944
!
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
  1945
980
3764f680134d allow subclass to redefine subCanvas-pre/postBuilds;
Claus Gittinger <cg@exept.de>
parents: 978
diff changeset
  1946
preBuildAsSubcanvasWith:aBuilder
3764f680134d allow subclass to redefine subCanvas-pre/postBuilds;
Claus Gittinger <cg@exept.de>
parents: 978
diff changeset
  1947
    "this is sent before an interface is built from a spec as a subcanvas.
995
63d1b9ce554b Avoid invoking pre/postBuild twice for subCanvases which
Claus Gittinger <cg@exept.de>
parents: 983
diff changeset
  1948
     Can be redefined for apps which need to be informed about that."
980
3764f680134d allow subclass to redefine subCanvas-pre/postBuilds;
Claus Gittinger <cg@exept.de>
parents: 978
diff changeset
  1949
995
63d1b9ce554b Avoid invoking pre/postBuild twice for subCanvases which
Claus Gittinger <cg@exept.de>
parents: 983
diff changeset
  1950
    "Modified: / 8.7.1998 / 18:29:34 / cg"
980
3764f680134d allow subclass to redefine subCanvas-pre/postBuilds;
Claus Gittinger <cg@exept.de>
parents: 978
diff changeset
  1951
!
3764f680134d allow subclass to redefine subCanvas-pre/postBuilds;
Claus Gittinger <cg@exept.de>
parents: 978
diff changeset
  1952
138
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
  1953
preBuildWith:aBuilder
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
  1954
    "this is sent before an interface is built from a spec.
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
  1955
     Can be redefined in subclasses.
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
  1956
     mhmh - what should this do here ?"
969
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
  1957
! !
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
  1958
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
  1959
!ApplicationModel methodsFor:'private'!
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
  1960
975
7edaf9f69ef7 must create the builder just before building
Claus Gittinger <cg@exept.de>
parents: 969
diff changeset
  1961
builderClass
7edaf9f69ef7 must create the builder just before building
Claus Gittinger <cg@exept.de>
parents: 969
diff changeset
  1962
    "return the UIBuilder class for me.
7edaf9f69ef7 must create the builder just before building
Claus Gittinger <cg@exept.de>
parents: 969
diff changeset
  1963
     This method can be redefined if (eventually) there are
7edaf9f69ef7 must create the builder just before building
Claus Gittinger <cg@exept.de>
parents: 969
diff changeset
  1964
     spec readers for other UI languages (motif UIL ?)"
7edaf9f69ef7 must create the builder just before building
Claus Gittinger <cg@exept.de>
parents: 969
diff changeset
  1965
7edaf9f69ef7 must create the builder just before building
Claus Gittinger <cg@exept.de>
parents: 969
diff changeset
  1966
    ^ UIBuilder
7edaf9f69ef7 must create the builder just before building
Claus Gittinger <cg@exept.de>
parents: 969
diff changeset
  1967
7edaf9f69ef7 must create the builder just before building
Claus Gittinger <cg@exept.de>
parents: 969
diff changeset
  1968
    "Created: / 19.6.1998 / 01:39:26 / cg"
7edaf9f69ef7 must create the builder just before building
Claus Gittinger <cg@exept.de>
parents: 969
diff changeset
  1969
    "Modified: / 19.6.1998 / 01:45:24 / cg"
7edaf9f69ef7 must create the builder just before building
Claus Gittinger <cg@exept.de>
parents: 969
diff changeset
  1970
!
7edaf9f69ef7 must create the builder just before building
Claus Gittinger <cg@exept.de>
parents: 969
diff changeset
  1971
978
cd056a68d67a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 975
diff changeset
  1972
createBuilder
cd056a68d67a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 975
diff changeset
  1973
    builder isNil ifTrue:[
cd056a68d67a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 975
diff changeset
  1974
        builder := self builderClass new.
cd056a68d67a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 975
diff changeset
  1975
        builder application:self.
cd056a68d67a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 975
diff changeset
  1976
    ]
cd056a68d67a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 975
diff changeset
  1977
cd056a68d67a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 975
diff changeset
  1978
    "Created: / 19.6.1998 / 03:32:37 / cg"
cd056a68d67a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 975
diff changeset
  1979
!
cd056a68d67a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 975
diff changeset
  1980
969
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
  1981
opened:whichTopView
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
  1982
    "the topView has been opened.
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
  1983
     This is sent by my topView when its really open
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
  1984
     (i.e. finally visible)"
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
  1985
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
  1986
    self addTopViewsToCurrentProject.
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
  1987
    self postOpenWith:builder
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
  1988
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
  1989
!
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
  1990
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
  1991
selfResponsibleFor:aKey
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
  1992
    ^ (aKey isNil or:[masterApplication isNil or:[self respondsTo:aKey]])
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
  1993
! !
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
  1994
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
  1995
!ApplicationModel methodsFor:'queries'!
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
  1996
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
  1997
defaultWindowType
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
  1998
    "Applications come up non-modal, by default"
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
  1999
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
  2000
    ^ #normal
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
  2001
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
  2002
    "Created: 17.1.1997 / 19:57:34 / cg"
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
  2003
!
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
  2004
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
  2005
graphicsDevice
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
  2006
    "return the device I want to open my views on.
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
  2007
     The default (if not created with #onDevice:) is the currently
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
  2008
     active screen."
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
  2009
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
  2010
    ^ device
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
  2011
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
  2012
    "Created: 5.7.1996 / 17:51:31 / cg"
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
  2013
!
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
  2014
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
  2015
interfaceSpecFor:aSelector
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
  2016
    "return an interface spec.
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
  2017
     Here, the query is forwarded to my class.
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
  2018
     Can be refefined in subclasses which want to provide per-instance specs."
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
  2019
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
  2020
    ^ self class interfaceSpecFor:aSelector
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
  2021
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
  2022
    "Created: / 25.1.1998 / 19:45:12 / cg"
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
  2023
    "Modified: / 25.1.1998 / 19:47:09 / cg"
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
  2024
!
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
  2025
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
  2026
processName
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
  2027
    "return a name to be shown for me in the process monitor"
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
  2028
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
  2029
    self class == ApplicationModel ifTrue:[
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
  2030
        ^ 'Application'
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
  2031
    ].
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
  2032
    ^ self class nameWithoutPrefix
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
  2033
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
  2034
    "Modified: / 4.12.1997 / 12:39:14 / cg"
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
  2035
!
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
  2036
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
  2037
resolveClassNamed:something inClass:aClass
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
  2038
    "return the class from something, a class, symbol, string or nil.
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
  2039
     first we are looking in the namespace of the application, than of the
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
  2040
     current namespace and than in Smalltalk
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
  2041
    "
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
  2042
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
  2043
    ^ Smalltalk resolveName:something inClass:aClass.
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
  2044
!
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
  2045
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
  2046
resolveName:something
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
  2047
    "return the class from something, a class, symbol, string or nil.
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
  2048
     first we are looking in the namespace of the application, than of the
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
  2049
     current namespace and than in Smalltalk
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
  2050
    "
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
  2051
    ^ self resolveName:something inClass:self class
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
  2052
!
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
  2053
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
  2054
resolveName:something inClass:aClass
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
  2055
    "return the class from something, a class, symbol, string or nil.
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
  2056
     first we are looking in the namespace of the application, than of the
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
  2057
     current namespace and than in Smalltalk
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
  2058
    "
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
  2059
    |cls|
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
  2060
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
  2061
    aClass notNil ifTrue:[
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
  2062
        (cls := Smalltalk resolveName:something inClass:aClass) notNil ifTrue:[
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
  2063
            ^ cls
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
  2064
        ].
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
  2065
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
  2066
        masterApplication notNil ifTrue:[
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
  2067
            ^ masterApplication resolveName:something
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
  2068
        ]
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
  2069
    ].
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
  2070
    ^ nil
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
  2071
!
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
  2072
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
  2073
topApplication
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
  2074
    "return the top-master application"
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
  2075
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
  2076
    masterApplication isNil ifTrue:[
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
  2077
        ^ self
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
  2078
    ].
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
  2079
    ^ masterApplication topApplication
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
  2080
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
  2081
    "Created: / 6.6.1998 / 19:40:42 / cg"
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
  2082
! !
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
  2083
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
  2084
!ApplicationModel methodsFor:'startup / release'!
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
  2085
1359
f40bfb94f862 allow for application to decide what type of
Claus Gittinger <cg@exept.de>
parents: 1358
diff changeset
  2086
applicationWindowClass
f40bfb94f862 allow for application to decide what type of
Claus Gittinger <cg@exept.de>
parents: 1358
diff changeset
  2087
    ^ ApplicationWindow
f40bfb94f862 allow for application to decide what type of
Claus Gittinger <cg@exept.de>
parents: 1358
diff changeset
  2088
!
f40bfb94f862 allow for application to decide what type of
Claus Gittinger <cg@exept.de>
parents: 1358
diff changeset
  2089
969
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
  2090
close
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
  2091
    "this is sent by my topView when about to be closed
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
  2092
     by the program (not by the windowManager).
1217
aa2ac9bd69e6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1214
diff changeset
  2093
     Notice, that we get a closeRequest message if closed by the windowManager,
aa2ac9bd69e6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1214
diff changeset
  2094
     which can be rejected by the app (or confirmed via a dialog)
969
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
  2095
     Could be redefined in subclasses."
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
  2096
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
  2097
    self closeDownViews
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
  2098
!
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
  2099
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
  2100
closeDownViews
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
  2101
    "close down the applications view(s)"
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
  2102
1254
54b46959095b if closeDownViews is invoked by another process,
ca
parents: 1253
diff changeset
  2103
    |wg wgProcess views|
969
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
  2104
1217
aa2ac9bd69e6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1214
diff changeset
  2105
    self release.
1264
a87315936e38 stop active help for this application
ca
parents: 1254
diff changeset
  2106
    ActiveHelp stopFor:self.
1254
54b46959095b if closeDownViews is invoked by another process,
ca
parents: 1253
diff changeset
  2107
969
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
  2108
    (wg := self windowGroup) notNil ifTrue:[
1254
54b46959095b if closeDownViews is invoked by another process,
ca
parents: 1253
diff changeset
  2109
        wgProcess := wg process.
54b46959095b if closeDownViews is invoked by another process,
ca
parents: 1253
diff changeset
  2110
        (Processor activeProcess ~~ wgProcess
54b46959095b if closeDownViews is invoked by another process,
ca
parents: 1253
diff changeset
  2111
        and:[wgProcess notNil]) ifTrue:[
54b46959095b if closeDownViews is invoked by another process,
ca
parents: 1253
diff changeset
  2112
            wgProcess terminate
54b46959095b if closeDownViews is invoked by another process,
ca
parents: 1253
diff changeset
  2113
        ] ifFalse:[
1302
7c8ae7afab5e use windowgroups closeDownViews method
Claus Gittinger <cg@exept.de>
parents: 1290
diff changeset
  2114
            wg closeDownViews.
7c8ae7afab5e use windowgroups closeDownViews method
Claus Gittinger <cg@exept.de>
parents: 1290
diff changeset
  2115
"/            views := wg topViews.
7c8ae7afab5e use windowgroups closeDownViews method
Claus Gittinger <cg@exept.de>
parents: 1290
diff changeset
  2116
"/            views notNil ifTrue:[
7c8ae7afab5e use windowgroups closeDownViews method
Claus Gittinger <cg@exept.de>
parents: 1290
diff changeset
  2117
"/                views copy do:[:aView |
7c8ae7afab5e use windowgroups closeDownViews method
Claus Gittinger <cg@exept.de>
parents: 1290
diff changeset
  2118
"/                    aView notNil ifTrue:[aView destroy]
7c8ae7afab5e use windowgroups closeDownViews method
Claus Gittinger <cg@exept.de>
parents: 1290
diff changeset
  2119
"/                ]
7c8ae7afab5e use windowgroups closeDownViews method
Claus Gittinger <cg@exept.de>
parents: 1290
diff changeset
  2120
"/            ].
969
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
  2121
        ]
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
  2122
    ]
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
  2123
!
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
  2124
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
  2125
closeRequest
1217
aa2ac9bd69e6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1214
diff changeset
  2126
    "this is sent by my topView when about to be closed by the windowManager.
969
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
  2127
     Could be redefined in subclasses to suppress close or confirm."
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
  2128
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
  2129
    |sav|
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
  2130
1105
1985b9e86503 care for masterApp notNil but modal mode.
Claus Gittinger <cg@exept.de>
parents: 1093
diff changeset
  2131
    "/ In multiView apps, tell my master.
1985b9e86503 care for masterApp notNil but modal mode.
Claus Gittinger <cg@exept.de>
parents: 1093
diff changeset
  2132
    "/ (but not if I am a modal reincarnation)
1985b9e86503 care for masterApp notNil but modal mode.
Claus Gittinger <cg@exept.de>
parents: 1093
diff changeset
  2133
    (masterApplication notNil 
1985b9e86503 care for masterApp notNil but modal mode.
Claus Gittinger <cg@exept.de>
parents: 1093
diff changeset
  2134
    and:[self window isModal not]) ifTrue:[
969
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
  2135
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
  2136
        "/ temporary clear my masterApplication to prevent
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
  2137
        "/ endless recursion, in case the master sends me
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
  2138
        "/ a closeRequest (although, it is supposed to
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
  2139
        "/ send me a closeDownViews ...)
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
  2140
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
  2141
        sav := masterApplication.
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
  2142
        masterApplication := nil.
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
  2143
        sav closeRequestFor:(self window).
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
  2144
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
  2145
        "/ restore - in case master did not want me to close ...
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
  2146
        masterApplication := sav.
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
  2147
    ] ifFalse:[
975
7edaf9f69ef7 must create the builder just before building
Claus Gittinger <cg@exept.de>
parents: 969
diff changeset
  2148
        "/ ST/X does close-check by redefining this message without
7edaf9f69ef7 must create the builder just before building
Claus Gittinger <cg@exept.de>
parents: 969
diff changeset
  2149
        "/ a supersend;
7edaf9f69ef7 must create the builder just before building
Claus Gittinger <cg@exept.de>
parents: 969
diff changeset
  2150
        "/ VW does it by returning false from requestForWindowClose
7edaf9f69ef7 must create the builder just before building
Claus Gittinger <cg@exept.de>
parents: 969
diff changeset
  2151
        "/ sigh.
7edaf9f69ef7 must create the builder just before building
Claus Gittinger <cg@exept.de>
parents: 969
diff changeset
  2152
7edaf9f69ef7 must create the builder just before building
Claus Gittinger <cg@exept.de>
parents: 969
diff changeset
  2153
        self requestForWindowClose ifTrue:[
7edaf9f69ef7 must create the builder just before building
Claus Gittinger <cg@exept.de>
parents: 969
diff changeset
  2154
            self closeDownViews
7edaf9f69ef7 must create the builder just before building
Claus Gittinger <cg@exept.de>
parents: 969
diff changeset
  2155
        ]
969
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
  2156
    ].
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
  2157
975
7edaf9f69ef7 must create the builder just before building
Claus Gittinger <cg@exept.de>
parents: 969
diff changeset
  2158
    "Modified: / 19.6.1998 / 01:37:17 / cg"
969
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
  2159
!
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
  2160
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
  2161
closeRequestFor:aTopView
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
  2162
    "this is sent by any of my topViews when about to be closed by the
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
  2163
     windowmanager. For backward compatibility with single-view applications,
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
  2164
     this is forwarded here to a simple (non topView-specific) closeRequest,
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
  2165
     effectively closing all of my views.
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
  2166
     MultiView applications should redefine this method if closing of individual
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
  2167
     views closing is to be caught and/or should not close all of them."
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
  2168
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
  2169
    |sav|
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
  2170
1105
1985b9e86503 care for masterApp notNil but modal mode.
Claus Gittinger <cg@exept.de>
parents: 1093
diff changeset
  2171
    "/ In multiView apps, tell my master.
1985b9e86503 care for masterApp notNil but modal mode.
Claus Gittinger <cg@exept.de>
parents: 1093
diff changeset
  2172
    "/ (but not if I am a modal reincarnation)
1985b9e86503 care for masterApp notNil but modal mode.
Claus Gittinger <cg@exept.de>
parents: 1093
diff changeset
  2173
    (masterApplication notNil 
1985b9e86503 care for masterApp notNil but modal mode.
Claus Gittinger <cg@exept.de>
parents: 1093
diff changeset
  2174
    and:[self window isModal not]) ifTrue:[
969
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
  2175
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
  2176
        "/ temporary clear my masterApplication to prevent
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
  2177
        "/ endless recursion, in case the master sends me
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
  2178
        "/ a closeRequest (although, it is supposed to
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
  2179
        "/ send me a closeDownViews ...)
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
  2180
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
  2181
        sav := masterApplication.
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
  2182
        masterApplication := nil.
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
  2183
        sav closeRequestFor:(self window).
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
  2184
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
  2185
        "/ restore - in case master did not want me to close ...
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
  2186
        masterApplication := sav.
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
  2187
    ] ifFalse:[
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
  2188
        self closeRequest
ac96df5a2f97 oops - had to undo some error-handling stuff.
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
  2189
    ]
138
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
  2190
!
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
  2191
1132
b801d744051b kludge & hook to allow modeless appModels to
Claus Gittinger <cg@exept.de>
parents: 1118
diff changeset
  2192
doAccept
b801d744051b kludge & hook to allow modeless appModels to
Claus Gittinger <cg@exept.de>
parents: 1118
diff changeset
  2193
    "this is invoked by the Return-Key (if returnIsOK) or
b801d744051b kludge & hook to allow modeless appModels to
Claus Gittinger <cg@exept.de>
parents: 1118
diff changeset
  2194
     the ok-button (if any), IFF the application has been
b801d744051b kludge & hook to allow modeless appModels to
Claus Gittinger <cg@exept.de>
parents: 1118
diff changeset
  2195
     opened modal (i.e. as a dialog)."
b801d744051b kludge & hook to allow modeless appModels to
Claus Gittinger <cg@exept.de>
parents: 1118
diff changeset
  2196
b801d744051b kludge & hook to allow modeless appModels to
Claus Gittinger <cg@exept.de>
parents: 1118
diff changeset
  2197
    |kp|
b801d744051b kludge & hook to allow modeless appModels to
Claus Gittinger <cg@exept.de>
parents: 1118
diff changeset
  2198
b801d744051b kludge & hook to allow modeless appModels to
Claus Gittinger <cg@exept.de>
parents: 1118
diff changeset
  2199
    "/ the following is a bad kludge -
b801d744051b kludge & hook to allow modeless appModels to
Claus Gittinger <cg@exept.de>
parents: 1118
diff changeset
  2200
    "/ actually, modal apps should inherit from SimpleDialog
b801d744051b kludge & hook to allow modeless appModels to
Claus Gittinger <cg@exept.de>
parents: 1118
diff changeset
  2201
    "/ (then, things would be clean)
b801d744051b kludge & hook to allow modeless appModels to
Claus Gittinger <cg@exept.de>
parents: 1118
diff changeset
  2202
    "/ However, it may be useful, to open some app (which is normally
b801d744051b kludge & hook to allow modeless appModels to
Claus Gittinger <cg@exept.de>
parents: 1118
diff changeset
  2203
    "/ modeless) as a modal one as well.
b801d744051b kludge & hook to allow modeless appModels to
Claus Gittinger <cg@exept.de>
parents: 1118
diff changeset
  2204
    "/ In that, case, we have no acceptHolder (see SimpleDialog),
b801d744051b kludge & hook to allow modeless appModels to
Claus Gittinger <cg@exept.de>
parents: 1118
diff changeset
  2205
    "/ to remember the accept vs. cancel case.
b801d744051b kludge & hook to allow modeless appModels to
Claus Gittinger <cg@exept.de>
parents: 1118
diff changeset
  2206
    "/
b801d744051b kludge & hook to allow modeless appModels to
Claus Gittinger <cg@exept.de>
parents: 1118
diff changeset
  2207
    self window isModal ifTrue:[
b801d744051b kludge & hook to allow modeless appModels to
Claus Gittinger <cg@exept.de>
parents: 1118
diff changeset
  2208
        "/ mhmh - is this a good idea ?
b801d744051b kludge & hook to allow modeless appModels to
Claus Gittinger <cg@exept.de>
parents: 1118
diff changeset
  2209
        (self respondsTo:#accept) ifTrue:[
b801d744051b kludge & hook to allow modeless appModels to
Claus Gittinger <cg@exept.de>
parents: 1118
diff changeset
  2210
            self accept
b801d744051b kludge & hook to allow modeless appModels to
Claus Gittinger <cg@exept.de>
parents: 1118
diff changeset
  2211
        ] ifFalse:[
b801d744051b kludge & hook to allow modeless appModels to
Claus Gittinger <cg@exept.de>
parents: 1118
diff changeset
  2212
            self closeRequest.
b801d744051b kludge & hook to allow modeless appModels to
Claus Gittinger <cg@exept.de>
parents: 1118
diff changeset
  2213
        ].
b801d744051b kludge & hook to allow modeless appModels to
Claus Gittinger <cg@exept.de>
parents: 1118
diff changeset
  2214
        ^ self
b801d744051b kludge & hook to allow modeless appModels to
Claus Gittinger <cg@exept.de>
parents: 1118
diff changeset
  2215
    ].
b801d744051b kludge & hook to allow modeless appModels to
Claus Gittinger <cg@exept.de>
parents: 1118
diff changeset
  2216
b801d744051b kludge & hook to allow modeless appModels to
Claus Gittinger <cg@exept.de>
parents: 1118
diff changeset
  2217
    ^ self      "/ nothing done here ...
b801d744051b kludge & hook to allow modeless appModels to
Claus Gittinger <cg@exept.de>
parents: 1118
diff changeset
  2218
!
b801d744051b kludge & hook to allow modeless appModels to
Claus Gittinger <cg@exept.de>
parents: 1118
diff changeset
  2219
b801d744051b kludge & hook to allow modeless appModels to
Claus Gittinger <cg@exept.de>
parents: 1118
diff changeset
  2220
doCancel
b801d744051b kludge & hook to allow modeless appModels to
Claus Gittinger <cg@exept.de>
parents: 1118
diff changeset
  2221
    "this is invoked by the Escape-Key (if escapeIsCancel) or
b801d744051b kludge & hook to allow modeless appModels to
Claus Gittinger <cg@exept.de>
parents: 1118
diff changeset
  2222
     the cancel-button (if any), IFF the application has been
b801d744051b kludge & hook to allow modeless appModels to
Claus Gittinger <cg@exept.de>
parents: 1118
diff changeset
  2223
     opened modal (i.e. as a dialog)."
b801d744051b kludge & hook to allow modeless appModels to
Claus Gittinger <cg@exept.de>
parents: 1118
diff changeset
  2224
b801d744051b kludge & hook to allow modeless appModels to
Claus Gittinger <cg@exept.de>
parents: 1118
diff changeset
  2225
    "/ the following is a bad kludge -
b801d744051b kludge & hook to allow modeless appModels to
Claus Gittinger <cg@exept.de>
parents: 1118
diff changeset
  2226
    "/ actually, modal apps should inherit from SimpleDialog
b801d744051b kludge & hook to allow modeless appModels to
Claus Gittinger <cg@exept.de>
parents: 1118
diff changeset
  2227
    "/ (then, things would be clean)
b801d744051b kludge & hook to allow modeless appModels to
Claus Gittinger <cg@exept.de>
parents: 1118
diff changeset
  2228
    "/ However, it may be useful, to open some app (which is normally
b801d744051b kludge & hook to allow modeless appModels to
Claus Gittinger <cg@exept.de>
parents: 1118
diff changeset
  2229
    "/ modeless) as a modal one as well.
b801d744051b kludge & hook to allow modeless appModels to
Claus Gittinger <cg@exept.de>
parents: 1118
diff changeset
  2230
    "/ In that, case, we have no acceptHolder (see SimpleDialog),
b801d744051b kludge & hook to allow modeless appModels to
Claus Gittinger <cg@exept.de>
parents: 1118
diff changeset
  2231
    "/ to remember the accept vs. cancel case.
b801d744051b kludge & hook to allow modeless appModels to
Claus Gittinger <cg@exept.de>
parents: 1118
diff changeset
  2232
    "/
b801d744051b kludge & hook to allow modeless appModels to
Claus Gittinger <cg@exept.de>
parents: 1118
diff changeset
  2233
    self window isModal ifTrue:[
b801d744051b kludge & hook to allow modeless appModels to
Claus Gittinger <cg@exept.de>
parents: 1118
diff changeset
  2234
        "/ mhmh - is this a good idea ?
b801d744051b kludge & hook to allow modeless appModels to
Claus Gittinger <cg@exept.de>
parents: 1118
diff changeset
  2235
        (self respondsTo:#cancel) ifTrue:[
b801d744051b kludge & hook to allow modeless appModels to
Claus Gittinger <cg@exept.de>
parents: 1118
diff changeset
  2236
            self cancel
b801d744051b kludge & hook to allow modeless appModels to
Claus Gittinger <cg@exept.de>
parents: 1118
diff changeset
  2237
        ] ifFalse:[
b801d744051b kludge & hook to allow modeless appModels to
Claus Gittinger <cg@exept.de>
parents: 1118
diff changeset
  2238
            self closeRequest.
b801d744051b kludge & hook to allow modeless appModels to
Claus Gittinger <cg@exept.de>
parents: 1118
diff changeset
  2239
        ].
b801d744051b kludge & hook to allow modeless appModels to
Claus Gittinger <cg@exept.de>
parents: 1118
diff changeset
  2240
        ^ self
b801d744051b kludge & hook to allow modeless appModels to
Claus Gittinger <cg@exept.de>
parents: 1118
diff changeset
  2241
    ].
b801d744051b kludge & hook to allow modeless appModels to
Claus Gittinger <cg@exept.de>
parents: 1118
diff changeset
  2242
    ^ self      "/ nothing done here ...
b801d744051b kludge & hook to allow modeless appModels to
Claus Gittinger <cg@exept.de>
parents: 1118
diff changeset
  2243
!
b801d744051b kludge & hook to allow modeless appModels to
Claus Gittinger <cg@exept.de>
parents: 1118
diff changeset
  2244
1217
aa2ac9bd69e6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1214
diff changeset
  2245
releaseAsSubCanvas
1337
cdd4197b4661 releaseAsSubCanvas no longer does an automatic release.
Claus Gittinger <cg@exept.de>
parents: 1332
diff changeset
  2246
    "a subcanvas is closed or switching to a new application.
cdd4197b4661 releaseAsSubCanvas no longer does an automatic release.
Claus Gittinger <cg@exept.de>
parents: 1332
diff changeset
  2247
     Can be redefined to perform a self release in this case."
cdd4197b4661 releaseAsSubCanvas no longer does an automatic release.
Claus Gittinger <cg@exept.de>
parents: 1332
diff changeset
  2248
cdd4197b4661 releaseAsSubCanvas no longer does an automatic release.
Claus Gittinger <cg@exept.de>
parents: 1332
diff changeset
  2249
    "/ used to self release here,
cdd4197b4661 releaseAsSubCanvas no longer does an automatic release.
Claus Gittinger <cg@exept.de>
parents: 1332
diff changeset
  2250
    "/ but that is incompatible to VW (RefactoryBrowser).
cdd4197b4661 releaseAsSubCanvas no longer does an automatic release.
Claus Gittinger <cg@exept.de>
parents: 1332
diff changeset
  2251
    "/ Therefore, if you need it, you MUST now redefine
cdd4197b4661 releaseAsSubCanvas no longer does an automatic release.
Claus Gittinger <cg@exept.de>
parents: 1332
diff changeset
  2252
    "/ this method.
1217
aa2ac9bd69e6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1214
diff changeset
  2253
!
aa2ac9bd69e6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1214
diff changeset
  2254
69
claus
parents: 63
diff changeset
  2255
restarted
287
7a733e0b5465 cursor stuff
Claus Gittinger <cg@exept.de>
parents: 240
diff changeset
  2256
    "sent by my topWindow, when restarted from an image.
69
claus
parents: 63
diff changeset
  2257
     Nothing done here, but can be redefined to perform any actions
claus
parents: 63
diff changeset
  2258
     required to reset the application after an image-restart.
claus
parents: 63
diff changeset
  2259
     (for example: check if application files are still around, restart
287
7a733e0b5465 cursor stuff
Claus Gittinger <cg@exept.de>
parents: 240
diff changeset
  2260
      subprocesses etc.)."
7a733e0b5465 cursor stuff
Claus Gittinger <cg@exept.de>
parents: 240
diff changeset
  2261
7a733e0b5465 cursor stuff
Claus Gittinger <cg@exept.de>
parents: 240
diff changeset
  2262
    "Modified: 1.6.1996 / 16:55:50 / cg"
63
claus
parents: 61
diff changeset
  2263
!
57
3984019e8f5f *** empty log message ***
claus
parents: 52
diff changeset
  2264
63
claus
parents: 61
diff changeset
  2265
saveAndTerminateRequest
claus
parents: 61
diff changeset
  2266
    "some windowManagers send this to shut down an application
claus
parents: 61
diff changeset
  2267
     and have it save its state for restart.
claus
parents: 61
diff changeset
  2268
     Can be redefined in subclasses"
claus
parents: 61
diff changeset
  2269
claus
parents: 61
diff changeset
  2270
    self closeRequest
437
092e025be49e checkin from browser
ca
parents: 435
diff changeset
  2271
!
092e025be49e checkin from browser
ca
parents: 435
diff changeset
  2272
092e025be49e checkin from browser
ca
parents: 435
diff changeset
  2273
saveAndTerminateRequestFor:aTopView
092e025be49e checkin from browser
ca
parents: 435
diff changeset
  2274
    "some windowManagers send this to shut down an application
092e025be49e checkin from browser
ca
parents: 435
diff changeset
  2275
     and have it save its state for restart.
092e025be49e checkin from browser
ca
parents: 435
diff changeset
  2276
     Can be redefined in subclasses"
092e025be49e checkin from browser
ca
parents: 435
diff changeset
  2277
092e025be49e checkin from browser
ca
parents: 435
diff changeset
  2278
    self saveAndTerminateRequest
1359
f40bfb94f862 allow for application to decide what type of
Claus Gittinger <cg@exept.de>
parents: 1358
diff changeset
  2279
!
f40bfb94f862 allow for application to decide what type of
Claus Gittinger <cg@exept.de>
parents: 1358
diff changeset
  2280
f40bfb94f862 allow for application to decide what type of
Claus Gittinger <cg@exept.de>
parents: 1358
diff changeset
  2281
windowClass
f40bfb94f862 allow for application to decide what type of
Claus Gittinger <cg@exept.de>
parents: 1358
diff changeset
  2282
    "return the type of topWindow I would like to have created.
f40bfb94f862 allow for application to decide what type of
Claus Gittinger <cg@exept.de>
parents: 1358
diff changeset
  2283
     Can be redefined in subclasses to allow for specialized
f40bfb94f862 allow for application to decide what type of
Claus Gittinger <cg@exept.de>
parents: 1358
diff changeset
  2284
     subclass of ApplicationWindow to be returned here."
f40bfb94f862 allow for application to decide what type of
Claus Gittinger <cg@exept.de>
parents: 1358
diff changeset
  2285
f40bfb94f862 allow for application to decide what type of
Claus Gittinger <cg@exept.de>
parents: 1358
diff changeset
  2286
    ^ ApplicationWindow
57
3984019e8f5f *** empty log message ***
claus
parents: 52
diff changeset
  2287
! !
72
claus
parents: 71
diff changeset
  2288
85
claus
parents: 83
diff changeset
  2289
!ApplicationModel methodsFor:'window events'!
claus
parents: 83
diff changeset
  2290
1253
cc4b13d9c53b checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1252
diff changeset
  2291
dispatchEvent:event
cc4b13d9c53b checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1252
diff changeset
  2292
    "dispatch a user-pushed event.
cc4b13d9c53b checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1252
diff changeset
  2293
     This allows for events for an appModel to be pushed into the event queue
cc4b13d9c53b checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1252
diff changeset
  2294
     the same way as events for a view are pushable."
cc4b13d9c53b checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1252
diff changeset
  2295
cc4b13d9c53b checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1252
diff changeset
  2296
    ^ self 
1290
e41570e2a01c always use the new #dispatchEvent methods
ca
parents: 1286
diff changeset
  2297
        dispatchEvent:event 
1253
cc4b13d9c53b checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1252
diff changeset
  2298
        withFocusOn:nil
cc4b13d9c53b checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1252
diff changeset
  2299
        delegate:true
cc4b13d9c53b checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1252
diff changeset
  2300
cc4b13d9c53b checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1252
diff changeset
  2301
!
cc4b13d9c53b checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1252
diff changeset
  2302
983
1a91a129a8cc added #dispatchEvent:
Claus Gittinger <cg@exept.de>
parents: 980
diff changeset
  2303
dispatchEvent:evType arguments:evArgs withFocusOn:focusView delegate:doDelegate
1253
cc4b13d9c53b checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1252
diff changeset
  2304
    "dispatch a user-pushed event.
983
1a91a129a8cc added #dispatchEvent:
Claus Gittinger <cg@exept.de>
parents: 980
diff changeset
  2305
     This allows for events for an appModel to be pushed into the event queue
1a91a129a8cc added #dispatchEvent:
Claus Gittinger <cg@exept.de>
parents: 980
diff changeset
  2306
     the same way as events for a view are pushable."
1a91a129a8cc added #dispatchEvent:
Claus Gittinger <cg@exept.de>
parents: 980
diff changeset
  2307
1a91a129a8cc added #dispatchEvent:
Claus Gittinger <cg@exept.de>
parents: 980
diff changeset
  2308
    self perform:evType withArguments:evArgs
1a91a129a8cc added #dispatchEvent:
Claus Gittinger <cg@exept.de>
parents: 980
diff changeset
  2309
1a91a129a8cc added #dispatchEvent:
Claus Gittinger <cg@exept.de>
parents: 980
diff changeset
  2310
    "Created: / 20.6.1998 / 16:36:54 / cg"
1a91a129a8cc added #dispatchEvent:
Claus Gittinger <cg@exept.de>
parents: 980
diff changeset
  2311
    "Modified: / 20.6.1998 / 16:44:05 / cg"
1a91a129a8cc added #dispatchEvent:
Claus Gittinger <cg@exept.de>
parents: 980
diff changeset
  2312
!
1a91a129a8cc added #dispatchEvent:
Claus Gittinger <cg@exept.de>
parents: 980
diff changeset
  2313
1290
e41570e2a01c always use the new #dispatchEvent methods
ca
parents: 1286
diff changeset
  2314
dispatchEvent:ev type:evType arguments:evArgs withFocusOn:focusView delegate:doDelegate
e41570e2a01c always use the new #dispatchEvent methods
ca
parents: 1286
diff changeset
  2315
    "dispatch a user-pushed event.
e41570e2a01c always use the new #dispatchEvent methods
ca
parents: 1286
diff changeset
  2316
     This allows for events for an appModel to be pushed into the event queue
e41570e2a01c always use the new #dispatchEvent methods
ca
parents: 1286
diff changeset
  2317
     the same way as events for a view are pushable."
e41570e2a01c always use the new #dispatchEvent methods
ca
parents: 1286
diff changeset
  2318
e41570e2a01c always use the new #dispatchEvent methods
ca
parents: 1286
diff changeset
  2319
    self perform:evType withArguments:evArgs
e41570e2a01c always use the new #dispatchEvent methods
ca
parents: 1286
diff changeset
  2320
e41570e2a01c always use the new #dispatchEvent methods
ca
parents: 1286
diff changeset
  2321
    "Created: / 20.6.1998 / 16:36:54 / cg"
e41570e2a01c always use the new #dispatchEvent methods
ca
parents: 1286
diff changeset
  2322
    "Modified: / 20.6.1998 / 16:44:05 / cg"
e41570e2a01c always use the new #dispatchEvent methods
ca
parents: 1286
diff changeset
  2323
!
e41570e2a01c always use the new #dispatchEvent methods
ca
parents: 1286
diff changeset
  2324
e41570e2a01c always use the new #dispatchEvent methods
ca
parents: 1286
diff changeset
  2325
dispatchEvent:event withFocusOn:focusViewOrNil 
1253
cc4b13d9c53b checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1252
diff changeset
  2326
    "dispatch a user-pushed event.
cc4b13d9c53b checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1252
diff changeset
  2327
     This allows for events for an appModel to be pushed into the event queue
cc4b13d9c53b checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1252
diff changeset
  2328
     the same way as events for a view are pushable."
cc4b13d9c53b checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1252
diff changeset
  2329
cc4b13d9c53b checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1252
diff changeset
  2330
    ^ self 
1290
e41570e2a01c always use the new #dispatchEvent methods
ca
parents: 1286
diff changeset
  2331
        dispatchEvent:event 
e41570e2a01c always use the new #dispatchEvent methods
ca
parents: 1286
diff changeset
  2332
        withFocusOn:focusViewOrNil
e41570e2a01c always use the new #dispatchEvent methods
ca
parents: 1286
diff changeset
  2333
        delegate:true
e41570e2a01c always use the new #dispatchEvent methods
ca
parents: 1286
diff changeset
  2334
e41570e2a01c always use the new #dispatchEvent methods
ca
parents: 1286
diff changeset
  2335
e41570e2a01c always use the new #dispatchEvent methods
ca
parents: 1286
diff changeset
  2336
!
e41570e2a01c always use the new #dispatchEvent methods
ca
parents: 1286
diff changeset
  2337
e41570e2a01c always use the new #dispatchEvent methods
ca
parents: 1286
diff changeset
  2338
dispatchEvent:event withFocusOn:focusViewOrNil delegate:doDelegate
e41570e2a01c always use the new #dispatchEvent methods
ca
parents: 1286
diff changeset
  2339
    "dispatch a user-pushed event.
e41570e2a01c always use the new #dispatchEvent methods
ca
parents: 1286
diff changeset
  2340
     This allows for events for an appModel to be pushed into the event queue
e41570e2a01c always use the new #dispatchEvent methods
ca
parents: 1286
diff changeset
  2341
     the same way as events for a view are pushable."
e41570e2a01c always use the new #dispatchEvent methods
ca
parents: 1286
diff changeset
  2342
e41570e2a01c always use the new #dispatchEvent methods
ca
parents: 1286
diff changeset
  2343
    ^ self 
e41570e2a01c always use the new #dispatchEvent methods
ca
parents: 1286
diff changeset
  2344
        dispatchEvent:event 
e41570e2a01c always use the new #dispatchEvent methods
ca
parents: 1286
diff changeset
  2345
        type:event type
1253
cc4b13d9c53b checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1252
diff changeset
  2346
        arguments:(event arguments)
cc4b13d9c53b checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1252
diff changeset
  2347
        withFocusOn:focusViewOrNil
1290
e41570e2a01c always use the new #dispatchEvent methods
ca
parents: 1286
diff changeset
  2348
        delegate:doDelegate
1253
cc4b13d9c53b checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1252
diff changeset
  2349
cc4b13d9c53b checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1252
diff changeset
  2350
cc4b13d9c53b checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1252
diff changeset
  2351
!
cc4b13d9c53b checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1252
diff changeset
  2352
967
2ddfe61c3c37 added #noticeOfWindowClose (ST-80 compatibility)
Claus Gittinger <cg@exept.de>
parents: 963
diff changeset
  2353
noticeOfWindowClose:aWindow
2ddfe61c3c37 added #noticeOfWindowClose (ST-80 compatibility)
Claus Gittinger <cg@exept.de>
parents: 963
diff changeset
  2354
    "sent when a topView has been closed.
2ddfe61c3c37 added #noticeOfWindowClose (ST-80 compatibility)
Claus Gittinger <cg@exept.de>
parents: 963
diff changeset
  2355
     Can be redefined in subclasses for cleanup."
2ddfe61c3c37 added #noticeOfWindowClose (ST-80 compatibility)
Claus Gittinger <cg@exept.de>
parents: 963
diff changeset
  2356
2ddfe61c3c37 added #noticeOfWindowClose (ST-80 compatibility)
Claus Gittinger <cg@exept.de>
parents: 963
diff changeset
  2357
    ^ self
2ddfe61c3c37 added #noticeOfWindowClose (ST-80 compatibility)
Claus Gittinger <cg@exept.de>
parents: 963
diff changeset
  2358
2ddfe61c3c37 added #noticeOfWindowClose (ST-80 compatibility)
Claus Gittinger <cg@exept.de>
parents: 963
diff changeset
  2359
    "Created: / 18.6.1998 / 18:56:31 / cg"
2ddfe61c3c37 added #noticeOfWindowClose (ST-80 compatibility)
Claus Gittinger <cg@exept.de>
parents: 963
diff changeset
  2360
    "Modified: / 18.6.1998 / 19:14:16 / cg"
2ddfe61c3c37 added #noticeOfWindowClose (ST-80 compatibility)
Claus Gittinger <cg@exept.de>
parents: 963
diff changeset
  2361
!
2ddfe61c3c37 added #noticeOfWindowClose (ST-80 compatibility)
Claus Gittinger <cg@exept.de>
parents: 963
diff changeset
  2362
975
7edaf9f69ef7 must create the builder just before building
Claus Gittinger <cg@exept.de>
parents: 969
diff changeset
  2363
requestForWindowClose
7edaf9f69ef7 must create the builder just before building
Claus Gittinger <cg@exept.de>
parents: 969
diff changeset
  2364
    "the applicationWindow wants to know, if a close
7edaf9f69ef7 must create the builder just before building
Claus Gittinger <cg@exept.de>
parents: 969
diff changeset
  2365
     is ok. Return false if not."
7edaf9f69ef7 must create the builder just before building
Claus Gittinger <cg@exept.de>
parents: 969
diff changeset
  2366
7edaf9f69ef7 must create the builder just before building
Claus Gittinger <cg@exept.de>
parents: 969
diff changeset
  2367
    |w k|
7edaf9f69ef7 must create the builder just before building
Claus Gittinger <cg@exept.de>
parents: 969
diff changeset
  2368
7edaf9f69ef7 must create the builder just before building
Claus Gittinger <cg@exept.de>
parents: 969
diff changeset
  2369
    builder notNil ifTrue:[
7edaf9f69ef7 must create the builder just before building
Claus Gittinger <cg@exept.de>
parents: 969
diff changeset
  2370
        (w := builder window) notNil ifTrue:[
7edaf9f69ef7 must create the builder just before building
Claus Gittinger <cg@exept.de>
parents: 969
diff changeset
  2371
            (k := w keyboardProcessor) notNil ifTrue:[
7edaf9f69ef7 must create the builder just before building
Claus Gittinger <cg@exept.de>
parents: 969
diff changeset
  2372
                ^ k requestForWindowClose
7edaf9f69ef7 must create the builder just before building
Claus Gittinger <cg@exept.de>
parents: 969
diff changeset
  2373
            ]
7edaf9f69ef7 must create the builder just before building
Claus Gittinger <cg@exept.de>
parents: 969
diff changeset
  2374
        ]
7edaf9f69ef7 must create the builder just before building
Claus Gittinger <cg@exept.de>
parents: 969
diff changeset
  2375
    ].
7edaf9f69ef7 must create the builder just before building
Claus Gittinger <cg@exept.de>
parents: 969
diff changeset
  2376
    ^ true
7edaf9f69ef7 must create the builder just before building
Claus Gittinger <cg@exept.de>
parents: 969
diff changeset
  2377
7edaf9f69ef7 must create the builder just before building
Claus Gittinger <cg@exept.de>
parents: 969
diff changeset
  2378
    "Modified: / 18.6.1998 / 19:14:16 / cg"
7edaf9f69ef7 must create the builder just before building
Claus Gittinger <cg@exept.de>
parents: 969
diff changeset
  2379
    "Created: / 19.6.1998 / 01:34:58 / cg"
7edaf9f69ef7 must create the builder just before building
Claus Gittinger <cg@exept.de>
parents: 969
diff changeset
  2380
!
7edaf9f69ef7 must create the builder just before building
Claus Gittinger <cg@exept.de>
parents: 969
diff changeset
  2381
144
a75a0c558a77 activity notification added
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  2382
showActivity:someMessage
215
369b0376e859 commentary
Claus Gittinger <cg@exept.de>
parents: 187
diff changeset
  2383
    "some activityNotification shalt be communicated to
369b0376e859 commentary
Claus Gittinger <cg@exept.de>
parents: 187
diff changeset
  2384
     the user. Forwarded from the topView and ignored here.
369b0376e859 commentary
Claus Gittinger <cg@exept.de>
parents: 187
diff changeset
  2385
     Can be redefined in concrete applications to show the
369b0376e859 commentary
Claus Gittinger <cg@exept.de>
parents: 187
diff changeset
  2386
     message either in some infoView (infoLabel as in Windows)
369b0376e859 commentary
Claus Gittinger <cg@exept.de>
parents: 187
diff changeset
  2387
     or in the title area (as done in the browsers)"
369b0376e859 commentary
Claus Gittinger <cg@exept.de>
parents: 187
diff changeset
  2388
144
a75a0c558a77 activity notification added
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  2389
    ^ self
a75a0c558a77 activity notification added
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  2390
a75a0c558a77 activity notification added
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  2391
    "Created: 16.12.1995 / 18:41:04 / cg"
215
369b0376e859 commentary
Claus Gittinger <cg@exept.de>
parents: 187
diff changeset
  2392
    "Modified: 24.4.1996 / 09:34:22 / cg"
144
a75a0c558a77 activity notification added
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  2393
!
a75a0c558a77 activity notification added
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  2394
85
claus
parents: 83
diff changeset
  2395
windowEvent:anEvent from:anApplicationWindow
215
369b0376e859 commentary
Claus Gittinger <cg@exept.de>
parents: 187
diff changeset
  2396
    "dummy: windowEvent forwarding is not yet implemented"
369b0376e859 commentary
Claus Gittinger <cg@exept.de>
parents: 187
diff changeset
  2397
85
claus
parents: 83
diff changeset
  2398
    ^ self
215
369b0376e859 commentary
Claus Gittinger <cg@exept.de>
parents: 187
diff changeset
  2399
369b0376e859 commentary
Claus Gittinger <cg@exept.de>
parents: 187
diff changeset
  2400
    "Modified: 24.4.1996 / 09:32:50 / cg"
85
claus
parents: 83
diff changeset
  2401
! !
claus
parents: 83
diff changeset
  2402
361
765fe20a26d1 fixed #openOnDevice:;
Claus Gittinger <cg@exept.de>
parents: 330
diff changeset
  2403
!ApplicationModel class methodsFor:'documentation'!
72
claus
parents: 71
diff changeset
  2404
138
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
  2405
version
1372
1395b98e1597 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
  2406
    ^ '$Header: /cvs/stx/stx/libview2/ApplicationModel.st,v 1.133 2000-05-17 17:44:45 cg Exp $'
81
claus
parents: 78
diff changeset
  2407
! !
138
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
  2408
ApplicationModel initialize!