The Trunk: Collections-mt.670.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

The Trunk: Collections-mt.670.mcz

commits-2
Marcel Taeumel uploaded a new version of Collections to project The Trunk:
http://source.squeak.org/trunk/Collections-mt.670.mcz

==================== Summary ====================

Name: Collections-mt.670
Author: mt
Time: 12 November 2015, 10:06:12.325 am
UUID: 85d65b1c-ab3c-4da8-8061-65f7d0d0bd64
Ancestors: Collections-ul.669

Adds convenient color check method for texts. Just like #emphasisAt: does for font emphasis.

=============== Diff against Collections-ul.669 ===============

Item was added:
+ ----- Method: Text>>colorAt: (in category 'emphasis') -----
+ colorAt: characterIndex
+
+ ^ self colorAt: characterIndex ifNone: [Color black]!

Item was added:
+ ----- Method: Text>>colorAt:ifNone: (in category 'emphasis') -----
+ colorAt: characterIndex ifNone: block
+
+ ^ (runs at: characterIndex)
+ detect: [:attr | attr class == TextColor]
+ ifFound: [:attr | attr color]
+ ifNone: block!