Hi,
I am having a strange issue with partially applied functions on IE 6
(sp1) where any arguments that are supplied that are false, null, or 0
are dropped entirely from the partially applied function. The
following test code shows what I mean:
var test = function(a, b, c) {
log(a + " " + b + " " + c);
}
partial(test, "a", "b")("c");
partial(test, "a", false)("c");
partial(test, false, "b")("c");
partial(test, false, true)("c");
Gives an output of:
INFO: a b c
INFO: a c undefined
INFO: b c undefined
INFO: true c undefined
As you can see from this if b has false applied to it then when the
partially applied function is called the b argument takes the value of
"c" and the c argument is undefined. This will give the same output
if the false values were replaced with 0, or null.
I was wondering if anyone else had found this issue, whether there is
a work around, or strange as it seems to me maybe I am doing something
wrong.
Cheers
Bryce
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---