Ok, looks like some kind of basic bug in the setStyle API itself,
failing to declare the 'name' variable.  Personally I just prefer not
to use 'name' for anything for just this reason.  But I see MochiKit
is quite fond of it.

Cheers & thanks for all the hard work in MochiKit!

Simon.

Index: Style.js
===================================================================
--- Style.js    (revision 1256)
+++ Style.js    (working copy)
@@ -159,11 +159,11 @@
     /** @id MochiKit.Style.setStyle */
     setStyle: function (elem, style) {
         elem = MochiKit.DOM.getElement(elem);
-        for (name in style) {
-            if (name == 'opacity') {
-                MochiKit.Style.setOpacity(elem, style[name]);
+        for (n in style) {
+            if (n == 'opacity') {
+                MochiKit.Style.setOpacity(elem, style[n]);
             } else {
-                elem.style[MochiKit.Base.camelize(name)] =
style[name];
+                elem.style[MochiKit.Base.camelize(n)] = style[n];
             }
         }
     },

Cheers,

Simon.



On Jan 31, 5:04 pm, "Simonz" <[EMAIL PROTECTED]> wrote:
> Hello all,
>
> I decided to bravely upgrade to the latest head revision of MochiKit
> in my code (svn rev 1256) and discovered the name of one of my windows
> seems to change after calling the "roundElement" API.
>
> For example, the following:
>
> alert(window.name);
> roundElement('privacyWarning');
> alert(window.name);
>
> first shows "contents"  (the correct name of the window), and then
> "backgroundColor".
>
> I'm guessing this is probably a bug?   Looking at the code, and will
> try to fix, but let me know if anyone has more info or if there's some
> reason it's supposed to do this!
>
> Cheers,
>
> Simon.


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"MochiKit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/mochikit?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to