Its the same string both times, but maybe this will help:

_this code:_
var env_info = LzCanvas.versionInfoString();
Debug.write( env_info );
env_info = env_info.replace("\n", "; ");
env_info = env_info.replace("<![CDATA[&]]>", "; ");
var test = "test";
Debug.write('test: ', test.replace);

_Outputs this when working:_
URL: http://localhost:8080/main.lzx?lzt=swf&lzr=swf8&debug=true&lzbacktrace=true
Version: 4.0.11.0
Release: Mars Production
Build: 8460-openlaszlo-branches-pagan-deities
Date: 2008-03-28T07:37:32-0700
Target: swf8
Runtime: 9.124
test:  «Function#6| ../util/string-utils.js#15/59»

_And this when not:_
URL: http://localhost:8080/main.lzx?lzt=swf&lzr=swf8&debug=true&lzbacktrace=true
Version: 4.0.11.0
Release: Mars Production
Build: 8460-openlaszlo-branches-pagan-deities
Date: 2008-03-28T07:37:32-0700
Target: swf8
Runtime: 9.124
ERROR @LogService.lzx#55: call to undefined method 'replace'
ERROR @LogService.lzx#56: undefined object does not have a property 'replace'
WARNING @LogService.lzx#59: reference to undefined property 'replace'
test:  undefined

So is there added/missing functionality somewhere (this is a big project), or is String being manipulated? Can String be manipulated?

-LC


Henry Minsky wrote:
Is it possible you're not passing a string in those cases, but some
other object?
Is it reproducible? Maybe put a Debug.write(typeof(yourstringvar)) to
make sure.


On Wed, Jul 23, 2008 at 7:06 PM, lcondellone
<[EMAIL PROTECTED]> wrote:
Hi all,

When calling <some string>.replace("x", "y"), its sometimes works, and
sometimes I get "call to undefined method 'replace'".

There are also indicators that others have run into this problem: checks if
replace exists, comments that "String.replace is needed!"

Is this method disabled? Or how would one enable/disable it?

-LC






Reply via email to