Using the left arrow for assignment

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

Using the left arrow for assignment

John Chludzinski
For those of you who may wish to use the left arrow:

| f2 |
f2 := Form extent: 10@11 depth: 1.
f2 fillColor: Color white.
f2 getCanvas line: 1@5 to: 8@5 width: 1 color: Color black.
1 to: 2 do: [ : i |
       f2 getCanvas fillRectangle: ( (1@5) + (i@i) extent: 1@1) color: Color black.
       f2 getCanvas fillRectangle: ( (1@5) + (i@i negated) extent: 1@1) color: Color black.
].
StrikeFont allInstances do: [ :each |
       (each name beginsWith: 'Accuny') ifTrue: [
               each characterFormAt: $_ put: f2
       ]
]. "Courtesy of Bob Arning"

Of course you lose your underscore character in the process! ---jski
Reply | Threaded
Open this post in threaded view
|

Re: [squeak-dev] Using the left arrow for assignment

Randal L. Schwartz
>>>>> "jski" == jski  <[hidden email]> writes:

jski>                each characterFormAt: $_ put: f2

Heh.  I saw $_ and said "wait, is this Perl?"

When worlds collide....

:)

--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<[hidden email]> <URL:http://www.stonehenge.com/merlyn/>
Smalltalk/Perl/Unix consulting, Technical writing, Comedy, etc. etc.
See http://methodsandmessages.vox.com/ for Smalltalk and Seaside discussion