[MacRuby-devel] Yellow Fade Technique on NSTableView
Morgan Schweers
cyberfox at gmail.com
Sun Feb 27 01:42:14 PST 2011
Greetings,
My application updates items periodically (and sometimes by user request) so
I wanted to show the user that something had changed should they be looking,
or have manually requested an update. One example is that double-clicking
can cause an item to update... Once I got the code working, I thought it
might be something other folks would like to use. A little extraction, and
here it is:
http://gist.github.com/846047
(It also shows how to set up double-click detection, which is easy, but I
hadn't figured out before, and took a little searching. :/ )
The code is based off an old blog post (
http://www.bdunagan.com/2009/04/26/core-animation-on-the-mac/ ) but
_heavily_ translated into Ruby-ish stylings. It might also be used as a
cool example of using Core Animation in your UI; I'm sure happy with how it
came out! I have to imagine that the right way to use it for real will be
to make it a module, and 'include' it into delegates as needed.
Hope folks enjoy!
-- Morgan Schweers
p.s. Please don't hesitate to let me know if you have problems with it, or
if I'm making some tyro mistakes!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-devel/attachments/20110227/9bdc2f54/attachment.html>
More information about the MacRuby-devel
mailing list