Browse Source

prot fixes.

Nicolas Cannasse 19 years ago
parent
commit
00931551ff
3 changed files with 9 additions and 9 deletions
  1. 5 5
      std/Math.hx
  2. 2 2
      std/StringTools.hx
  3. 2 2
      std/haxe/Timer.hx

+ 5 - 5
std/Math.hx

@@ -56,13 +56,13 @@ extern class Math
 	#if neko
 		Math = neko.NekoMath__;
 	#else true
-		NaN = Number.NaN;
-		NEGATIVE_INFINITY = Number.NEGATIVE_INFINITY;
-		POSITIVE_INFINITY = Number.POSITIVE_INFINITY;
+		NaN = Number["NaN"];
+		NEGATIVE_INFINITY = Number["NEGATIVE_INFINITY"];
+		POSITIVE_INFINITY = Number["POSITIVE_INFINITY"];
 		isFinite = function(i) {
 			return
 			#if flash
-			_global.isFinite(i);
+			_global["isFinite"](i);
 			#else js
 			__js__("isFinite")(i);
 			#else error
@@ -71,7 +71,7 @@ extern class Math
 		isNaN = function(i) {
 			return
 			#if flash
-			_global.isNaN(i);
+			_global["isNaN"](i);
 			#else js
 			__js__("isNaN")(i);
 			#else error

+ 2 - 2
std/StringTools.hx

@@ -37,7 +37,7 @@ class StringTools {
 	**/
 	public static function urlEncode( s : String ) : String {
 		#if flash
-		return untyped _global.escape(s);
+		return untyped _global["escape"](s);
 		#else neko
 		return new String(_urlEncode(untyped s.__s));
 		#else js
@@ -51,7 +51,7 @@ class StringTools {
 	**/
 	public static function urlDecode( s : String ) : String {
 		#if flash
-		return untyped _global.unescape(s);
+		return untyped _global["unescape"](s);
 		#else neko
 		return new String(_urlDecode(untyped s.__s));
 		#else js

+ 2 - 2
std/haxe/Timer.hx

@@ -35,7 +35,7 @@ class Timer {
 	public function new( time : Int ){
 		#if flash
 			var me = this;
-			id = untyped _global.setInterval(function() { me.run(); },time);
+			id = untyped _global["setInterval"](function() { me.run(); },time);
 		#else js
 			var id = arr.length;
 			arr[id] = this;
@@ -47,7 +47,7 @@ class Timer {
 
 	public function stop(){
 		#if flash
-			untyped _global.clearInterval(id);
+			untyped _global["clearInterval"](id);
 			id = null;
 		#else js
 			untyped window.clearInterval(timerId);