WinBuilder.st
author tz
Fri, 09 Jan 1998 16:50:18 +0100
changeset 752 93690dcd1b75
parent 735 4b66677877e8
child 774 fb8810086f95
permissions -rw-r--r--
button and label translation support added.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
89
claus
parents: 86
diff changeset
     1
"
claus
parents: 86
diff changeset
     2
 COPYRIGHT (c) 1995 by Claus Gittinger
434
eeb7ba6aede3 *** empty log message ***
ca
parents: 433
diff changeset
     3
              All Rights Reserved
89
claus
parents: 86
diff changeset
     4
claus
parents: 86
diff changeset
     5
 This software is furnished under a license and may be used
claus
parents: 86
diff changeset
     6
 only in accordance with the terms of that license and with the
claus
parents: 86
diff changeset
     7
 inclusion of the above copyright notice.   This software may not
claus
parents: 86
diff changeset
     8
 be provided or otherwise made available to, or used by, any
claus
parents: 86
diff changeset
     9
 other person.  No title to or ownership of the software is
claus
parents: 86
diff changeset
    10
 hereby transferred.
claus
parents: 86
diff changeset
    11
"
claus
parents: 86
diff changeset
    12
100
claus
parents: 99
diff changeset
    13
Object subclass:#WindowBuilder
480
40218790e4ba *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 477
diff changeset
    14
	instanceVariableNames:'window windowView application bindings visuals focusSequence
600
885bd39df8df access help key
ca
parents: 598
diff changeset
    15
		namedComponents helpKeys componentCreationHook applicationClass
502
43ca81bcde49 supporting SubCanvas-Spec
ca
parents: 480
diff changeset
    16
		keyboardProcessor subCanvasSpecs'
717
b89142a61d05 #aspectAt: must also ask class.
Claus Gittinger <cg@exept.de>
parents: 716
diff changeset
    17
	classVariableNames:'StopOnError'
436
b5e56e1f367f checkin from browser
ca
parents: 434
diff changeset
    18
	poolDictionaries:''
b5e56e1f367f checkin from browser
ca
parents: 434
diff changeset
    19
	category:'Interface-Support-UI'
66
claus
parents:
diff changeset
    20
!
claus
parents:
diff changeset
    21
claus
parents:
diff changeset
    22
!WindowBuilder class methodsFor:'documentation'!
claus
parents:
diff changeset
    23
89
claus
parents: 86
diff changeset
    24
copyright
claus
parents: 86
diff changeset
    25
"
claus
parents: 86
diff changeset
    26
 COPYRIGHT (c) 1995 by Claus Gittinger
434
eeb7ba6aede3 *** empty log message ***
ca
parents: 433
diff changeset
    27
              All Rights Reserved
89
claus
parents: 86
diff changeset
    28
claus
parents: 86
diff changeset
    29
 This software is furnished under a license and may be used
claus
parents: 86
diff changeset
    30
 only in accordance with the terms of that license and with the
claus
parents: 86
diff changeset
    31
 inclusion of the above copyright notice.   This software may not
claus
parents: 86
diff changeset
    32
 be provided or otherwise made available to, or used by, any
claus
parents: 86
diff changeset
    33
 other person.  No title to or ownership of the software is
claus
parents: 86
diff changeset
    34
 hereby transferred.
claus
parents: 86
diff changeset
    35
"
claus
parents: 86
diff changeset
    36
!
claus
parents: 86
diff changeset
    37
66
claus
parents:
diff changeset
    38
documentation
claus
parents:
diff changeset
    39
"
69
claus
parents: 66
diff changeset
    40
    a no-op class, for systems which do not use the UIBuilder.
66
claus
parents:
diff changeset
    41
    Concrete subclasses know how to create a view (with components) from
735
4b66677877e8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 727
diff changeset
    42
    some interface spec. 
4b66677877e8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 727
diff changeset
    43
    Currently, an experimantal version of UIBuilder exists,
66
claus
parents:
diff changeset
    44
    and more may be added in the future (for example, to parse different UI
735
4b66677877e8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 727
diff changeset
    45
    specs - thinking of motifs UIL specs, Windows DialogSpecs etc.).
223
b65dc250db8d documentation
Claus Gittinger <cg@exept.de>
parents: 176
diff changeset
    46
b65dc250db8d documentation
Claus Gittinger <cg@exept.de>
parents: 176
diff changeset
    47
    [author:]
b65dc250db8d documentation
Claus Gittinger <cg@exept.de>
parents: 176
diff changeset
    48
        Claus Gittinger
66
claus
parents:
diff changeset
    49
"
claus
parents:
diff changeset
    50
! !
claus
parents:
diff changeset
    51
claus
parents:
diff changeset
    52
!WindowBuilder methodsFor:'accessing'!
claus
parents:
diff changeset
    53
463
75a8e06ef324 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
    54
addBindings:moreBindings
75a8e06ef324 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
    55
    "used with subDialogs, which provide local bindings.
75a8e06ef324 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
    56
     All bindings from moreBindings overwrite any local bindings."
75a8e06ef324 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
    57
75a8e06ef324 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
    58
    moreBindings notNil ifTrue:[
75a8e06ef324 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
    59
        moreBindings keysAndValuesDo:[:aKey :aValue |
75a8e06ef324 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
    60
            bindings at:aKey put:aValue
75a8e06ef324 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
    61
        ]
75a8e06ef324 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
    62
    ]
75a8e06ef324 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
    63
75a8e06ef324 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
    64
    "Created: 28.2.1997 / 14:14:33 / cg"
75a8e06ef324 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
    65
!
75a8e06ef324 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
    66
100
claus
parents: 99
diff changeset
    67
application
372
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
    68
    "return the application (an ApplicationModel),
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
    69
     for which the view is built.
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
    70
     This one is supposed to provide the aspects, menus etc."
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
    71
100
claus
parents: 99
diff changeset
    72
    ^ application
372
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
    73
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
    74
    "Modified: 17.1.1997 / 19:04:40 / cg"
66
claus
parents:
diff changeset
    75
!
claus
parents:
diff changeset
    76
125
fa5b5e4336bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
    77
application:anApplicationModel
372
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
    78
    "set the application (an ApplicationModel),
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
    79
     for which the view is built.
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
    80
     This one is supposed to provide the aspects, menus etc."
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
    81
125
fa5b5e4336bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
    82
    application := anApplicationModel
372
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
    83
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
    84
    "Modified: 17.1.1997 / 19:04:47 / cg"
66
claus
parents:
diff changeset
    85
!
claus
parents:
diff changeset
    86
422
ccffe7647895 changed binding access
ca
parents: 420
diff changeset
    87
applicationClass:something
ccffe7647895 changed binding access
ca
parents: 420
diff changeset
    88
    "set the value of the instance variable 'applicationClass' (automatically generated)"
ccffe7647895 changed binding access
ca
parents: 420
diff changeset
    89
ccffe7647895 changed binding access
ca
parents: 420
diff changeset
    90
    applicationClass := something.!
ccffe7647895 changed binding access
ca
parents: 420
diff changeset
    91
66
claus
parents:
diff changeset
    92
aspectAt:aSymbol
433
31b52cc4451a *** empty log message ***
ca
parents: 428
diff changeset
    93
    |b|
31b52cc4451a *** empty log message ***
ca
parents: 428
diff changeset
    94
473
9ef922391c70 nil aspect
ca
parents: 467
diff changeset
    95
    aSymbol notNil ifTrue:[
9ef922391c70 nil aspect
ca
parents: 467
diff changeset
    96
        bindings notNil ifTrue:[
9ef922391c70 nil aspect
ca
parents: 467
diff changeset
    97
            b := bindings at:aSymbol ifAbsent:nil.
9ef922391c70 nil aspect
ca
parents: 467
diff changeset
    98
            b notNil ifTrue:[^ b].
9ef922391c70 nil aspect
ca
parents: 467
diff changeset
    99
        ].
434
eeb7ba6aede3 *** empty log message ***
ca
parents: 433
diff changeset
   100
473
9ef922391c70 nil aspect
ca
parents: 467
diff changeset
   101
        application notNil ifTrue:[
577
818d08c9aef1 add trace messages:
ca
parents: 502
diff changeset
   102
            Object messageNotUnderstoodSignal handle:[:ex |
727
74603345637d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 717
diff changeset
   103
                ex parameter selector == aSymbol ifFalse:[
74603345637d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 717
diff changeset
   104
                    ex reject
74603345637d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 717
diff changeset
   105
                ]
577
818d08c9aef1 add trace messages:
ca
parents: 502
diff changeset
   106
            ] do:[
473
9ef922391c70 nil aspect
ca
parents: 467
diff changeset
   107
                ^ application aspectFor:aSymbol
717
b89142a61d05 #aspectAt: must also ask class.
Claus Gittinger <cg@exept.de>
parents: 716
diff changeset
   108
            ].
b89142a61d05 #aspectAt: must also ask class.
Claus Gittinger <cg@exept.de>
parents: 716
diff changeset
   109
            Object messageNotUnderstoodSignal handle:[:ex |
727
74603345637d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 717
diff changeset
   110
                ex parameter selector == aSymbol ifFalse:[
74603345637d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 717
diff changeset
   111
                    ex reject
74603345637d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 717
diff changeset
   112
                ]
717
b89142a61d05 #aspectAt: must also ask class.
Claus Gittinger <cg@exept.de>
parents: 716
diff changeset
   113
            ] do:[
b89142a61d05 #aspectAt: must also ask class.
Claus Gittinger <cg@exept.de>
parents: 716
diff changeset
   114
                ^ application class aspectFor:aSymbol
b89142a61d05 #aspectAt: must also ask class.
Claus Gittinger <cg@exept.de>
parents: 716
diff changeset
   115
            ].
b89142a61d05 #aspectAt: must also ask class.
Claus Gittinger <cg@exept.de>
parents: 716
diff changeset
   116
            Transcript showCR:'WindowBuilder: no aspect for ' , aSymbol storeString.
b89142a61d05 #aspectAt: must also ask class.
Claus Gittinger <cg@exept.de>
parents: 716
diff changeset
   117
            StopOnError == true ifTrue:[self halt].  "/ avoids debugger in end-user apps
b89142a61d05 #aspectAt: must also ask class.
Claus Gittinger <cg@exept.de>
parents: 716
diff changeset
   118
        ].
433
31b52cc4451a *** empty log message ***
ca
parents: 428
diff changeset
   119
    ].
31b52cc4451a *** empty log message ***
ca
parents: 428
diff changeset
   120
    ^ nil
372
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   121
727
74603345637d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 717
diff changeset
   122
    "Modified: / 29.10.1997 / 17:26:16 / cg"
66
claus
parents:
diff changeset
   123
!
claus
parents:
diff changeset
   124
125
fa5b5e4336bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   125
aspectAt:aSymbol put:aModel
372
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   126
    bindings isNil ifTrue:[
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   127
        bindings := IdentityDictionary new
125
fa5b5e4336bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   128
    ].
372
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   129
    ^ bindings at:aSymbol put:aModel
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   130
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   131
    "Modified: 17.1.1997 / 19:28:37 / cg"
100
claus
parents: 99
diff changeset
   132
!
claus
parents: 99
diff changeset
   133
450
2a6e2eb653f0 so far ...
ca
parents: 436
diff changeset
   134
bindingAt:aSymbol
2a6e2eb653f0 so far ...
ca
parents: 436
diff changeset
   135
    bindings notNil ifTrue:[
2a6e2eb653f0 so far ...
ca
parents: 436
diff changeset
   136
        ^ bindings at:aSymbol ifAbsent:nil.
2a6e2eb653f0 so far ...
ca
parents: 436
diff changeset
   137
    ].
2a6e2eb653f0 so far ...
ca
parents: 436
diff changeset
   138
    ^ nil
2a6e2eb653f0 so far ...
ca
parents: 436
diff changeset
   139
!
2a6e2eb653f0 so far ...
ca
parents: 436
diff changeset
   140
100
claus
parents: 99
diff changeset
   141
bindings
claus
parents: 99
diff changeset
   142
    ^ bindings
claus
parents: 99
diff changeset
   143
!
claus
parents: 99
diff changeset
   144
claus
parents: 99
diff changeset
   145
bindings:aDictionary
claus
parents: 99
diff changeset
   146
    bindings := aDictionary
claus
parents: 99
diff changeset
   147
!
claus
parents: 99
diff changeset
   148
125
fa5b5e4336bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   149
componentAt:name
450
2a6e2eb653f0 so far ...
ca
parents: 436
diff changeset
   150
    namedComponents isNil ifTrue:[^ nil].
2a6e2eb653f0 so far ...
ca
parents: 436
diff changeset
   151
    ^ namedComponents at:name asSymbol ifAbsent:nil
125
fa5b5e4336bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   152
!
fa5b5e4336bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   153
100
claus
parents: 99
diff changeset
   154
componentAt:name put:aComponent
450
2a6e2eb653f0 so far ...
ca
parents: 436
diff changeset
   155
    namedComponents isNil ifTrue:[
2a6e2eb653f0 so far ...
ca
parents: 436
diff changeset
   156
        namedComponents := IdentityDictionary new.
100
claus
parents: 99
diff changeset
   157
    ].
450
2a6e2eb653f0 so far ...
ca
parents: 436
diff changeset
   158
    namedComponents at:name asSymbol put:aComponent
100
claus
parents: 99
diff changeset
   159
!
claus
parents: 99
diff changeset
   160
410
2d21748e0d9c checkin from browser
ca
parents: 408
diff changeset
   161
componentCreationHook:something
2d21748e0d9c checkin from browser
ca
parents: 408
diff changeset
   162
    "set the value of the instance variable 'componentCreationHook' (automatically generated)"
2d21748e0d9c checkin from browser
ca
parents: 408
diff changeset
   163
2d21748e0d9c checkin from browser
ca
parents: 408
diff changeset
   164
    componentCreationHook := something.!
2d21748e0d9c checkin from browser
ca
parents: 408
diff changeset
   165
125
fa5b5e4336bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   166
focusSequence 
fa5b5e4336bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   167
    ^ focusSequence
66
claus
parents:
diff changeset
   168
!
claus
parents:
diff changeset
   169
600
885bd39df8df access help key
ca
parents: 598
diff changeset
   170
helpKeyFor:aComponent
885bd39df8df access help key
ca
parents: 598
diff changeset
   171
    |v key|
885bd39df8df access help key
ca
parents: 598
diff changeset
   172
885bd39df8df access help key
ca
parents: 598
diff changeset
   173
    helpKeys isNil ifTrue:[^ nil].
885bd39df8df access help key
ca
parents: 598
diff changeset
   174
    v := aComponent.
885bd39df8df access help key
ca
parents: 598
diff changeset
   175
    [v notNil] whileTrue:[
885bd39df8df access help key
ca
parents: 598
diff changeset
   176
        (key := helpKeys at:v ifAbsent:nil) notNil ifTrue:[
885bd39df8df access help key
ca
parents: 598
diff changeset
   177
            ^ key
885bd39df8df access help key
ca
parents: 598
diff changeset
   178
        ].
885bd39df8df access help key
ca
parents: 598
diff changeset
   179
        v := v superView
885bd39df8df access help key
ca
parents: 598
diff changeset
   180
    ].
595
15d80dd3d974 help text
ca
parents: 587
diff changeset
   181
    ^ nil
600
885bd39df8df access help key
ca
parents: 598
diff changeset
   182
!
595
15d80dd3d974 help text
ca
parents: 587
diff changeset
   183
600
885bd39df8df access help key
ca
parents: 598
diff changeset
   184
helpKeyFor:aComponent put:aKey
595
15d80dd3d974 help text
ca
parents: 587
diff changeset
   185
600
885bd39df8df access help key
ca
parents: 598
diff changeset
   186
    aKey isNil ifTrue:[
885bd39df8df access help key
ca
parents: 598
diff changeset
   187
        helpKeys isNil ifFalse:[
885bd39df8df access help key
ca
parents: 598
diff changeset
   188
            helpKeys removeKey:aComponent ifAbsent:nil
885bd39df8df access help key
ca
parents: 598
diff changeset
   189
        ]
885bd39df8df access help key
ca
parents: 598
diff changeset
   190
    ] ifFalse:[
885bd39df8df access help key
ca
parents: 598
diff changeset
   191
        helpKeys isNil ifTrue:[
885bd39df8df access help key
ca
parents: 598
diff changeset
   192
            helpKeys := IdentityDictionary new
885bd39df8df access help key
ca
parents: 598
diff changeset
   193
        ].
885bd39df8df access help key
ca
parents: 598
diff changeset
   194
        helpKeys at:aComponent put:aKey
885bd39df8df access help key
ca
parents: 598
diff changeset
   195
    ]
595
15d80dd3d974 help text
ca
parents: 587
diff changeset
   196
15d80dd3d974 help text
ca
parents: 587
diff changeset
   197
!
15d80dd3d974 help text
ca
parents: 587
diff changeset
   198
477
4473bdcb24cb checkin from browser
Claus Gittinger <cg@exept.de>
parents: 475
diff changeset
   199
keyboardProcessor
4473bdcb24cb checkin from browser
Claus Gittinger <cg@exept.de>
parents: 475
diff changeset
   200
    keyboardProcessor isNil ifTrue:[
4473bdcb24cb checkin from browser
Claus Gittinger <cg@exept.de>
parents: 475
diff changeset
   201
        keyboardProcessor := KeyboardProcessor new    
4473bdcb24cb checkin from browser
Claus Gittinger <cg@exept.de>
parents: 475
diff changeset
   202
    ].
4473bdcb24cb checkin from browser
Claus Gittinger <cg@exept.de>
parents: 475
diff changeset
   203
    ^ keyboardProcessor
4473bdcb24cb checkin from browser
Claus Gittinger <cg@exept.de>
parents: 475
diff changeset
   204
4473bdcb24cb checkin from browser
Claus Gittinger <cg@exept.de>
parents: 475
diff changeset
   205
    "Created: 3.3.1997 / 18:31:37 / cg"
4473bdcb24cb checkin from browser
Claus Gittinger <cg@exept.de>
parents: 475
diff changeset
   206
    "Modified: 3.3.1997 / 18:32:27 / cg"
4473bdcb24cb checkin from browser
Claus Gittinger <cg@exept.de>
parents: 475
diff changeset
   207
!
4473bdcb24cb checkin from browser
Claus Gittinger <cg@exept.de>
parents: 475
diff changeset
   208
86
claus
parents: 80
diff changeset
   209
namedComponents
450
2a6e2eb653f0 so far ...
ca
parents: 436
diff changeset
   210
    ^ namedComponents
86
claus
parents: 80
diff changeset
   211
!
claus
parents: 80
diff changeset
   212
372
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   213
source
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   214
    "same as #application, for ST-80 compatibility"
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   215
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   216
    ^ application
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   217
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   218
    "Created: 17.1.1997 / 19:03:51 / cg"
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   219
!
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   220
125
fa5b5e4336bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   221
source:anApplicationModel
372
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   222
    "same as #application:, for ST-80 compatibility"
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   223
125
fa5b5e4336bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   224
    application := anApplicationModel
372
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   225
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   226
    "Modified: 17.1.1997 / 19:03:57 / cg"
125
fa5b5e4336bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   227
!
fa5b5e4336bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   228
502
43ca81bcde49 supporting SubCanvas-Spec
ca
parents: 480
diff changeset
   229
subCanvasAt:majorKey at:minorKey
586
8889c3e9a226 creation of
ca
parents: 577
diff changeset
   230
    "get the subCanvas specification from major and minor key
8889c3e9a226 creation of
ca
parents: 577
diff changeset
   231
    "
735
4b66677877e8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 727
diff changeset
   232
    |spec cls app dict dkey|
502
43ca81bcde49 supporting SubCanvas-Spec
ca
parents: 480
diff changeset
   233
43ca81bcde49 supporting SubCanvas-Spec
ca
parents: 480
diff changeset
   234
    subCanvasSpecs notNil ifTrue:[
586
8889c3e9a226 creation of
ca
parents: 577
diff changeset
   235
        dkey := majorKey ? #NoMajorKey.
8889c3e9a226 creation of
ca
parents: 577
diff changeset
   236
        dict := subCanvasSpecs at:dkey ifAbsent:nil.
8889c3e9a226 creation of
ca
parents: 577
diff changeset
   237
8889c3e9a226 creation of
ca
parents: 577
diff changeset
   238
        dict notNil ifTrue:[
8889c3e9a226 creation of
ca
parents: 577
diff changeset
   239
            spec := dict at:minorKey ifAbsent:nil.
502
43ca81bcde49 supporting SubCanvas-Spec
ca
parents: 480
diff changeset
   240
            spec notNil ifTrue:[^ spec].
43ca81bcde49 supporting SubCanvas-Spec
ca
parents: 480
diff changeset
   241
        ].
43ca81bcde49 supporting SubCanvas-Spec
ca
parents: 480
diff changeset
   242
    ].
586
8889c3e9a226 creation of
ca
parents: 577
diff changeset
   243
502
43ca81bcde49 supporting SubCanvas-Spec
ca
parents: 480
diff changeset
   244
    majorKey isNil ifTrue:[
586
8889c3e9a226 creation of
ca
parents: 577
diff changeset
   245
        spec := self safelyPerform:#specificationFor: with:minorKey.
8889c3e9a226 creation of
ca
parents: 577
diff changeset
   246
8889c3e9a226 creation of
ca
parents: 577
diff changeset
   247
        spec isNil ifTrue:[
8889c3e9a226 creation of
ca
parents: 577
diff changeset
   248
            spec := self safelyPerform:minorKey
8889c3e9a226 creation of
ca
parents: 577
diff changeset
   249
        ]
502
43ca81bcde49 supporting SubCanvas-Spec
ca
parents: 480
diff changeset
   250
    ] ifFalse:[
701
90ff4092bc35 search in applications namespace for majorKey class.
ca
parents: 677
diff changeset
   251
        "/ look for class in applications namespace ...
735
4b66677877e8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 727
diff changeset
   252
        app := self application.
4b66677877e8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 727
diff changeset
   253
        app isNil ifTrue:[
4b66677877e8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 727
diff changeset
   254
            "/ fallBack - use that global, if it exists
4b66677877e8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 727
diff changeset
   255
            cls := Smalltalk at:majorKey.
4b66677877e8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 727
diff changeset
   256
            cls isNil ifTrue:[
4b66677877e8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 727
diff changeset
   257
                Transcript showCR:('missing application when fetching majorKey:' , majorKey).
4b66677877e8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 727
diff changeset
   258
            ]
4b66677877e8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 727
diff changeset
   259
        ] ifFalse:[
4b66677877e8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 727
diff changeset
   260
            cls := app resolveName:majorKey.
4b66677877e8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 727
diff changeset
   261
        ].
586
8889c3e9a226 creation of
ca
parents: 577
diff changeset
   262
        (cls notNil and:[cls respondsTo:minorKey]) ifTrue:[
502
43ca81bcde49 supporting SubCanvas-Spec
ca
parents: 480
diff changeset
   263
            spec := cls perform:minorKey
43ca81bcde49 supporting SubCanvas-Spec
ca
parents: 480
diff changeset
   264
        ]
43ca81bcde49 supporting SubCanvas-Spec
ca
parents: 480
diff changeset
   265
    ].
586
8889c3e9a226 creation of
ca
parents: 577
diff changeset
   266
  ^ spec
8889c3e9a226 creation of
ca
parents: 577
diff changeset
   267
735
4b66677877e8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 727
diff changeset
   268
    "Modified: / 1.11.1997 / 13:38:04 / cg"
502
43ca81bcde49 supporting SubCanvas-Spec
ca
parents: 480
diff changeset
   269
!
43ca81bcde49 supporting SubCanvas-Spec
ca
parents: 480
diff changeset
   270
43ca81bcde49 supporting SubCanvas-Spec
ca
parents: 480
diff changeset
   271
subCanvasAt:majorKey at:minorKey put:aSpec
43ca81bcde49 supporting SubCanvas-Spec
ca
parents: 480
diff changeset
   272
    |dict key|
43ca81bcde49 supporting SubCanvas-Spec
ca
parents: 480
diff changeset
   273
43ca81bcde49 supporting SubCanvas-Spec
ca
parents: 480
diff changeset
   274
    key := majorKey ? #NoMajorKey.
43ca81bcde49 supporting SubCanvas-Spec
ca
parents: 480
diff changeset
   275
    dict := subCanvasSpecs at:key ifAbsent:nil.
43ca81bcde49 supporting SubCanvas-Spec
ca
parents: 480
diff changeset
   276
    dict isNil ifTrue:[
43ca81bcde49 supporting SubCanvas-Spec
ca
parents: 480
diff changeset
   277
        dict := IdentityDictionary new.
43ca81bcde49 supporting SubCanvas-Spec
ca
parents: 480
diff changeset
   278
        subCanvasSpecs at:key put:dict
43ca81bcde49 supporting SubCanvas-Spec
ca
parents: 480
diff changeset
   279
    ].
43ca81bcde49 supporting SubCanvas-Spec
ca
parents: 480
diff changeset
   280
    dict at:minorKey put:aSpec
43ca81bcde49 supporting SubCanvas-Spec
ca
parents: 480
diff changeset
   281
43ca81bcde49 supporting SubCanvas-Spec
ca
parents: 480
diff changeset
   282
!
43ca81bcde49 supporting SubCanvas-Spec
ca
parents: 480
diff changeset
   283
475
fd94f2bc8b9e added #visuals, #visualAt: and #visualAt:put:
Claus Gittinger <cg@exept.de>
parents: 473
diff changeset
   284
visualAt:name
fd94f2bc8b9e added #visuals, #visualAt: and #visualAt:put:
Claus Gittinger <cg@exept.de>
parents: 473
diff changeset
   285
    visuals isNil ifTrue:[^ nil].
fd94f2bc8b9e added #visuals, #visualAt: and #visualAt:put:
Claus Gittinger <cg@exept.de>
parents: 473
diff changeset
   286
    ^ visuals at:name asSymbol ifAbsent:nil
fd94f2bc8b9e added #visuals, #visualAt: and #visualAt:put:
Claus Gittinger <cg@exept.de>
parents: 473
diff changeset
   287
fd94f2bc8b9e added #visuals, #visualAt: and #visualAt:put:
Claus Gittinger <cg@exept.de>
parents: 473
diff changeset
   288
    "Created: 3.3.1997 / 16:24:17 / cg"
fd94f2bc8b9e added #visuals, #visualAt: and #visualAt:put:
Claus Gittinger <cg@exept.de>
parents: 473
diff changeset
   289
!
fd94f2bc8b9e added #visuals, #visualAt: and #visualAt:put:
Claus Gittinger <cg@exept.de>
parents: 473
diff changeset
   290
fd94f2bc8b9e added #visuals, #visualAt: and #visualAt:put:
Claus Gittinger <cg@exept.de>
parents: 473
diff changeset
   291
visualAt:name put:aVisual
fd94f2bc8b9e added #visuals, #visualAt: and #visualAt:put:
Claus Gittinger <cg@exept.de>
parents: 473
diff changeset
   292
    visuals isNil ifTrue:[
fd94f2bc8b9e added #visuals, #visualAt: and #visualAt:put:
Claus Gittinger <cg@exept.de>
parents: 473
diff changeset
   293
        visuals := IdentityDictionary new.
fd94f2bc8b9e added #visuals, #visualAt: and #visualAt:put:
Claus Gittinger <cg@exept.de>
parents: 473
diff changeset
   294
    ].
fd94f2bc8b9e added #visuals, #visualAt: and #visualAt:put:
Claus Gittinger <cg@exept.de>
parents: 473
diff changeset
   295
    visuals at:name asSymbol put:aVisual
fd94f2bc8b9e added #visuals, #visualAt: and #visualAt:put:
Claus Gittinger <cg@exept.de>
parents: 473
diff changeset
   296
fd94f2bc8b9e added #visuals, #visualAt: and #visualAt:put:
Claus Gittinger <cg@exept.de>
parents: 473
diff changeset
   297
    "Created: 3.3.1997 / 16:24:41 / cg"
fd94f2bc8b9e added #visuals, #visualAt: and #visualAt:put:
Claus Gittinger <cg@exept.de>
parents: 473
diff changeset
   298
!
fd94f2bc8b9e added #visuals, #visualAt: and #visualAt:put:
Claus Gittinger <cg@exept.de>
parents: 473
diff changeset
   299
fd94f2bc8b9e added #visuals, #visualAt: and #visualAt:put:
Claus Gittinger <cg@exept.de>
parents: 473
diff changeset
   300
visuals
fd94f2bc8b9e added #visuals, #visualAt: and #visualAt:put:
Claus Gittinger <cg@exept.de>
parents: 473
diff changeset
   301
    ^ visuals
fd94f2bc8b9e added #visuals, #visualAt: and #visualAt:put:
Claus Gittinger <cg@exept.de>
parents: 473
diff changeset
   302
fd94f2bc8b9e added #visuals, #visualAt: and #visualAt:put:
Claus Gittinger <cg@exept.de>
parents: 473
diff changeset
   303
    "Created: 3.3.1997 / 16:24:00 / cg"
fd94f2bc8b9e added #visuals, #visualAt: and #visualAt:put:
Claus Gittinger <cg@exept.de>
parents: 473
diff changeset
   304
!
fd94f2bc8b9e added #visuals, #visualAt: and #visualAt:put:
Claus Gittinger <cg@exept.de>
parents: 473
diff changeset
   305
fd94f2bc8b9e added #visuals, #visualAt: and #visualAt:put:
Claus Gittinger <cg@exept.de>
parents: 473
diff changeset
   306
visuals:aDictionary
fd94f2bc8b9e added #visuals, #visualAt: and #visualAt:put:
Claus Gittinger <cg@exept.de>
parents: 473
diff changeset
   307
    visuals := aDictionary
fd94f2bc8b9e added #visuals, #visualAt: and #visualAt:put:
Claus Gittinger <cg@exept.de>
parents: 473
diff changeset
   308
fd94f2bc8b9e added #visuals, #visualAt: and #visualAt:put:
Claus Gittinger <cg@exept.de>
parents: 473
diff changeset
   309
    "Created: 3.3.1997 / 16:24:06 / cg"
fd94f2bc8b9e added #visuals, #visualAt: and #visualAt:put:
Claus Gittinger <cg@exept.de>
parents: 473
diff changeset
   310
!
fd94f2bc8b9e added #visuals, #visualAt: and #visualAt:put:
Claus Gittinger <cg@exept.de>
parents: 473
diff changeset
   311
125
fa5b5e4336bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   312
window
372
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   313
    "return the top window (view), for which an interface
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   314
     is (being) built"
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   315
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   316
    ^ window
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   317
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   318
    "Modified: 17.1.1997 / 19:30:00 / cg"
125
fa5b5e4336bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   319
!
fa5b5e4336bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   320
fa5b5e4336bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   321
window:aView
372
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   322
    "set the top window (view), for which an interface
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   323
     is (being) built"
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   324
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   325
    window := aView
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   326
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   327
    "Modified: 17.1.1997 / 19:30:22 / cg"
66
claus
parents:
diff changeset
   328
!
claus
parents:
diff changeset
   329
claus
parents:
diff changeset
   330
windowGroup
372
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   331
    ^ window windowGroup
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   332
608
1cd72d2d7e3b removed debugHalt
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
   333
    "Modified: 17.6.1997 / 18:04:01 / cg"
66
claus
parents:
diff changeset
   334
! !
claus
parents:
diff changeset
   335
673
5e342b1ebe45 added #booleanAspectFor: as a code-saver
Claus Gittinger <cg@exept.de>
parents: 664
diff changeset
   336
!WindowBuilder methodsFor:'aspect access support'!
5e342b1ebe45 added #booleanAspectFor: as a code-saver
Claus Gittinger <cg@exept.de>
parents: 664
diff changeset
   337
675
655134e5e064 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 674
diff changeset
   338
booleanValueAspectFor:aKey
674
a48904783fba checkin from browser
Claus Gittinger <cg@exept.de>
parents: 673
diff changeset
   339
    "helper (common code) to generate a boolean aspect if required.
a48904783fba checkin from browser
Claus Gittinger <cg@exept.de>
parents: 673
diff changeset
   340
     If no binding exists for aKey, a valueHolder holding false is
a48904783fba checkin from browser
Claus Gittinger <cg@exept.de>
parents: 673
diff changeset
   341
     created and added to the bindings.
a48904783fba checkin from browser
Claus Gittinger <cg@exept.de>
parents: 673
diff changeset
   342
     Otherwise, the existing binding is returned."
673
5e342b1ebe45 added #booleanAspectFor: as a code-saver
Claus Gittinger <cg@exept.de>
parents: 664
diff changeset
   343
676
40945340dc59 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 675
diff changeset
   344
    ^ self valueAspectFor:aKey initialValue:false
673
5e342b1ebe45 added #booleanAspectFor: as a code-saver
Claus Gittinger <cg@exept.de>
parents: 664
diff changeset
   345
676
40945340dc59 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 675
diff changeset
   346
    "Modified: 28.7.1997 / 12:53:57 / cg"
675
655134e5e064 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 674
diff changeset
   347
!
655134e5e064 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 674
diff changeset
   348
655134e5e064 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 674
diff changeset
   349
nilValueAspectFor:aKey
655134e5e064 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 674
diff changeset
   350
    "helper (common code) to generate a valueHolder aspect if required.
655134e5e064 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 674
diff changeset
   351
     If no binding exists for aKey, a valueHolder holding nil is
655134e5e064 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 674
diff changeset
   352
     created and added to the bindings.
655134e5e064 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 674
diff changeset
   353
     Otherwise, the existing binding is returned."
655134e5e064 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 674
diff changeset
   354
676
40945340dc59 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 675
diff changeset
   355
    ^ self valueAspectFor:aKey initialValue:nil
40945340dc59 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 675
diff changeset
   356
40945340dc59 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 675
diff changeset
   357
    "Modified: 28.7.1997 / 12:54:06 / cg"
40945340dc59 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 675
diff changeset
   358
!
40945340dc59 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 675
diff changeset
   359
40945340dc59 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 675
diff changeset
   360
valueAspectFor:aKey initialValue:initialValue
40945340dc59 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 675
diff changeset
   361
    "helper (common code) to generate a valueHolder aspect if required.
40945340dc59 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 675
diff changeset
   362
     If no binding exists for aKey, a valueHolder holding initialValue is
40945340dc59 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 675
diff changeset
   363
     created and added to the bindings.
40945340dc59 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 675
diff changeset
   364
     Otherwise, the existing binding is returned."
40945340dc59 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 675
diff changeset
   365
675
655134e5e064 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 674
diff changeset
   366
    |holder|
655134e5e064 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 674
diff changeset
   367
655134e5e064 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 674
diff changeset
   368
    (holder := self bindingAt:aKey) isNil ifTrue:[
676
40945340dc59 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 675
diff changeset
   369
        self aspectAt:aKey put:(holder :=  initialValue asValue).
675
655134e5e064 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 674
diff changeset
   370
    ].
655134e5e064 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 674
diff changeset
   371
    ^ holder
655134e5e064 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 674
diff changeset
   372
676
40945340dc59 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 675
diff changeset
   373
    "Created: 28.7.1997 / 12:53:45 / cg"
40945340dc59 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 675
diff changeset
   374
    "Modified: 28.7.1997 / 12:54:13 / cg"
673
5e342b1ebe45 added #booleanAspectFor: as a code-saver
Claus Gittinger <cg@exept.de>
parents: 664
diff changeset
   375
! !
5e342b1ebe45 added #booleanAspectFor: as a code-saver
Claus Gittinger <cg@exept.de>
parents: 664
diff changeset
   376
372
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   377
!WindowBuilder methodsFor:'building'!
66
claus
parents:
diff changeset
   378
125
fa5b5e4336bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   379
buildFromSpec:aSpec
176
3890e2b312e0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 132
diff changeset
   380
    ^ self subclassResponsibility
408
93582137e1c7 tabable
ca
parents: 374
diff changeset
   381
!
93582137e1c7 tabable
ca
parents: 374
diff changeset
   382
93582137e1c7 tabable
ca
parents: 374
diff changeset
   383
makeTabable:aComponent
735
4b66677877e8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 727
diff changeset
   384
    "add a component to the list of tabable components"
4b66677877e8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 727
diff changeset
   385
408
93582137e1c7 tabable
ca
parents: 374
diff changeset
   386
    focusSequence isNil ifTrue:[
93582137e1c7 tabable
ca
parents: 374
diff changeset
   387
        focusSequence := OrderedCollection new.
93582137e1c7 tabable
ca
parents: 374
diff changeset
   388
    ].
93582137e1c7 tabable
ca
parents: 374
diff changeset
   389
    focusSequence add:aComponent
735
4b66677877e8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 727
diff changeset
   390
4b66677877e8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 727
diff changeset
   391
    "Modified: / 31.10.1997 / 18:39:30 / cg"
66
claus
parents:
diff changeset
   392
! !
100
claus
parents: 99
diff changeset
   393
586
8889c3e9a226 creation of
ca
parents: 577
diff changeset
   394
!WindowBuilder methodsFor:'message sending'!
8889c3e9a226 creation of
ca
parents: 577
diff changeset
   395
8889c3e9a226 creation of
ca
parents: 577
diff changeset
   396
safelyPerform:aSelector
8889c3e9a226 creation of
ca
parents: 577
diff changeset
   397
    "send the message aSelector to the receiver self or application;
8889c3e9a226 creation of
ca
parents: 577
diff changeset
   398
     the result returned from the send or nil is returned
8889c3e9a226 creation of
ca
parents: 577
diff changeset
   399
    "
8889c3e9a226 creation of
ca
parents: 577
diff changeset
   400
    |res|
8889c3e9a226 creation of
ca
parents: 577
diff changeset
   401
595
15d80dd3d974 help text
ca
parents: 587
diff changeset
   402
    aSelector isSymbol ifTrue:[
15d80dd3d974 help text
ca
parents: 587
diff changeset
   403
        Object messageNotUnderstoodSignal handle:[:ex |
15d80dd3d974 help text
ca
parents: 587
diff changeset
   404
        ] do:[
15d80dd3d974 help text
ca
parents: 587
diff changeset
   405
            (res := self perform:aSelector) notNil ifTrue:[^ res]
15d80dd3d974 help text
ca
parents: 587
diff changeset
   406
        ].
15d80dd3d974 help text
ca
parents: 587
diff changeset
   407
15d80dd3d974 help text
ca
parents: 587
diff changeset
   408
        application notNil ifTrue:[
15d80dd3d974 help text
ca
parents: 587
diff changeset
   409
            Object messageNotUnderstoodSignal handle:[:ex |
15d80dd3d974 help text
ca
parents: 587
diff changeset
   410
            ] do:[
15d80dd3d974 help text
ca
parents: 587
diff changeset
   411
                (res := application perform:aSelector) notNil ifTrue:[^ res]
15d80dd3d974 help text
ca
parents: 587
diff changeset
   412
            ]
586
8889c3e9a226 creation of
ca
parents: 577
diff changeset
   413
        ]
8889c3e9a226 creation of
ca
parents: 577
diff changeset
   414
    ].
595
15d80dd3d974 help text
ca
parents: 587
diff changeset
   415
  ^ nil
586
8889c3e9a226 creation of
ca
parents: 577
diff changeset
   416
!
8889c3e9a226 creation of
ca
parents: 577
diff changeset
   417
8889c3e9a226 creation of
ca
parents: 577
diff changeset
   418
safelyPerform:aSelector with:anArgument
8889c3e9a226 creation of
ca
parents: 577
diff changeset
   419
    "send the one-arg-message aSelector to the receiver self or application;
8889c3e9a226 creation of
ca
parents: 577
diff changeset
   420
     the result returned from the send or nil is returned
8889c3e9a226 creation of
ca
parents: 577
diff changeset
   421
    "
8889c3e9a226 creation of
ca
parents: 577
diff changeset
   422
    |res|
8889c3e9a226 creation of
ca
parents: 577
diff changeset
   423
595
15d80dd3d974 help text
ca
parents: 587
diff changeset
   424
    aSelector isSymbol ifTrue:[
15d80dd3d974 help text
ca
parents: 587
diff changeset
   425
        Object messageNotUnderstoodSignal handle:[:ex |
15d80dd3d974 help text
ca
parents: 587
diff changeset
   426
        ] do:[
15d80dd3d974 help text
ca
parents: 587
diff changeset
   427
            (res := self perform:aSelector with:anArgument) notNil ifTrue:[^ res]
15d80dd3d974 help text
ca
parents: 587
diff changeset
   428
        ].
15d80dd3d974 help text
ca
parents: 587
diff changeset
   429
15d80dd3d974 help text
ca
parents: 587
diff changeset
   430
        application notNil ifTrue:[
15d80dd3d974 help text
ca
parents: 587
diff changeset
   431
            Object messageNotUnderstoodSignal handle:[:ex |
15d80dd3d974 help text
ca
parents: 587
diff changeset
   432
            ] do:[
15d80dd3d974 help text
ca
parents: 587
diff changeset
   433
                (res := application perform:aSelector with:anArgument) notNil ifTrue:[^ res]
15d80dd3d974 help text
ca
parents: 587
diff changeset
   434
            ]
586
8889c3e9a226 creation of
ca
parents: 577
diff changeset
   435
        ]
8889c3e9a226 creation of
ca
parents: 577
diff changeset
   436
    ].
595
15d80dd3d974 help text
ca
parents: 587
diff changeset
   437
  ^ nil
586
8889c3e9a226 creation of
ca
parents: 577
diff changeset
   438
! !
8889c3e9a226 creation of
ca
parents: 577
diff changeset
   439
422
ccffe7647895 changed binding access
ca
parents: 420
diff changeset
   440
!WindowBuilder methodsFor:'spec creation aspect fetch'!
100
claus
parents: 99
diff changeset
   441
374
5be095a54715 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 372
diff changeset
   442
actionFor:aKey
450
2a6e2eb653f0 so far ...
ca
parents: 436
diff changeset
   443
    "return an action for aKey. This is invoked during window building
2a6e2eb653f0 so far ...
ca
parents: 436
diff changeset
   444
     (by the builder) to ask for an ActionButtons actionBlock.
2a6e2eb653f0 so far ...
ca
parents: 436
diff changeset
   445
     Here, first the local bindings are searched, then the application and
2a6e2eb653f0 so far ...
ca
parents: 436
diff changeset
   446
     finally the applications class is asked for a corresponding action.
2a6e2eb653f0 so far ...
ca
parents: 436
diff changeset
   447
     The returned object is typically a block."
2a6e2eb653f0 so far ...
ca
parents: 436
diff changeset
   448
434
eeb7ba6aede3 *** empty log message ***
ca
parents: 433
diff changeset
   449
    |b|
eeb7ba6aede3 *** empty log message ***
ca
parents: 433
diff changeset
   450
eeb7ba6aede3 *** empty log message ***
ca
parents: 433
diff changeset
   451
    bindings notNil ifTrue:[
eeb7ba6aede3 *** empty log message ***
ca
parents: 433
diff changeset
   452
        b := bindings at:aKey ifAbsent:nil.
eeb7ba6aede3 *** empty log message ***
ca
parents: 433
diff changeset
   453
        b notNil ifTrue:[^ b].
eeb7ba6aede3 *** empty log message ***
ca
parents: 433
diff changeset
   454
    ].
eeb7ba6aede3 *** empty log message ***
ca
parents: 433
diff changeset
   455
374
5be095a54715 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 372
diff changeset
   456
    application notNil ifTrue:[
577
818d08c9aef1 add trace messages:
ca
parents: 502
diff changeset
   457
        Object messageNotUnderstoodSignal handle:[:ex |
818d08c9aef1 add trace messages:
ca
parents: 502
diff changeset
   458
        ] do:[
450
2a6e2eb653f0 so far ...
ca
parents: 436
diff changeset
   459
            ^ application actionFor:aKey
2a6e2eb653f0 so far ...
ca
parents: 436
diff changeset
   460
        ]
374
5be095a54715 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 372
diff changeset
   461
    ].
422
ccffe7647895 changed binding access
ca
parents: 420
diff changeset
   462
    applicationClass notNil ifTrue:[
424
098447d8c614 checkin from browser
ca
parents: 423
diff changeset
   463
        (applicationClass respondsTo:#actionFor:) ifTrue:[
098447d8c614 checkin from browser
ca
parents: 423
diff changeset
   464
            ^ applicationClass actionFor:aKey
098447d8c614 checkin from browser
ca
parents: 423
diff changeset
   465
        ]
422
ccffe7647895 changed binding access
ca
parents: 420
diff changeset
   466
    ].
717
b89142a61d05 #aspectAt: must also ask class.
Claus Gittinger <cg@exept.de>
parents: 716
diff changeset
   467
b89142a61d05 #aspectAt: must also ask class.
Claus Gittinger <cg@exept.de>
parents: 716
diff changeset
   468
    Transcript showCR:'WindowBuilder: no action for: ' , aKey storeString.
b89142a61d05 #aspectAt: must also ask class.
Claus Gittinger <cg@exept.de>
parents: 716
diff changeset
   469
    StopOnError == true ifTrue:[self halt].  "/ avoids debugger in end-user apps
b89142a61d05 #aspectAt: must also ask class.
Claus Gittinger <cg@exept.de>
parents: 716
diff changeset
   470
422
ccffe7647895 changed binding access
ca
parents: 420
diff changeset
   471
    ^ []
374
5be095a54715 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 372
diff changeset
   472
717
b89142a61d05 #aspectAt: must also ask class.
Claus Gittinger <cg@exept.de>
parents: 716
diff changeset
   473
    "Created: / 17.1.1997 / 21:08:22 / cg"
b89142a61d05 #aspectAt: must also ask class.
Claus Gittinger <cg@exept.de>
parents: 716
diff changeset
   474
    "Modified: / 28.10.1997 / 12:52:57 / cg"
374
5be095a54715 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 372
diff changeset
   475
!
5be095a54715 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 372
diff changeset
   476
716
a23d48401446 actionFor:aKey withValue:aValue
ca
parents: 707
diff changeset
   477
actionFor:aKey withValue:aValue
a23d48401446 actionFor:aKey withValue:aValue
ca
parents: 707
diff changeset
   478
    "return an action for aKey/value combonation. 
a23d48401446 actionFor:aKey withValue:aValue
ca
parents: 707
diff changeset
   479
     This is invoked during window building
a23d48401446 actionFor:aKey withValue:aValue
ca
parents: 707
diff changeset
   480
     (by the builder) to ask for an ActionButtons actionBlock if that button
a23d48401446 actionFor:aKey withValue:aValue
ca
parents: 707
diff changeset
   481
     specified an action with an argument value.
a23d48401446 actionFor:aKey withValue:aValue
ca
parents: 707
diff changeset
   482
     Here, first the local bindings are searched, then the application and
a23d48401446 actionFor:aKey withValue:aValue
ca
parents: 707
diff changeset
   483
     finally the applications class is asked for a corresponding action.
a23d48401446 actionFor:aKey withValue:aValue
ca
parents: 707
diff changeset
   484
     The returned object is typically a block."
a23d48401446 actionFor:aKey withValue:aValue
ca
parents: 707
diff changeset
   485
a23d48401446 actionFor:aKey withValue:aValue
ca
parents: 707
diff changeset
   486
    |b|
a23d48401446 actionFor:aKey withValue:aValue
ca
parents: 707
diff changeset
   487
a23d48401446 actionFor:aKey withValue:aValue
ca
parents: 707
diff changeset
   488
    bindings notNil ifTrue:[
a23d48401446 actionFor:aKey withValue:aValue
ca
parents: 707
diff changeset
   489
        b := bindings at:aKey ifAbsent:nil.
a23d48401446 actionFor:aKey withValue:aValue
ca
parents: 707
diff changeset
   490
        b notNil ifTrue:[^ b].
a23d48401446 actionFor:aKey withValue:aValue
ca
parents: 707
diff changeset
   491
    ].
a23d48401446 actionFor:aKey withValue:aValue
ca
parents: 707
diff changeset
   492
a23d48401446 actionFor:aKey withValue:aValue
ca
parents: 707
diff changeset
   493
    application notNil ifTrue:[
a23d48401446 actionFor:aKey withValue:aValue
ca
parents: 707
diff changeset
   494
        Object messageNotUnderstoodSignal handle:[:ex |
a23d48401446 actionFor:aKey withValue:aValue
ca
parents: 707
diff changeset
   495
        ] do:[
a23d48401446 actionFor:aKey withValue:aValue
ca
parents: 707
diff changeset
   496
            ^ application actionFor:aKey withValue:aValue
a23d48401446 actionFor:aKey withValue:aValue
ca
parents: 707
diff changeset
   497
        ]
a23d48401446 actionFor:aKey withValue:aValue
ca
parents: 707
diff changeset
   498
    ].
a23d48401446 actionFor:aKey withValue:aValue
ca
parents: 707
diff changeset
   499
    applicationClass notNil ifTrue:[
a23d48401446 actionFor:aKey withValue:aValue
ca
parents: 707
diff changeset
   500
        (applicationClass respondsTo:#actionFor:withValue:) ifTrue:[
a23d48401446 actionFor:aKey withValue:aValue
ca
parents: 707
diff changeset
   501
            ^ applicationClass actionFor:aKey  withValue:aValue
a23d48401446 actionFor:aKey withValue:aValue
ca
parents: 707
diff changeset
   502
        ]
a23d48401446 actionFor:aKey withValue:aValue
ca
parents: 707
diff changeset
   503
    ].
717
b89142a61d05 #aspectAt: must also ask class.
Claus Gittinger <cg@exept.de>
parents: 716
diff changeset
   504
b89142a61d05 #aspectAt: must also ask class.
Claus Gittinger <cg@exept.de>
parents: 716
diff changeset
   505
    Transcript showCR:'WindowBuilder: no action for: ' , aKey storeString.
b89142a61d05 #aspectAt: must also ask class.
Claus Gittinger <cg@exept.de>
parents: 716
diff changeset
   506
    StopOnError == true ifTrue:[self halt].  "/ avoids debugger in end-user apps
b89142a61d05 #aspectAt: must also ask class.
Claus Gittinger <cg@exept.de>
parents: 716
diff changeset
   507
716
a23d48401446 actionFor:aKey withValue:aValue
ca
parents: 707
diff changeset
   508
    ^ [:dummy | ]
a23d48401446 actionFor:aKey withValue:aValue
ca
parents: 707
diff changeset
   509
717
b89142a61d05 #aspectAt: must also ask class.
Claus Gittinger <cg@exept.de>
parents: 716
diff changeset
   510
    "Created: / 17.1.1997 / 21:08:22 / cg"
b89142a61d05 #aspectAt: must also ask class.
Claus Gittinger <cg@exept.de>
parents: 716
diff changeset
   511
    "Modified: / 28.10.1997 / 12:53:22 / cg"
716
a23d48401446 actionFor:aKey withValue:aValue
ca
parents: 707
diff changeset
   512
!
a23d48401446 actionFor:aKey withValue:aValue
ca
parents: 707
diff changeset
   513
374
5be095a54715 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 372
diff changeset
   514
aspectFor:aKey
450
2a6e2eb653f0 so far ...
ca
parents: 436
diff changeset
   515
    "return a model for aKey. This is invoked during window building
2a6e2eb653f0 so far ...
ca
parents: 436
diff changeset
   516
     (by the builder) to ask for an Editfields, a Toggles etc. model.
2a6e2eb653f0 so far ...
ca
parents: 436
diff changeset
   517
     Here, first the local bindings are searched, then the application and
2a6e2eb653f0 so far ...
ca
parents: 436
diff changeset
   518
     finally the applications class is asked for a corresponding action.
2a6e2eb653f0 so far ...
ca
parents: 436
diff changeset
   519
     The returned object is typically a valueHolder."
2a6e2eb653f0 so far ...
ca
parents: 436
diff changeset
   520
434
eeb7ba6aede3 *** empty log message ***
ca
parents: 433
diff changeset
   521
    |b|
eeb7ba6aede3 *** empty log message ***
ca
parents: 433
diff changeset
   522
eeb7ba6aede3 *** empty log message ***
ca
parents: 433
diff changeset
   523
    bindings notNil ifTrue:[
eeb7ba6aede3 *** empty log message ***
ca
parents: 433
diff changeset
   524
        b := bindings at:aKey ifAbsent:nil.
eeb7ba6aede3 *** empty log message ***
ca
parents: 433
diff changeset
   525
        b notNil ifTrue:[^ b].
eeb7ba6aede3 *** empty log message ***
ca
parents: 433
diff changeset
   526
    ].
eeb7ba6aede3 *** empty log message ***
ca
parents: 433
diff changeset
   527
374
5be095a54715 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 372
diff changeset
   528
    application notNil ifTrue:[
577
818d08c9aef1 add trace messages:
ca
parents: 502
diff changeset
   529
        Object messageNotUnderstoodSignal handle:[:ex |
818d08c9aef1 add trace messages:
ca
parents: 502
diff changeset
   530
        ] do:[
450
2a6e2eb653f0 so far ...
ca
parents: 436
diff changeset
   531
            ^ application aspectFor:aKey
2a6e2eb653f0 so far ...
ca
parents: 436
diff changeset
   532
        ]
374
5be095a54715 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 372
diff changeset
   533
    ].
422
ccffe7647895 changed binding access
ca
parents: 420
diff changeset
   534
    applicationClass notNil ifTrue:[
735
4b66677877e8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 727
diff changeset
   535
        Object messageNotUnderstoodSignal handle:[:ex |
4b66677877e8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 727
diff changeset
   536
        ] do:[
424
098447d8c614 checkin from browser
ca
parents: 423
diff changeset
   537
            ^ applicationClass aspectFor:aKey
098447d8c614 checkin from browser
ca
parents: 423
diff changeset
   538
        ]
422
ccffe7647895 changed binding access
ca
parents: 420
diff changeset
   539
    ].
717
b89142a61d05 #aspectAt: must also ask class.
Claus Gittinger <cg@exept.de>
parents: 716
diff changeset
   540
374
5be095a54715 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 372
diff changeset
   541
    ^ self aspectAt:aKey
5be095a54715 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 372
diff changeset
   542
717
b89142a61d05 #aspectAt: must also ask class.
Claus Gittinger <cg@exept.de>
parents: 716
diff changeset
   543
    "Created: / 17.1.1997 / 21:06:16 / cg"
735
4b66677877e8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 727
diff changeset
   544
    "Modified: / 1.11.1997 / 13:40:24 / cg"
374
5be095a54715 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 372
diff changeset
   545
!
5be095a54715 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 372
diff changeset
   546
423
64c2d739caf1 *** empty log message ***
ca
parents: 422
diff changeset
   547
componentFor:aKey
450
2a6e2eb653f0 so far ...
ca
parents: 436
diff changeset
   548
    "return a component for aKey. This is invoked during window building
2a6e2eb653f0 so far ...
ca
parents: 436
diff changeset
   549
     (by the builder) to ask for an ArbitraryComponents view.
2a6e2eb653f0 so far ...
ca
parents: 436
diff changeset
   550
     Here, first the local bindings are searched, then the application and
2a6e2eb653f0 so far ...
ca
parents: 436
diff changeset
   551
     finally the applications class is asked for a corresponding action.
2a6e2eb653f0 so far ...
ca
parents: 436
diff changeset
   552
     The returned object is typically a view."
2a6e2eb653f0 so far ...
ca
parents: 436
diff changeset
   553
677
8a02edbff4f5 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 676
diff changeset
   554
    |component|
423
64c2d739caf1 *** empty log message ***
ca
parents: 422
diff changeset
   555
64c2d739caf1 *** empty log message ***
ca
parents: 422
diff changeset
   556
    application notNil ifTrue:[
611
10d6eccf083c dont catch errors in componentFor (makes debugging easier)
Claus Gittinger <cg@exept.de>
parents: 608
diff changeset
   557
        component := application componentFor:aKey.
10d6eccf083c dont catch errors in componentFor (makes debugging easier)
Claus Gittinger <cg@exept.de>
parents: 608
diff changeset
   558
        component notNil ifTrue:[^ component].
423
64c2d739caf1 *** empty log message ***
ca
parents: 422
diff changeset
   559
    ].
64c2d739caf1 *** empty log message ***
ca
parents: 422
diff changeset
   560
    applicationClass notNil ifTrue:[
424
098447d8c614 checkin from browser
ca
parents: 423
diff changeset
   561
        (applicationClass respondsTo:#componentFor:) ifTrue:[
098447d8c614 checkin from browser
ca
parents: 423
diff changeset
   562
            ^ applicationClass componentFor:aKey
098447d8c614 checkin from browser
ca
parents: 423
diff changeset
   563
        ]
423
64c2d739caf1 *** empty log message ***
ca
parents: 422
diff changeset
   564
    ].
64c2d739caf1 *** empty log message ***
ca
parents: 422
diff changeset
   565
    ^ self aspectAt:aKey
64c2d739caf1 *** empty log message ***
ca
parents: 422
diff changeset
   566
611
10d6eccf083c dont catch errors in componentFor (makes debugging easier)
Claus Gittinger <cg@exept.de>
parents: 608
diff changeset
   567
    "Modified: 20.6.1997 / 11:40:22 / cg"
423
64c2d739caf1 *** empty log message ***
ca
parents: 422
diff changeset
   568
!
64c2d739caf1 *** empty log message ***
ca
parents: 422
diff changeset
   569
422
ccffe7647895 changed binding access
ca
parents: 420
diff changeset
   570
labelFor:aKey
450
2a6e2eb653f0 so far ...
ca
parents: 436
diff changeset
   571
    "return a label for aKey. This is invoked during window building
2a6e2eb653f0 so far ...
ca
parents: 436
diff changeset
   572
     (by the builder) to ask for a ???'s label.
2a6e2eb653f0 so far ...
ca
parents: 436
diff changeset
   573
     Here, first the local bindings are searched, then the application and
2a6e2eb653f0 so far ...
ca
parents: 436
diff changeset
   574
     finally the applications class is asked for a corresponding action.
2a6e2eb653f0 so far ...
ca
parents: 436
diff changeset
   575
     The returned object is typically a string."
2a6e2eb653f0 so far ...
ca
parents: 436
diff changeset
   576
422
ccffe7647895 changed binding access
ca
parents: 420
diff changeset
   577
    application notNil ifTrue:[
577
818d08c9aef1 add trace messages:
ca
parents: 502
diff changeset
   578
        Object messageNotUnderstoodSignal handle:[:ex |
818d08c9aef1 add trace messages:
ca
parents: 502
diff changeset
   579
        ] do:[
450
2a6e2eb653f0 so far ...
ca
parents: 436
diff changeset
   580
            ^ application labelFor:aKey
2a6e2eb653f0 so far ...
ca
parents: 436
diff changeset
   581
        ]
422
ccffe7647895 changed binding access
ca
parents: 420
diff changeset
   582
    ].
ccffe7647895 changed binding access
ca
parents: 420
diff changeset
   583
    applicationClass notNil ifTrue:[
424
098447d8c614 checkin from browser
ca
parents: 423
diff changeset
   584
        (applicationClass respondsTo:#labelFor:) ifTrue:[
098447d8c614 checkin from browser
ca
parents: 423
diff changeset
   585
            ^ applicationClass labelFor:aKey
098447d8c614 checkin from browser
ca
parents: 423
diff changeset
   586
        ]
422
ccffe7647895 changed binding access
ca
parents: 420
diff changeset
   587
    ].
717
b89142a61d05 #aspectAt: must also ask class.
Claus Gittinger <cg@exept.de>
parents: 716
diff changeset
   588
b89142a61d05 #aspectAt: must also ask class.
Claus Gittinger <cg@exept.de>
parents: 716
diff changeset
   589
"/    Transcript showCR:'WindowBuilder: no label for: ' , aKey storeString.
b89142a61d05 #aspectAt: must also ask class.
Claus Gittinger <cg@exept.de>
parents: 716
diff changeset
   590
"/    StopOnError == true ifTrue:[self halt].  "/ avoids debugger in end-user apps
b89142a61d05 #aspectAt: must also ask class.
Claus Gittinger <cg@exept.de>
parents: 716
diff changeset
   591
422
ccffe7647895 changed binding access
ca
parents: 420
diff changeset
   592
    ^ self aspectAt:aKey
ccffe7647895 changed binding access
ca
parents: 420
diff changeset
   593
717
b89142a61d05 #aspectAt: must also ask class.
Claus Gittinger <cg@exept.de>
parents: 716
diff changeset
   594
    "Modified: / 28.10.1997 / 12:54:10 / cg"
422
ccffe7647895 changed binding access
ca
parents: 420
diff changeset
   595
!
ccffe7647895 changed binding access
ca
parents: 420
diff changeset
   596
ccffe7647895 changed binding access
ca
parents: 420
diff changeset
   597
listFor:aKey
450
2a6e2eb653f0 so far ...
ca
parents: 436
diff changeset
   598
    "return a list for aKey. This is invoked during window building
2a6e2eb653f0 so far ...
ca
parents: 436
diff changeset
   599
     (by the builder) to ask for a ???'s label.
2a6e2eb653f0 so far ...
ca
parents: 436
diff changeset
   600
     Here, first the local bindings are searched, then the application and
2a6e2eb653f0 so far ...
ca
parents: 436
diff changeset
   601
     finally the applications class is asked for a corresponding action.
2a6e2eb653f0 so far ...
ca
parents: 436
diff changeset
   602
     The returned object is typically a list."
2a6e2eb653f0 so far ...
ca
parents: 436
diff changeset
   603
422
ccffe7647895 changed binding access
ca
parents: 420
diff changeset
   604
    application notNil ifTrue:[
577
818d08c9aef1 add trace messages:
ca
parents: 502
diff changeset
   605
        Object messageNotUnderstoodSignal handle:[:ex |
818d08c9aef1 add trace messages:
ca
parents: 502
diff changeset
   606
        ] do:[
450
2a6e2eb653f0 so far ...
ca
parents: 436
diff changeset
   607
            ^ application listFor:aKey
2a6e2eb653f0 so far ...
ca
parents: 436
diff changeset
   608
        ]
422
ccffe7647895 changed binding access
ca
parents: 420
diff changeset
   609
    ].
ccffe7647895 changed binding access
ca
parents: 420
diff changeset
   610
    applicationClass notNil ifTrue:[
424
098447d8c614 checkin from browser
ca
parents: 423
diff changeset
   611
        (applicationClass respondsTo:#listFor:) ifTrue:[
098447d8c614 checkin from browser
ca
parents: 423
diff changeset
   612
            ^ applicationClass listFor:aKey
098447d8c614 checkin from browser
ca
parents: 423
diff changeset
   613
        ]
422
ccffe7647895 changed binding access
ca
parents: 420
diff changeset
   614
    ].
717
b89142a61d05 #aspectAt: must also ask class.
Claus Gittinger <cg@exept.de>
parents: 716
diff changeset
   615
b89142a61d05 #aspectAt: must also ask class.
Claus Gittinger <cg@exept.de>
parents: 716
diff changeset
   616
"/    Transcript showCR:'WindowBuilder: no list for: ' , aKey storeString.
b89142a61d05 #aspectAt: must also ask class.
Claus Gittinger <cg@exept.de>
parents: 716
diff changeset
   617
"/    StopOnError == true ifTrue:[self halt].  "/ avoids debugger in end-user apps
b89142a61d05 #aspectAt: must also ask class.
Claus Gittinger <cg@exept.de>
parents: 716
diff changeset
   618
422
ccffe7647895 changed binding access
ca
parents: 420
diff changeset
   619
    ^ self aspectAt:aKey
ccffe7647895 changed binding access
ca
parents: 420
diff changeset
   620
717
b89142a61d05 #aspectAt: must also ask class.
Claus Gittinger <cg@exept.de>
parents: 716
diff changeset
   621
    "Created: / 17.1.1997 / 21:08:45 / cg"
b89142a61d05 #aspectAt: must also ask class.
Claus Gittinger <cg@exept.de>
parents: 716
diff changeset
   622
    "Modified: / 28.10.1997 / 12:54:32 / cg"
422
ccffe7647895 changed binding access
ca
parents: 420
diff changeset
   623
! !
ccffe7647895 changed binding access
ca
parents: 420
diff changeset
   624
ccffe7647895 changed binding access
ca
parents: 420
diff changeset
   625
!WindowBuilder methodsFor:'spec creation callbacks'!
ccffe7647895 changed binding access
ca
parents: 420
diff changeset
   626
735
4b66677877e8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 727
diff changeset
   627
createdComponent:aView forSpec:spec named:name
4b66677877e8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 727
diff changeset
   628
    "callback from the UISpec after a view has been
4b66677877e8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 727
diff changeset
   629
     created for a spec.
4b66677877e8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 727
diff changeset
   630
     If it has a name, add it to the namedComponents dictionary;
4b66677877e8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 727
diff changeset
   631
     if I have a creationHook (application callBack), evaluate it."
4b66677877e8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 727
diff changeset
   632
4b66677877e8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 727
diff changeset
   633
    name notNil ifTrue:[
4b66677877e8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 727
diff changeset
   634
        "/ self componentAt:name put:aView.
4b66677877e8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 727
diff changeset
   635
        namedComponents isNil ifTrue:[
4b66677877e8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 727
diff changeset
   636
            namedComponents := IdentityDictionary new.
4b66677877e8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 727
diff changeset
   637
        ].
4b66677877e8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 727
diff changeset
   638
        namedComponents at:name asSymbol put:aView
4b66677877e8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 727
diff changeset
   639
    ].
410
2d21748e0d9c checkin from browser
ca
parents: 408
diff changeset
   640
    componentCreationHook notNil ifTrue:[
2d21748e0d9c checkin from browser
ca
parents: 408
diff changeset
   641
        componentCreationHook value:aView value:spec value:self
2d21748e0d9c checkin from browser
ca
parents: 408
diff changeset
   642
    ]
100
claus
parents: 99
diff changeset
   643
735
4b66677877e8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 727
diff changeset
   644
    "Modified: / 5.9.1995 / 21:42:54 / claus"
4b66677877e8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 727
diff changeset
   645
    "Created: / 31.10.1997 / 18:47:01 / cg"
4b66677877e8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 727
diff changeset
   646
    "Modified: / 31.10.1997 / 18:51:22 / cg"
100
claus
parents: 99
diff changeset
   647
! !
claus
parents: 99
diff changeset
   648
372
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   649
!WindowBuilder methodsFor:'startup'!
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   650
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   651
closeRequest
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   652
    window destroy
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   653
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   654
    "Modified: 17.1.1997 / 19:30:32 / cg"
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   655
!
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   656
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   657
open
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   658
    "open my topView, as previously created"
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   659
477
4473bdcb24cb checkin from browser
Claus Gittinger <cg@exept.de>
parents: 475
diff changeset
   660
    |type|
4473bdcb24cb checkin from browser
Claus Gittinger <cg@exept.de>
parents: 475
diff changeset
   661
4473bdcb24cb checkin from browser
Claus Gittinger <cg@exept.de>
parents: 475
diff changeset
   662
    application isNil ifTrue:[
4473bdcb24cb checkin from browser
Claus Gittinger <cg@exept.de>
parents: 475
diff changeset
   663
        type := #normal
4473bdcb24cb checkin from browser
Claus Gittinger <cg@exept.de>
parents: 475
diff changeset
   664
    ] ifFalse:[
4473bdcb24cb checkin from browser
Claus Gittinger <cg@exept.de>
parents: 475
diff changeset
   665
        type := application defaultWindowType
4473bdcb24cb checkin from browser
Claus Gittinger <cg@exept.de>
parents: 475
diff changeset
   666
    ].
372
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   667
    self 
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   668
        openWithExtent:nil
477
4473bdcb24cb checkin from browser
Claus Gittinger <cg@exept.de>
parents: 475
diff changeset
   669
        andType:type
372
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   670
477
4473bdcb24cb checkin from browser
Claus Gittinger <cg@exept.de>
parents: 475
diff changeset
   671
    "Modified: 3.3.1997 / 19:43:57 / cg"
372
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   672
!
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   673
428
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 424
diff changeset
   674
openAt:aPoint
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 424
diff changeset
   675
    "open my topView at some location"
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 424
diff changeset
   676
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 424
diff changeset
   677
    self 
467
8fb5fa11956c better dialog opening
Claus Gittinger <cg@exept.de>
parents: 463
diff changeset
   678
        openAt:aPoint 
8fb5fa11956c better dialog opening
Claus Gittinger <cg@exept.de>
parents: 463
diff changeset
   679
        withExtent:nil  
428
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 424
diff changeset
   680
        andType:(application defaultWindowType)
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 424
diff changeset
   681
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 424
diff changeset
   682
    "Created: 14.2.1997 / 20:21:57 / cg"
467
8fb5fa11956c better dialog opening
Claus Gittinger <cg@exept.de>
parents: 463
diff changeset
   683
    "Modified: 28.2.1997 / 22:50:29 / cg"
428
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 424
diff changeset
   684
!
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 424
diff changeset
   685
436
b5e56e1f367f checkin from browser
ca
parents: 434
diff changeset
   686
openAt:origin withExtent:ext andType:type
428
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 424
diff changeset
   687
    "open my window, as previously created, optionally defining the
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 424
diff changeset
   688
     windows origin and/or extent. 
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 424
diff changeset
   689
     The type argument may be #dialog or #normal, and specifies if the view 
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 424
diff changeset
   690
     should be opened as a modal view, blocking interaction to the currently 
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 424
diff changeset
   691
     active view, or as a normal view."
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 424
diff changeset
   692
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 424
diff changeset
   693
    origin notNil ifTrue:[
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 424
diff changeset
   694
        window origin:origin
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 424
diff changeset
   695
    ].
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 424
diff changeset
   696
    ext notNil ifTrue:[
480
40218790e4ba *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 477
diff changeset
   697
        window extent:ext.
40218790e4ba *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 477
diff changeset
   698
    ] ifFalse:[
40218790e4ba *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 477
diff changeset
   699
        type == #dialog ifTrue:[
40218790e4ba *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 477
diff changeset
   700
            window fixSize
40218790e4ba *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 477
diff changeset
   701
        ]
40218790e4ba *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 477
diff changeset
   702
    ].
40218790e4ba *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 477
diff changeset
   703
40218790e4ba *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 477
diff changeset
   704
    (windowView notNil and:[windowView ~~ window]) ifTrue:[
40218790e4ba *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 477
diff changeset
   705
        windowView extent:(window extent).
428
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 424
diff changeset
   706
    ].
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 424
diff changeset
   707
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 424
diff changeset
   708
    type == #dialog ifTrue:[
467
8fb5fa11956c better dialog opening
Claus Gittinger <cg@exept.de>
parents: 463
diff changeset
   709
        window fixPosition:(window device pointerPosition - window positionOffset).
428
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 424
diff changeset
   710
        window openModal.
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 424
diff changeset
   711
        ^ self
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 424
diff changeset
   712
    ].
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 424
diff changeset
   713
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 424
diff changeset
   714
    type == #normal ifTrue:[
480
40218790e4ba *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 477
diff changeset
   715
        window isNil ifTrue:[
40218790e4ba *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 477
diff changeset
   716
            self setupWindowFor:(StandardSystemView new).
40218790e4ba *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 477
diff changeset
   717
        ].
40218790e4ba *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 477
diff changeset
   718
428
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 424
diff changeset
   719
        window open.
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 424
diff changeset
   720
        ^ self
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 424
diff changeset
   721
    ].
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 424
diff changeset
   722
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 424
diff changeset
   723
    type == #popUp ifTrue:[
467
8fb5fa11956c better dialog opening
Claus Gittinger <cg@exept.de>
parents: 463
diff changeset
   724
        window fixPosition:(window device pointerPosition).
8fb5fa11956c better dialog opening
Claus Gittinger <cg@exept.de>
parents: 463
diff changeset
   725
        window openAsPopUp.
428
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 424
diff changeset
   726
        ^ self
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 424
diff changeset
   727
    ].
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 424
diff changeset
   728
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 424
diff changeset
   729
    "
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 424
diff changeset
   730
     if ST-80 supports more types - these may be added later
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 424
diff changeset
   731
    "
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 424
diff changeset
   732
    self halt:'unimplemented'
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 424
diff changeset
   733
735
4b66677877e8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 727
diff changeset
   734
    "Created: / 14.2.1997 / 20:22:24 / cg"
4b66677877e8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 727
diff changeset
   735
    "Modified: / 30.10.1997 / 19:32:56 / cg"
428
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 424
diff changeset
   736
!
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 424
diff changeset
   737
372
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   738
openDialog
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   739
    "open my topView, as previously created as a modal view,
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   740
     blocking interaction to the currently active view."
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   741
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   742
    self 
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   743
        openWithExtent:nil 
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   744
        andType:#dialog
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   745
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   746
    "Modified: 17.1.1997 / 19:59:29 / cg"
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   747
!
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   748
428
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 424
diff changeset
   749
openDialogAt:aPoint withExtent:ext
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 424
diff changeset
   750
    "open my topView, as previously created as a modal view,
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 424
diff changeset
   751
     blocking interaction to the currently active view."
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 424
diff changeset
   752
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 424
diff changeset
   753
    self 
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 424
diff changeset
   754
        openAt:aPoint withExtent:ext 
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 424
diff changeset
   755
        andType:#dialog
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 424
diff changeset
   756
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 424
diff changeset
   757
    "Modified: 17.1.1997 / 19:59:36 / cg"
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 424
diff changeset
   758
    "Created: 14.2.1997 / 20:24:19 / cg"
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 424
diff changeset
   759
!
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 424
diff changeset
   760
372
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   761
openDialogWithExtent:ext
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   762
    "open my topView, as previously created as a modal view,
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   763
     blocking interaction to the currently active view."
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   764
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   765
    self 
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   766
        openWithExtent:ext 
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   767
        andType:#dialog
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   768
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   769
    "Modified: 17.1.1997 / 19:59:36 / cg"
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   770
!
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   771
664
3115cc4e4678 openModal
ca
parents: 613
diff changeset
   772
openModal
3115cc4e4678 openModal
ca
parents: 613
diff changeset
   773
    "open my topView, as previously created"
3115cc4e4678 openModal
ca
parents: 613
diff changeset
   774
3115cc4e4678 openModal
ca
parents: 613
diff changeset
   775
    self 
3115cc4e4678 openModal
ca
parents: 613
diff changeset
   776
        openWithExtent:nil
3115cc4e4678 openModal
ca
parents: 613
diff changeset
   777
        andType:#dialog
3115cc4e4678 openModal
ca
parents: 613
diff changeset
   778
3115cc4e4678 openModal
ca
parents: 613
diff changeset
   779
    "Modified: 3.3.1997 / 19:43:57 / cg"
3115cc4e4678 openModal
ca
parents: 613
diff changeset
   780
!
3115cc4e4678 openModal
ca
parents: 613
diff changeset
   781
428
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 424
diff changeset
   782
openPopUpAt:aPoint
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 424
diff changeset
   783
    "open my topView, as previously created as a popUp view,
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 424
diff changeset
   784
     blocking interaction to the currently active view."
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 424
diff changeset
   785
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 424
diff changeset
   786
    self 
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 424
diff changeset
   787
        openAt:aPoint withExtent:nil 
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 424
diff changeset
   788
        andType:#popUp
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 424
diff changeset
   789
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 424
diff changeset
   790
    "Modified: 17.1.1997 / 19:59:29 / cg"
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 424
diff changeset
   791
    "Created: 14.2.1997 / 20:24:38 / cg"
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 424
diff changeset
   792
!
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 424
diff changeset
   793
372
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   794
openPopUpIn:aRectangle
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   795
    "open my topView, as previously created as a popUp view,
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   796
     blocking interaction to the currently active view."
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   797
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   798
    self 
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   799
        openWithExtent:nil 
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   800
        andType:#popUp
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   801
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   802
    "Modified: 17.1.1997 / 19:59:29 / cg"
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   803
    "Created: 17.1.1997 / 20:01:24 / cg"
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   804
!
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   805
587
5687da09a935 openWindowAt: created
ca
parents: 586
diff changeset
   806
openWindowAt:aPoint
5687da09a935 openWindowAt: created
ca
parents: 586
diff changeset
   807
    "open my topView at some location"
5687da09a935 openWindowAt: created
ca
parents: 586
diff changeset
   808
5687da09a935 openWindowAt: created
ca
parents: 586
diff changeset
   809
    self openAt:aPoint
5687da09a935 openWindowAt: created
ca
parents: 586
diff changeset
   810
!
5687da09a935 openWindowAt: created
ca
parents: 586
diff changeset
   811
5687da09a935 openWindowAt: created
ca
parents: 586
diff changeset
   812
openWindowAt:origin withExtent:ext andType:type
5687da09a935 openWindowAt: created
ca
parents: 586
diff changeset
   813
    "open my window, as previously created, optionally defining the
5687da09a935 openWindowAt: created
ca
parents: 586
diff changeset
   814
     windows origin and/or extent. 
5687da09a935 openWindowAt: created
ca
parents: 586
diff changeset
   815
     The type argument may be #dialog or #normal, and specifies if the view 
5687da09a935 openWindowAt: created
ca
parents: 586
diff changeset
   816
     should be opened as a modal view, blocking interaction to the currently 
5687da09a935 openWindowAt: created
ca
parents: 586
diff changeset
   817
     active view, or as a normal view."
5687da09a935 openWindowAt: created
ca
parents: 586
diff changeset
   818
5687da09a935 openWindowAt: created
ca
parents: 586
diff changeset
   819
    ^ self openAt:origin withExtent:ext andType:type
5687da09a935 openWindowAt: created
ca
parents: 586
diff changeset
   820
!
5687da09a935 openWindowAt: created
ca
parents: 586
diff changeset
   821
372
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   822
openWithExtent:aPoint
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   823
    "open my topView, as previously created, but override
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   824
     the extent."
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   825
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   826
    self 
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   827
        openWithExtent:aPoint 
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   828
        andType:(application defaultWindowType)
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   829
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   830
    "Modified: 17.1.1997 / 19:58:48 / cg"
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   831
!
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   832
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   833
openWithExtent:ext andType:type
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   834
    "open my window, as previously created. The type argument
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   835
     may be #dialog or #normal, and specifies if the view should
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   836
     be opened as a modal view, blocking interaction to the currently 
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   837
     active view, or as a normal view."
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   838
428
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 424
diff changeset
   839
    ^ self openAt:nil withExtent:ext andType:type
372
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   840
428
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 424
diff changeset
   841
    "Modified: 14.2.1997 / 20:22:47 / cg"
372
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   842
! !
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   843
132
0a8fe342ed91 version method at the end
Claus Gittinger <cg@exept.de>
parents: 125
diff changeset
   844
!WindowBuilder class methodsFor:'documentation'!
0a8fe342ed91 version method at the end
Claus Gittinger <cg@exept.de>
parents: 125
diff changeset
   845
0a8fe342ed91 version method at the end
Claus Gittinger <cg@exept.de>
parents: 125
diff changeset
   846
version
735
4b66677877e8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 727
diff changeset
   847
    ^ '$Header: /cvs/stx/stx/libview2/Attic/WinBuilder.st,v 1.54 1997-11-02 18:49:30 cg Exp $'
132
0a8fe342ed91 version method at the end
Claus Gittinger <cg@exept.de>
parents: 125
diff changeset
   848
! !