This post originated from an RSS feed registered with Agile Buzz
by James Robertson.
Original Post: Animating with ExtraActivity
Feed Title: Michael Lucas-Smith
Feed URL: http://www.michaellucassmith.com/site.atom
Feed Description: Smalltalk and my misinterpretations of life
Thanks Travis! ExtraActivity really hit the spot. I just added a blinking cursor to the editing mode of with:Style simply by popping in one call and adding one method to with:Style's main view widget.
ExtraActivity will call your method at a Hz rate, and given that the cursor is meant to blink every half second, I set my Hz rate to be 2 hits per second.
For my cursor drawing code, I made it take the millisecond clock, modulus it by 1000, then if it's < 500, it's background colour, if it's >= 500, it's the invert of the background colour. Too easy!