Toan,

I just remember that the "for ... in" loop is not always equivalent to its "for" counterpart...
According to Wikipédia :

for (var property-name in object-name) {
 statements using object-name[property-name];
}

In a "for ... in" statement, the iterator is the property name, not a numerical index. If the code in the loop use this property name, then there is no obvious conversion between "for" and "for ... in" statement.

Please keep the list updated if you manage to solve your problem.

Maybe someone else can provide feedback? I guess many other people faced issues using prototype.js.

Regards
Gilles


Gilles Bassière wrote:
Hi Toan,

The patch I sent you was for FeatureSelectHandler and it solved my problem. But there are plenty of other scripts that use the "for (var in array)" structure. You might still be in trouble with this prototype "bug". I looked for other use of the for statement that might cause problem and found this :

./widget/WebServiceForm.js:159: for (var elementName in objRef.formElements) {
./widget/EditLine.js:49: for (var i in points) {
./widget/MapPaneOL.js:113: for (var i in layers) {
./widget/MapPaneOL.js:185: for (var r in resolutions) {
./widget/MapPaneOL.js:194: for (var s in scales) {
./widget/MapPaneOL.js:259: for (var r in resolutions) {
./widget/MapPaneOL.js:599: for (var i in objRef.oLlayers) {
./widget/GmlRendererOL.js:213: for (var i in objRef.model.mergeModels) {
./widget/GmlRendererOL.js:353: for (var i in hiddenFeatures) {
./widget/EditPolygon.js:51: for (var i in points) {
./widget/OverviewMap.js:89: for (var i in map.mbMapPane.oLlayers) {
./widget/OverviewMap.js:138: for (var i in options.layers) {
./tool/FeatureSelectHandler.js:92: for (var i in objRef.sourceModels) {
./tool/FeatureSelectHandler.js:167: for (var i in objRef.sourceModels) {
./tool/FeatureSelectHandler.js:192: for (var i in objRef.sourceModels) {
./tool/FeatureSelectHandler.js:251: for (var i in objRef.sourceModels) {
./tool/FeatureSelectHandler.js:279: for (var i in objRef.sourceModels) {
./tool/MergeModels.js:76: for (var i in objRef.model.mergeModels) {
./util/Util.js:652: for (var i in varArgs) {

This is an excerpt from the output of the command : find . -name "*.js" -exec grep -Hni "for (" '{}' \;

With Firebug, I think you can check which of those are in use in your webapp.

Regards
Gilles


Toan Nguyen wrote:
Thank you very much, I have fixed it.
But more important, my map is still blank. I try remove the css of Ext JS, but nothing happens. I use Firebug to view mapPanel, but div layer is empty. You can see my attach file.



--
Nguyễn Đình Toán

-------------------------
Neu khong doc duoc tieng Viet, vui long vao menu View --> chon Encoding --> chon Unicode (UTF-8). Cam on.
------------------------------------------------------------------------



--
Gilles Bassiere
MAKINA CORPUS
30 rue des Jeuneurs
FR-75002 PARIS
+33 (0) 1 44 82 00 80
http://www.makina-corpus.com

begin:vcard
fn;quoted-printable:Gilles Bassi=C3=A8re
n;quoted-printable:Bassi=C3=A8re;Gilles
org:Makina Corpus;GIS
adr;quoted-printable:;;30 rue des Je=C3=BBneurs;Paris;;FR-75011;France
email;internet:[EMAIL PROTECTED]
title:Web GIS developper
tel;work:+33 (0) 1 44 82 00 80
x-mozilla-html:FALSE
url:http://www.makina-corpus.com
version:2.1
end:vcard

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Mapbuilder-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mapbuilder-users

Reply via email to