ProtocolAdaptor.st
author Claus Gittinger <cg@exept.de>
Thu, 23 Nov 1995 18:49:05 +0100
changeset 129 f890eaabc487
parent 125 fa5b5e4336bf
child 186 68bd07dcdfa7
permissions -rw-r--r--
checkin from browser
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
75
claus
parents: 71
diff changeset
     1
"
claus
parents: 71
diff changeset
     2
 COPYRIGHT (c) 1995 by Claus Gittinger
claus
parents: 71
diff changeset
     3
	      All Rights Reserved
claus
parents: 71
diff changeset
     4
claus
parents: 71
diff changeset
     5
 This software is furnished under a license and may be used
claus
parents: 71
diff changeset
     6
 only in accordance with the terms of that license and with the
claus
parents: 71
diff changeset
     7
 inclusion of the above copyright notice.   This software may not
claus
parents: 71
diff changeset
     8
 be provided or otherwise made available to, or used by, any
claus
parents: 71
diff changeset
     9
 other person.  No title to or ownership of the software is
claus
parents: 71
diff changeset
    10
 hereby transferred.
claus
parents: 71
diff changeset
    11
"
claus
parents: 71
diff changeset
    12
69
claus
parents:
diff changeset
    13
ValueModel subclass:#ProtocolAdaptor
claus
parents:
diff changeset
    14
	 instanceVariableNames:'accessPath subject subjectChannel subjectSendsUpdates'
claus
parents:
diff changeset
    15
	 classVariableNames:''
claus
parents:
diff changeset
    16
	 poolDictionaries:''
71
claus
parents: 69
diff changeset
    17
	 category:'Interface-Support-Models'
69
claus
parents:
diff changeset
    18
!
claus
parents:
diff changeset
    19
claus
parents:
diff changeset
    20
!ProtocolAdaptor class methodsFor:'documentation'!
claus
parents:
diff changeset
    21
claus
parents:
diff changeset
    22
copyright
claus
parents:
diff changeset
    23
"
claus
parents:
diff changeset
    24
 COPYRIGHT (c) 1995 by Claus Gittinger
71
claus
parents: 69
diff changeset
    25
	      All Rights Reserved
69
claus
parents:
diff changeset
    26
claus
parents:
diff changeset
    27
 This software is furnished under a license and may be used
claus
parents:
diff changeset
    28
 only in accordance with the terms of that license and with the
claus
parents:
diff changeset
    29
 inclusion of the above copyright notice.   This software may not
claus
parents:
diff changeset
    30
 be provided or otherwise made available to, or used by, any
claus
parents:
diff changeset
    31
 other person.  No title to or ownership of the software is
claus
parents:
diff changeset
    32
 hereby transferred.
claus
parents:
diff changeset
    33
"
claus
parents:
diff changeset
    34
!
claus
parents:
diff changeset
    35
claus
parents:
diff changeset
    36
documentation
claus
parents:
diff changeset
    37
"
claus
parents:
diff changeset
    38
    a ProtocolAdaptor allows access to embeded values in a
claus
parents:
diff changeset
    39
    complex model and plays model towards the outside world.
claus
parents:
diff changeset
    40
claus
parents:
diff changeset
    41
    Consider the case where editFields are required for the
claus
parents:
diff changeset
    42
    elements (instance variables) of a more complex model.
claus
parents:
diff changeset
    43
    Using ValueHolders, you had to copy the individual
claus
parents:
diff changeset
    44
    values out-of and into multiple valueHolders.
claus
parents:
diff changeset
    45
    A protocolAdaptor makes this easier, by playing model towards
claus
parents:
diff changeset
    46
    the editField, returning a value from the complex model, 
claus
parents:
diff changeset
    47
    and forwards changes to the complex model.
claus
parents:
diff changeset
    48
claus
parents:
diff changeset
    49
    Notice: since you can specify the aspect- and changeSymbols in most ST/X
claus
parents:
diff changeset
    50
    widgets, ProtocolAdapters are not always needed (at  least, if no access-
claus
parents:
diff changeset
    51
    path is required). 
claus
parents:
diff changeset
    52
    However, if you want to apply widgets on objects which where not originally 
claus
parents:
diff changeset
    53
    designed as models (such as Arrays), ProtocolAdapters are very useful.
claus
parents:
diff changeset
    54
claus
parents:
diff changeset
    55
    Notice: this class was implemented using protocol information
claus
parents:
diff changeset
    56
    from alpha testers - it may not be complete or compatible to
claus
parents:
diff changeset
    57
    the corresponding ST-80 class. If you encounter any incompatibilities,
claus
parents:
diff changeset
    58
    please forward a note to the ST/X team.
claus
parents:
diff changeset
    59
"
claus
parents:
diff changeset
    60
!
claus
parents:
diff changeset
    61
claus
parents:
diff changeset
    62
examples 
claus
parents:
diff changeset
    63
"
claus
parents:
diff changeset
    64
	|a obj|
claus
parents:
diff changeset
    65
claus
parents:
diff changeset
    66
	a := ProtocolAdaptor accessPath:#(1 2 3).
claus
parents:
diff changeset
    67
	obj := Array with:#(11 (121 122 123) 13)
claus
parents:
diff changeset
    68
		     with:#(21 (221 222 223) 23)
claus
parents:
diff changeset
    69
		     with:#(33 (321 322 323) 33).
claus
parents:
diff changeset
    70
	a valueUsingSubject:obj  
claus
parents:
diff changeset
    71
claus
parents:
diff changeset
    72
claus
parents:
diff changeset
    73
claus
parents:
diff changeset
    74
	|a obj|
claus
parents:
diff changeset
    75
claus
parents:
diff changeset
    76
	a := ProtocolAdaptor accessPath:#(1 2 origin).
claus
parents:
diff changeset
    77
	obj := Array with:(Array with:1@1 with:(1@2 corner:100@100))
claus
parents:
diff changeset
    78
		     with:(Array with:2@1 with:2@2)
claus
parents:
diff changeset
    79
		     with:(Array with:3@1 with:3@2).
claus
parents:
diff changeset
    80
	a valueUsingSubject:obj  
claus
parents:
diff changeset
    81
claus
parents:
diff changeset
    82
claus
parents:
diff changeset
    83
claus
parents:
diff changeset
    84
	|a model|
claus
parents:
diff changeset
    85
claus
parents:
diff changeset
    86
	a := ProtocolAdaptor accessPath:#(1 2 origin).
claus
parents:
diff changeset
    87
	model := (Array with:(Array with:1@1 with:(1@2 corner:100@100))
claus
parents:
diff changeset
    88
		     with:(Array with:2@1 with:2@2)
claus
parents:
diff changeset
    89
		     with:(Array with:3@1 with:3@2)) asValue.
claus
parents:
diff changeset
    90
	a subjectChannel:model.
claus
parents:
diff changeset
    91
	a value   
claus
parents:
diff changeset
    92
"
claus
parents:
diff changeset
    93
! !
claus
parents:
diff changeset
    94
claus
parents:
diff changeset
    95
!ProtocolAdaptor class methodsFor:'instance creation'!
claus
parents:
diff changeset
    96
claus
parents:
diff changeset
    97
accessPath:aCollectionOfSelectors
claus
parents:
diff changeset
    98
    ^ (self new) accessPath:aCollectionOfSelectors
claus
parents:
diff changeset
    99
!
claus
parents:
diff changeset
   100
claus
parents:
diff changeset
   101
subject:anObject
claus
parents:
diff changeset
   102
    ^ (self new) subject:anObject
claus
parents:
diff changeset
   103
!
claus
parents:
diff changeset
   104
125
fa5b5e4336bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   105
subject:anObject accessPath:aCollectionOfSelectors
fa5b5e4336bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   106
    ^ (self new) subject:anObject; accessPath:aCollectionOfSelectors
fa5b5e4336bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   107
!
fa5b5e4336bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   108
69
claus
parents:
diff changeset
   109
subject:anObject sendsUpdates:aBoolean
claus
parents:
diff changeset
   110
    ^ (self new) subject:anObject; sendsUpdates:aBoolean
claus
parents:
diff changeset
   111
!
claus
parents:
diff changeset
   112
claus
parents:
diff changeset
   113
subject:anObject sendsUpdates:aBoolean accessPath:aCollectionOfSelectors
claus
parents:
diff changeset
   114
    ^ (self new) subject:anObject; sendsUpdates:aBoolean; accessPath:aCollectionOfSelectors
claus
parents:
diff changeset
   115
!
claus
parents:
diff changeset
   116
claus
parents:
diff changeset
   117
subjectChannel:aValueHolder
claus
parents:
diff changeset
   118
    ^ (self new) subjectChannel:aValueHolder
claus
parents:
diff changeset
   119
!
claus
parents:
diff changeset
   120
125
fa5b5e4336bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   121
subjectChannel:aValueHolder accessPath:aCollectionOfSelectors
fa5b5e4336bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   122
    ^ (self new) subjectChannel:aValueHolder; accessPath:aCollectionOfSelectors
fa5b5e4336bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   123
!
fa5b5e4336bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   124
69
claus
parents:
diff changeset
   125
subjectChannel:aValueHolder sendsUpdates:aBoolean 
claus
parents:
diff changeset
   126
    ^ (self new) subjectChannel:aValueHolder; sendsUpdates:aBoolean
claus
parents:
diff changeset
   127
!
claus
parents:
diff changeset
   128
claus
parents:
diff changeset
   129
subjectChannel:aValueHolder sendsUpdates:aBoolean accessPath:aCollectionOfSelectors
claus
parents:
diff changeset
   130
    ^ (self new) subjectChannel:aValueHolder; sendsUpdates:aBoolean; accessPath:aCollectionOfSelectors
claus
parents:
diff changeset
   131
! !
claus
parents:
diff changeset
   132
claus
parents:
diff changeset
   133
!ProtocolAdaptor methodsFor:'accessing'!
claus
parents:
diff changeset
   134
125
fa5b5e4336bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   135
setValue:newValue
fa5b5e4336bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   136
    "set the value in my subject or subjectChannel."
fa5b5e4336bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   137
fa5b5e4336bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   138
    |obj|
fa5b5e4336bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   139
fa5b5e4336bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   140
    subject notNil ifTrue:[
fa5b5e4336bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   141
	obj := subject.
fa5b5e4336bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   142
    ] ifFalse:[
fa5b5e4336bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   143
	obj := subjectChannel value
fa5b5e4336bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   144
    ].
fa5b5e4336bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   145
    ^ self setValue:newValue usingSubject:obj
fa5b5e4336bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   146
!
fa5b5e4336bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   147
69
claus
parents:
diff changeset
   148
setValue:newValue usingSubject:anObject
claus
parents:
diff changeset
   149
    "set a value in anObject, using the selectors in accessPath.
claus
parents:
diff changeset
   150
     A helper for setValue:."
claus
parents:
diff changeset
   151
claus
parents:
diff changeset
   152
    |obj lastIndex|
claus
parents:
diff changeset
   153
claus
parents:
diff changeset
   154
    obj := anObject.
claus
parents:
diff changeset
   155
    lastIndex := accessPath size.
claus
parents:
diff changeset
   156
    accessPath keysAndValuesDo:[:idx :aSelectorOrIndex |
claus
parents:
diff changeset
   157
	aSelectorOrIndex isInteger ifTrue:[
claus
parents:
diff changeset
   158
	    idx == lastIndex ifTrue:[
claus
parents:
diff changeset
   159
		obj at:aSelectorOrIndex put:newValue
claus
parents:
diff changeset
   160
	    ] ifFalse:[
claus
parents:
diff changeset
   161
		obj := obj at:aSelectorOrIndex
claus
parents:
diff changeset
   162
	    ]
claus
parents:
diff changeset
   163
	] ifFalse:[
claus
parents:
diff changeset
   164
	    idx == lastIndex ifTrue:[
claus
parents:
diff changeset
   165
		obj perform:(aSelectorOrIndex , ':') asSymbol with:newValue
claus
parents:
diff changeset
   166
	    ] ifFalse:[
claus
parents:
diff changeset
   167
		obj := obj perform:aSelectorOrIndex
claus
parents:
diff changeset
   168
	    ]
claus
parents:
diff changeset
   169
	]
claus
parents:
diff changeset
   170
    ].
claus
parents:
diff changeset
   171
    ^ newValue
claus
parents:
diff changeset
   172
!
claus
parents:
diff changeset
   173
125
fa5b5e4336bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   174
value
fa5b5e4336bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   175
    "return the value from my subject or subjectChannel."
fa5b5e4336bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   176
fa5b5e4336bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   177
    |obj|
fa5b5e4336bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   178
fa5b5e4336bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   179
    subject notNil ifTrue:[
fa5b5e4336bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   180
	obj := subject.
fa5b5e4336bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   181
    ] ifFalse:[
fa5b5e4336bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   182
	obj := subjectChannel value
fa5b5e4336bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   183
    ].
fa5b5e4336bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   184
    ^ self valueUsingSubject:obj
fa5b5e4336bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   185
!
fa5b5e4336bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   186
69
claus
parents:
diff changeset
   187
valueUsingSubject:anObject
claus
parents:
diff changeset
   188
    "return the value from anObject, using the selectors in accessPath.
claus
parents:
diff changeset
   189
     A helper for value."
claus
parents:
diff changeset
   190
claus
parents:
diff changeset
   191
    |obj|
claus
parents:
diff changeset
   192
claus
parents:
diff changeset
   193
    obj := anObject.
claus
parents:
diff changeset
   194
    accessPath notNil ifTrue:[
claus
parents:
diff changeset
   195
	accessPath do:[:aSelectorOrIndex |
claus
parents:
diff changeset
   196
	    aSelectorOrIndex isInteger ifTrue:[
claus
parents:
diff changeset
   197
		obj := obj at:aSelectorOrIndex
claus
parents:
diff changeset
   198
	    ] ifFalse:[
claus
parents:
diff changeset
   199
		obj := obj perform:aSelectorOrIndex
claus
parents:
diff changeset
   200
	    ]
claus
parents:
diff changeset
   201
	].
claus
parents:
diff changeset
   202
    ].
claus
parents:
diff changeset
   203
    ^ obj
claus
parents:
diff changeset
   204
! !
claus
parents:
diff changeset
   205
claus
parents:
diff changeset
   206
!ProtocolAdaptor methodsFor:'accessing-spec'!
claus
parents:
diff changeset
   207
125
fa5b5e4336bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   208
accessPath
fa5b5e4336bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   209
    ^ accessPath
fa5b5e4336bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   210
!
69
claus
parents:
diff changeset
   211
125
fa5b5e4336bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   212
accessPath:aCollectionOfSelectors
fa5b5e4336bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   213
    accessPath := aCollectionOfSelectors
fa5b5e4336bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   214
!
fa5b5e4336bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   215
fa5b5e4336bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   216
subject
fa5b5e4336bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   217
    ^ subject
69
claus
parents:
diff changeset
   218
!
claus
parents:
diff changeset
   219
125
fa5b5e4336bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   220
subject:anObject
fa5b5e4336bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   221
    subject notNil ifTrue:[
fa5b5e4336bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   222
	subject removeDependent:self
fa5b5e4336bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   223
    ].
fa5b5e4336bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   224
    subject := anObject.
fa5b5e4336bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   225
    self changed:#value.
fa5b5e4336bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   226
    subject notNil ifTrue:[
fa5b5e4336bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   227
	subject addDependent:self
fa5b5e4336bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   228
    ].
fa5b5e4336bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   229
!
69
claus
parents:
diff changeset
   230
125
fa5b5e4336bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   231
subjectChannel
fa5b5e4336bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   232
    ^ subjectChannel
69
claus
parents:
diff changeset
   233
!
claus
parents:
diff changeset
   234
claus
parents:
diff changeset
   235
subjectChannel:aValueHolder
claus
parents:
diff changeset
   236
    |oldChannel|
claus
parents:
diff changeset
   237
100
claus
parents: 96
diff changeset
   238
    subjectChannel notNil ifTrue:[
claus
parents: 96
diff changeset
   239
	subjectChannel removeDependent:self
claus
parents: 96
diff changeset
   240
    ].
69
claus
parents:
diff changeset
   241
    oldChannel := subjectChannel.
claus
parents:
diff changeset
   242
    subjectChannel := aValueHolder.
100
claus
parents: 96
diff changeset
   243
    subjectChannel notNil ifTrue:[
claus
parents: 96
diff changeset
   244
	subjectChannel addDependent:self
claus
parents: 96
diff changeset
   245
    ].
69
claus
parents:
diff changeset
   246
    oldChannel notNil ifTrue:[
claus
parents:
diff changeset
   247
	self changed:#value.
claus
parents:
diff changeset
   248
    ].
100
claus
parents: 96
diff changeset
   249
claus
parents: 96
diff changeset
   250
    "Modified: 6.9.1995 / 01:19:27 / claus"
69
claus
parents:
diff changeset
   251
!
claus
parents:
diff changeset
   252
125
fa5b5e4336bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   253
subjectSendsUpdates
fa5b5e4336bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   254
    "return true, if the subject sends updates itself
fa5b5e4336bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   255
     If true, the receiver will not send updates on changes"
fa5b5e4336bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   256
fa5b5e4336bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   257
    ^ subjectSendsUpdates
69
claus
parents:
diff changeset
   258
!
claus
parents:
diff changeset
   259
125
fa5b5e4336bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   260
subjectSendsUpdates:aBoolean
fa5b5e4336bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   261
    "set/clear the flag which states if the subject sends updates itself.
fa5b5e4336bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   262
     If true, the receiver will not send updates on changes"
69
claus
parents:
diff changeset
   263
125
fa5b5e4336bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   264
    subjectSendsUpdates := aBoolean.
69
claus
parents:
diff changeset
   265
! !
claus
parents:
diff changeset
   266
125
fa5b5e4336bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   267
!ProtocolAdaptor methodsFor:'change & update'!
fa5b5e4336bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   268
fa5b5e4336bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   269
update:something with:aPArameter from:changedObject
fa5b5e4336bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   270
    "translate updates from my subject into value-changes towards
fa5b5e4336bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   271
     my dependents. Since I have no specific aspect, every change is forwarded"
fa5b5e4336bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   272
fa5b5e4336bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   273
    (changedObject == subject
fa5b5e4336bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   274
    or:[changedObject == subjectChannel]) ifTrue:[
fa5b5e4336bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   275
	self changed:#value.
fa5b5e4336bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   276
	^ self
fa5b5e4336bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   277
    ].
fa5b5e4336bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   278
! !
fa5b5e4336bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   279
fa5b5e4336bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   280
!ProtocolAdaptor methodsFor:'change notification'!
fa5b5e4336bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   281
fa5b5e4336bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   282
changed:aspect
fa5b5e4336bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   283
    subjectSendsUpdates ifFalse:[
fa5b5e4336bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   284
	super changed:aspect
fa5b5e4336bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   285
    ]
fa5b5e4336bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   286
! !
fa5b5e4336bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   287
fa5b5e4336bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   288
!ProtocolAdaptor methodsFor:'initialization'!
fa5b5e4336bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   289
fa5b5e4336bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   290
initialize
fa5b5e4336bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   291
    super initialize.
fa5b5e4336bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   292
    subjectSendsUpdates := false. 
fa5b5e4336bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   293
! !
fa5b5e4336bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   294
129
f890eaabc487 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 125
diff changeset
   295
!ProtocolAdaptor class methodsFor:'documentation'!
f890eaabc487 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 125
diff changeset
   296
f890eaabc487 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 125
diff changeset
   297
version
f890eaabc487 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 125
diff changeset
   298
    ^ '$Header: /cvs/stx/stx/libview2/ProtocolAdaptor.st,v 1.9 1995-11-23 17:48:19 cg Exp $'
f890eaabc487 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 125
diff changeset
   299
! !