class: DeviceWorkstation
changed: #resourceOfId:
use Font>>#graphicsDevice instead of #device
--- a/DeviceWorkstation.st Wed Oct 09 12:21:33 2013 +0200
+++ b/DeviceWorkstation.st Fri Oct 25 17:14:15 2013 +0200
@@ -4256,38 +4256,38 @@
Since id may be an ExternalAddress, do not compare with =="
id isNil ifTrue:[
- "nil id is no resource"
- ^ nil
+ "nil id is no resource"
+ ^ nil
].
self allViewsDo:[:aView |
- aView id = id ifTrue:[^ aView].
- aView gcId = id ifTrue:[^ aView]
+ aView id = id ifTrue:[^ aView].
+ aView gcId = id ifTrue:[^ aView]
].
Form allSubInstancesDo:[:f |
- (f id = id and:[f device == self]) ifTrue:[^ f]
+ (f id = id and:[f device == self]) ifTrue:[^ f]
].
Font allInstancesDo:[:f |
- (f fontId = id and:[f device == self]) ifTrue:[^ f]
+ (f fontId = id and:[f graphicsDevice == self]) ifTrue:[^ f]
].
Color allInstancesDo:[:c |
- (c colorId = id and:[c device == self]) ifTrue:[^ c].
+ (c colorId = id and:[c device == self]) ifTrue:[^ c].
].
"KLUDGE: XWorkstation stores all IDs in ExternalAddresses,
- only colorId is stored as SmallInteger,
- But resourceOfLastError returns an ExternalAddress even for colors."
+ only colorId is stored as SmallInteger,
+ But resourceOfLastError returns an ExternalAddress even for colors."
(id respondsTo:#address) ifTrue:[
- |colorId|
-
- colorId := id address.
- Color allInstancesDo:[:c |
- (c colorId = colorId and:[c device == self]) ifTrue:[^ c].
- ].
+ |colorId|
+
+ colorId := id address.
+ Color allInstancesDo:[:c |
+ (c colorId = colorId and:[c device == self]) ifTrue:[^ c].
+ ].
].
^ nil
@@ -8249,11 +8249,11 @@
!DeviceWorkstation class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libview/DeviceWorkstation.st,v 1.592 2013-09-01 10:51:01 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libview/DeviceWorkstation.st,v 1.593 2013-10-25 15:14:15 stefan Exp $'
!
version_CVS
- ^ '$Header: /cvs/stx/stx/libview/DeviceWorkstation.st,v 1.592 2013-09-01 10:51:01 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libview/DeviceWorkstation.st,v 1.593 2013-10-25 15:14:15 stefan Exp $'
! !