Tuesday, December 6, 2005

Throttling NSSlider

Daniel Jalkut:

Instead of limiting the frequency of the “send” action, just nip it in the bud. Whenever the cell for your control ultimately decides it’s ready to send an action, it goes through the sendAction:to: method. By subclassing the control and placing a date throttle on the method, you can achieve whatever throttling you feel is appropriate. Here are the guts of my “Slow NSSlider” subclass…

Comments RSS · Twitter

Leave a Comment