Commit Graph
22 Commits
Author SHA1 Message Date
Aparajita Fishman 2da6c88fad Fixed: constant name was misleading.
Previously CPTimerMinTimeInterval was used as a constant for the *default* time interval used when a timer was initialized with an interval <= 0. It isn't the minimum, it is possible to create a timer with an interval less than that constant's value.

The name has been changed to CPTimerDefaultTimeInterval to make it clearer what it's purpose is. It has also been changed to a #define, that will result in smaller generated code.
2013-07-26 02:08:14 -04:00
Alexandre Wilhelm 56963d65f3 Fixed: CPTimer don't allow to put timeInterval below 0.1
Previously it wasn't possible to set the timeInterval below 0.1.
Now you can do it and the timeInterval will set to 0.1 if the timeInterval is less or equal to 0 as in cocoa.

Cocoa specs here:
https://developer.apple.com/library/mac/#documentation/Cocoa/Reference/Foundation/Classes/NSTimer_Class/Reference/NSTimer.html
2013-07-22 15:20:10 -07:00
Aparajita Fishman e0af5d0573 Fixed: changed magic number to constant, add missing space after comma. 2013-07-20 12:05:53 -04:00
Blair Duncan 3419f6fbb4 Fixed: CPTimer number of seconds interval set to 0.1 if less than or equal to 0.0
Cocoa specs here:
 https://developer.apple.com/library/mac/#documentation/Cocoa/Reference/Foundation/Classes/NSTimer_Class/Reference/NSTimer.html
...
"Parameters
seconds
The number of seconds between firings of the timer. If seconds is less than or equal to 0.0, this method chooses the nonnegative value of 0.1 milliseconds instead."
2013-07-18 09:33:12 -04:00
Aparajita Fishman 8d68e805f4 Fix CPWindow -canBecomeKeyWindow and -canBecomeMainWindow to match Cocoa behavior (and misleading documentation)
Minor code formatting cleanup as well
2013-01-06 16:21:10 +08:00
Alexander Ljungberg 77955f4e2b Allow setTimeout(f) to support some JS libraries such as PDF.js.
Without this change some 3rd party JS libraries such as PDF.js, which rely on the nonstandard setTimeout(f), will not operate correctly.

According to MDN the delay argument is required. However browsers seem to treat setTimeout without delay argument the same as a delay of 0. This fix makes it so that Cappuccino apps do the same.
2012-12-11 00:57:42 +00:00
Aparajita Fishman 1c2a304ee5 Assignment of function is a statement and should be semicolon terminated. Some miscellaneous linting as well. 2012-01-05 17:51:37 -10:00
Stephen Ierodiaconou fd812f25a5 Imports additions
Import fixes and clean up

Missing import

Missing imports

Missing import

Remove uncessary comments
2010-12-16 19:16:33 +02:00
Alexander Ljungberg e4f5d9b32f Fixed some comments referencing NS* classes. 2010-11-11 13:42:25 -03:00
Alexander Ljungberg 6b37bae2c2 Fixed: removed the previous CPTimer DOM check - it doesn't work in Foundation. 2010-10-15 16:03:00 -03:00
Alexander Ljungberg 612e8c3f0b Add DOM checks to CPTimer's window.setTimeout bridge code. 2010-10-14 20:20:20 -03:00
Scott KyleandRandall Luecke 1899250a53 Semicolons are nice... 2010-06-10 16:42:28 -05:00
Stephen IerodiaconouandRoss Boucher b98f0b1427 Apply style rules to Foundation 2010-05-26 08:53:05 -07:00
Sergio FelixandFrancisco Ryan Tolmasky I b52da00d46 Fixed a bug in CPTimer 2009-08-01 20:35:31 -07:00
Ross Boucher 7d4c2840eb All Foundation classes briefed
Conflicts:

	Foundation/CPSet.j
	Foundation/CPTimer.j
	Foundation/CPURLConnection.j
2009-05-30 13:46:42 -07:00
Ross Boucher 8fb0abd3d6 Added briefs to all Foundation and made some cleanups to docs
Conflicts:

	Foundation/CPArray.j
	Foundation/CPBundle.j
	Foundation/CPCountedSet.j
	Foundation/CPIndexSet.j
	Foundation/CPTimer.j
	Foundation/CPURLConnection.j
2009-05-30 13:45:26 -07:00
Ross Boucher 850125b8ab Add documentation groups 2009-05-18 15:43:36 -07:00
Francisco Ryan Tolmasky I 2dc5458e63 Fix for intervals not being clearable after one run.
[#147 state:resolved]

Reviewed by nciagra
2008-11-24 16:49:34 -08:00
Tom Robinson fbb3959e66 Merge branch 'master' of git@github.com:280north/cappuccino 2008-11-18 18:15:29 -08:00
Francisco Ryan Tolmasky I 663f28e541 Fix for objj in the console.
Reviewed by me.
2008-11-18 18:13:39 -08:00
Tom Robinson 9321084d84 CPTimer semicolon/comma typo 2008-11-18 18:11:09 -08:00
Nick TakayamaandFrancisco Ryan Tolmasky I 4c8d7b0f1c Timers.
[#116 state:resolved]

Reviewed by ross and me.
2008-11-18 02:09:35 -08:00