[Laszlo-dev] Help fixing LPP-5926

André Bargull a.bargull at intensis.de
Mon May 5 15:07:36 PDT 2008


If you do an "alert(window.setTimeout.apply)", you'll see that it is 
"undefined" - Hurray for IE!
I guess you need to use a function-wrapper, something like here: 
"http://webreflection.blogspot.com/2007/06/simple-settimeout-setinterval-extra.html".

> This is definitely an IE6/7 issue. The following javascript code 
> fails in IE6/7 if I call apply() when the argument is a function. 
> Calling it with explicit arguments works.
>
>
> <body>
>    <script>
>      function setTimeout_broken() {
>        window.setTimeout.apply(null, arguments);
>      }
>      function setTimeout_works(f, msec) {
>        window.setTimeout(f, msec);
>      }
>
>      function test () {
>        var f = function () {
>          alert('hello');
>        };
>        setTimeout_broken(f, 1000);
>      }
>
>      test();
>
>    </script>
> </body>
>
>
> >/Hi Max,
> />/
> />/IE7 dragging never really worked. It was broken for all browsers 
> />/prior to r8916 (LPP-5889). However, this change caused the 
> />/javascript error messages to appear in IE6/IE7. The change is in 
> />/LzTimeKernel.js.  I'll try and track down who is shadowing the 
> />/global window object.
> />/
> />/
> />/
> />/
> />/
> />/tools/svn/binsearch.rb could help here.  If you notice any broken 
> />/builds as you use the tool, please update the binsearch.rb script so 
> />/it will skip them in the future...
> />/
> />/Also, be sure you're not running in debug mode - there may be issues 
> />/there.  Instead, try running in IE 7 with the IE web developer toolbar.
> />/
> />/Philip Romanik wrote:
> />/ > 
> />/ <http://jira.openlaszlo.org/jira/browse/LPP-5926>http://jira.openlaszlo.org/jira/browse/LPP-5926
> />/ >
> />/ > lzpix doesn't run in IE6/IE7 dhtml. if you try and drag a picture in
> />/ > IE7 you get an error (Object doesn't support this property or method)
> />/ > that I tracked down to the line in LzTimeKernel.js:
> />/ >
> />/ >     window.setInterval.apply(null, arguments);
> />/ >
> />/ > I'm not sure why window isn't an object unless something is shadowing
> />/ > it.  When I tried to run lzpix in debug mode, I got a different error,
> />/ > "Object expected" in a lzpix file dataman.lzx:
> />/ >
> />/ >     var api_sig = hex_md5(api_sig_string);
> />/ >
> />/ > The hex_md5 method is loaded in a script tag at the top of dataman.lzx
> />/ >
> />/ >
> />/ > Any ideas?
> />/ >
> />/ > Thanks!
> />/ >
> />/ > Phil
> />/ >
> />/
> />/--
> />/Regards,
> />/Max Carlson
> />/OpenLaszlo.org/



More information about the Laszlo-dev mailing list