startsWith is not a function. (haxe.unit.TestRunner)

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

startsWith is not a function. (haxe.unit.TestRunner)

luca deltodesco
Trying to do a little unit test (couple nights ago nightly build of haxe) and i get a flash player exception:

An ActionScript error has occurred:
TypeError: Error #1006: startsWith is not a function.
at haxe.unit::TestRunner/runCase()[/usr/share/haxe/std/haxe/unit/TestRunner.hx:112]
at haxe.unit::TestRunner/run()[/usr/share/haxe/std/haxe/unit/TestRunner.hx:95]
at Unit$/main()[./Unit.hx:8]
at boot_1391/init()[?:1]
at flash::Boot/start()
at boot_1391()[/usr/share/haxe/std/flash9/Boot.hx:41]

compiling with:

haxe -swf-lib ../bin/release/haxe_assert_nape.swf -cp . -main Unit -swf bin/unit.swf -swf-version 11 -swf-header 600:600:60:ffffff -debug

any ideas? I couldn't see any reason that this should be the case in std.

--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

RE: startsWith is not a function. (haxe.unit.TestRunner)

luca deltodesco
I've solved the problem for now by modifying std to use fname.substr(0,4)=="test" instead of StringTools.startsWith(fname,"test")


From: [hidden email]
To: [hidden email]
Date: Sat, 8 Oct 2011 16:09:52 +0000
Subject: [haXe] startsWith is not a function. (haxe.unit.TestRunner)

Trying to do a little unit test (couple nights ago nightly build of haxe) and i get a flash player exception:

An ActionScript error has occurred:
TypeError: Error #1006: startsWith is not a function.
at haxe.unit::TestRunner/runCase()[/usr/share/haxe/std/haxe/unit/TestRunner.hx:112]
at haxe.unit::TestRunner/run()[/usr/share/haxe/std/haxe/unit/TestRunner.hx:95]
at Unit$/main()[./Unit.hx:8]
at boot_1391/init()[?:1]
at flash::Boot/start()
at boot_1391()[/usr/share/haxe/std/flash9/Boot.hx:41]

compiling with:

haxe -swf-lib ../bin/release/haxe_assert_nape.swf -cp . -main Unit -swf bin/unit.swf -swf-version 11 -swf-header 600:600:60:ffffff -debug

any ideas? I couldn't see any reason that this should be the case in std.

-- haXe - an open source web programming language http://haxe.org

--
haXe - an open source web programming language
http://haxe.org