prototype 1.6

Hi

We are using prototype 1.6 in our current project and when one of the following method is called using smart client components

this.loginWindow = isc.LoginWindow.create({title:"Session expired - please log in", 
								autoDraw:false, autoCenter:true, autoSize:true, showCloseButton:false,
								 showMinimizeButton:false, isModal:true, loginForm:this.loginForm, 
								 items:[this.loginForm]});

[BTW This is from the regloginFlow example]

I am getting ‘iterator.bind is not a function’ as JS error.

Please help if any body knows if any one has a clue.

Thanks
Raj

If you are not already running in portal mode you should be.

Note that SmartClient doesn’t contain any calls or references to something like iterator.bind() so that crash is occurring outside SmartClient. See the Debugging topic for advice on how you could gather more information.

I have applied your recommendation to be in portal mode and I still get the same error. I don’t see any thing on server console but I see the same error Firefox console. I know this is not a Smart Client issue but I am sure that its happening at that line when login window is created.

We have the application that is already using prototype 1.6. Migrating to some other JS framework does not make sense at this point but there is a push from the mgmt to make it more richer.

Raj

Lots of SmartClient applications run alongside Prototype. As previously recommended, see the Debugging topic for advice on gathering information that would enable others to help you.

Stack trace

Application Thread (debug requested)
collect file=http://localhost:8080/wmrsgui/tiles/default/e911/javascripts/prototype.js line=630 pc=16
v6 file=http://localhost:8080/wmrsgui/isomorphic/system/modules/ISC_Core.js?isc_version=6.0.js line=1470 pc=18
setZIndex file=http://localhost:8080/wmrsgui/isomorphic/system/modules/ISC_Core.js?isc_version=6.0.js line=1470 pc=371
getZIndex file=http://localhost:8080/wmrsgui/isomorphic/system/modules/ISC_Core.js?isc_version=6.0.js line=1462 pc=65
wn file=http://localhost:8080/wmrsgui/isomorphic/system/modules/ISC_Core.js?isc_version=6.0.js line=1505 pc=222
qg file=http://localhost:8080/wmrsgui/isomorphic/system/modules/ISC_Core.js?isc_version=6.0.js line=1502 pc=45
draw file=http://localhost:8080/wmrsgui/isomorphic/system/modules/ISC_Core.js?isc_version=6.0.js line=950 pc=715
anonymous(_1,_2,_3,_4,_5,_6,_7,_8,_9,_10,_11,_12,_13) file=http://localhost:8080/wmrsgui/isomorphic/system/modules/ISC_Core.js?isc_version=6.0.js line=186 pc=270
anonymous(_1,_2,_3,_4,_5,_6,_7,_8,_9,_10,_11,_12,_13) file=http://localhost:8080/wmrsgui/isomorphic/system/modules/ISC_Core.js?isc_version=6.0.js line=129 pc=58
loginRequired file=http://localhost:8080/wmrsgui/login/LoginForm.js line=140 pc=279

Hi Raj,

I think that’s a trace from Firebug and it looks like Firebug got confused - that trace doesn’t make sense. Are you able to reproduce this in IE and get a stack trace from the SmartClient Developer Console?

no this is from myeclipse javascript debugger.

Hi Raj,

Same steps apply. Your debugger appears to have a problem similar to Firebug and has produced an invalid trace (those functions do not call each other). The next step to figure out why Prototype is crashing is to get a trace in IE from the SmartClient Developer Console, as previously indicated.

Hi

Finally got some time to get this. I have the source code below

10:45:03.723:INFO:Log:initialized
10:45:05.208:WARN:Log:Error:
‘Object doesn’t support this property or method’
in http://localhost:8080/wmrsgui/
at line 631
anonymous(iterator=>“parentZIndexChanged”, context=>undef)
Canvas.zIndexChanged(_1=>“auto”, _2=>200036)
Canvas.setZIndex(_1=>200036)
Canvas.getZIndex(_1=>true)
Canvas.$wn()
Canvas.$pq()
Canvas.init(_1=>Obj{title:A Window}, _2=>undef, _3=>undef, _4=>undef, _5=>undef, _6=>undef, _7=>undef, _8=>undef, _9=>undef, _10=>undef, _11=>undef, _12=>undef, _13=>undef)
Class.completeCreation(_1=>Obj{title:A Window}, _2=>undef, _3=>undef, _4=>undef, _5=>undef, _6=>undef, _7=>undef, _8=>undef, _9=>undef, _10=>undef, _11=>undef, _12=>undef, _13=>undef)
Class.create(_1=>Obj{title:A Window}, _2=>undef, _3=>undef, _4=>undef, _5=>undef, _6=>undef, _7=>undef, _8=>undef, _9=>undef, _10=>undef, _11=>undef, _12=>undef, _13=>undef)
“var _14=this.createRaw();_14=_14.completeCreation(_1,_2,_3,_4,_5,_6,_7,_8,_9,_10,_11,_12,_13);return _14”

10:45:05.239:INFO:Log:isc.Page is loaded

<html>
<head>
<script>
window.isc_useSimpleNames = false;
</script>
<isomorphic:loadISC skin=“SmartClient” isomorphicURI=“<%=iso%>”/>

&lt;/head&gt;
&lt;script type="text/javascript"
	src="/wmrsgui/tiles/default/e911/javascripts/prototype_1.6.js"&gt;&lt;/script&gt;
&lt;body&gt;
&lt;script&gt;
&lt;isomorphic:XML&gt;
	&lt;Window title="A Window" width="200" height="200"&gt;
		&lt;items&gt;
   		 &lt;Label align="center" contents="Contents of the window"/&gt;
		 &lt;/items&gt;
	&lt;/Window&gt;
&lt;/isomorphic:XML&gt;
&lt;/script&gt;
&lt;/body&gt;

</html>

Hello srkamineni,

Thanks for taking the time to isolate this. It looks like the problem is that Prototype clobbers Array.map() with something that works differently.

Can you try loading SmartClient after Prototype? Unless your own code relies on Prototype’s implementation of Array.map(), this is likely to fix the problem.