TestButtonDown

TestButtonDown - Integer counter which increments every half of a second
Download

TestButtonDown Ranking & Summary

Advertisement

  • Rating:
  • License:
  • GPL
  • Price:
  • FREE
  • Publisher Name:
  • Cameron Hayne
  • Publisher web site:
  • http://hayne.net/MacDev/Perl/zero_separated
  • Operating Systems:
  • Mac OS X
  • File Size:
  • 5 KB

TestButtonDown Tags


TestButtonDown Description

TestButtonDown - Integer counter which increments every half of a second TestButtonDown displays an integer counter which increments (via an NSTimer) every 1/5 of a second. There is a Button labeled "Push Me and Hold". If you press and release this button, the counter will be reset to zero. But the whole point of this program is to show that it is possible to have an NSTimer be effective even while the button is held down. To see this, do as the button says - press it and hold the mouse button down. You will see that the counter that keeps on incrementing whether the button is held down or not.This project illustrates a few aspects of programming for Mac OS X using the Cocoa API:· regular display updates via NSTimer· using NSEventTrackingRunLoopMode to get timer events while mouse is downRequirements:· Xcode (to build the app from source)


TestButtonDown Related Software