xmlgraphics-batik-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andreas Neumann <neum...@karto.baug.ethz.ch>
Subject Strange behaviour of Rhino with associative array object
Date Sat, 18 Oct 2003 05:29:43 GMT
It's again me - 
sorry if I am bombarding you with too many questions ...


I use an associative array object.

ethnicMix["Whites"] =
ethnicMix["Blacks"] =
ethnicMix["Asians"] =
ethnicMix["Others"] = totalPop2000 - (ethnicMix["Whites"] + ethnicMix["Blacks"]
+ ethnicMix["Asians"]);

Later on I use a "for ... in" loop to extract the values of the associative
array. It appears that the Rhino js engine automatically sorts alphabetically
according to the index value, which means, that "Asians" come first, then "
Blacks", ....

In the other SVG viewers the array wouldn't be sorted, but left in the order I
used originally, which I suppose is the right behaviour.

Or am I wrong - is this probably a but in the Rhino js engine, or did I do
something wrong?


to illustrate my problem see http://www.carto.net/geog234/lab3/lab3_end.svg and
compare the behaviour in Adobe or Corel SVG viewer against Batik. The stacked
barchart is messed up in Batik, because of the re-ordering.

Thanks for any infos on this topic,


The only thing that stands between a man and what he wants from
life is often merely the will to try it and the faith to believe
that it is possible ...
-- M. DeVos
Andreas Neumann - Department of Cartography     
Swiss Federal Institute of Technology (ETH)     
ETH Hoenggerberg, CH-8093  Zurich, Switzerland     
Phone: ++41-1-633 3031, Fax: ++41-1-633 1153     
e-mail: neumann@karto.baug.ethz.ch     
www: http://www.karto.ethz.ch/neumann/     
SVG.Open/Carto.net: http://www.svgopen.org/     

To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
For additional commands, e-mail: batik-users-help@xml.apache.org

View raw message