helmaLib - Object.clone() - bug?

"Klemens Mantzos" <[email protected]>
Newsgroups gmane.comp.java.helma.general
Message-ID <[email protected]>
Hi,

this bug is in helma 1.6 only (im using java 1.6.0_01-ea)...

the helmaLib Html.input() tries to clone the param attribute. it uses
the Object.clone() method (in a wrong way, i think):

helma.Html.js #229
       var attr = Object.clone(param);

so it doesn't clone param.

a short example:
var foo = {jo: "jo"};
var bar = Object.clone(foo);
res.debug(uneval(foo) + " - " + uneval(bar));

result:
({jo:"jo", prototype:{}}) - ({jo:"jo", prototype:{}})

when i use foo.clone() everything works fine.

so the solution is maybe:
helma.Html.js #229
       var attr = param.clone();

thx
-- 
klemens mantzos
web developer | vienna - http://knallgrau.at - http://twoday.net -
http://blogr.com
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.