History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: LPP-5170
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: -- --
Assignee: Max Carlson
Reporter: Max Carlson
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
OpenLaszlo

embed-compressed.js is incompatible with prototype.js/scriptaculous

Created: 29/Nov/07 02:59 PM   Updated: 29/Nov/07 05:37 PM
Component/s: Browser Integration
Affects Version/s: Cranberry
Fix Version/s: RingDing (4.1)

Time Tracking:
Not Specified

Severity: Minor
Fixed in Change#: 7,419
Runtime: N/A
Fix in hand: False


 Description  « Hide
Because prototype hacks Array, it's no longer safe to use

for (i in array) {...}.

Arrays must be iterated using the .length property instead.

 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
Max Carlson - 29/Nov/07 05:37 PM
Author: max
Date: 2007-11-29 17:11:21 -0800 (Thu, 29 Nov 2007)
New Revision: 7419

Modified:
   openlaszlo/trunk/lps/includes/source/embednew.js
Log:
Change 20071129-maxcarlson-T by maxcarlson@Roboto on 2007-11-29 14:59:25 PST
    in /Users/maxcarlson/openlaszlo/trunk
    for http://svn.openlaszlo.org/openlaszlo/trunk

Summary: Fix embed-compressed.js to use proper Array iteration

New Features:

Bugs Fixed: LPP-5170 - embed-compressed.js is incompatible with prototype.js/scriptaculous

Technical Reviewer: promanik
QA Reviewer: hminsky
Doc Reviewer: (pending)

Documentation:

Release Notes:

Details: Because prototype hacks Array, it's no longer safe to use

for (i in array) {...}.

Arrays must be iterated using the .length property instead.

    

Tests: Try adding a method to Array.prototype and see where it goes wrong. Alternately, try embedding an OL app on a page that uses prototype.js.



Modified: openlaszlo/trunk/lps/includes/source/embednew.js
===================================================================
--- openlaszlo/trunk/lps/includes/source/embednew.js 2007-11-29 23:01:48 UTC (rev 7418)
+++ openlaszlo/trunk/lps/includes/source/embednew.js 2007-11-30 01:11:21 UTC (rev 7419)
@@ -299,7 +299,7 @@
         if (s.indexOf('=') == -1) return;
         var p = s.split('&');
         var d = {};
- for (i in p) {
+ for (var i = 0; i < p.length; i++) {
             var nv = p[i].split('=');
             if (nv.length == 1) continue;
             var n = nv[0];


_______________________________________________
Laszlo-checkins mailing list
Laszlo-checkins@openlaszlo.org
http://www.openlaszlo.org/mailman/listinfo/laszlo-checkins