Slow answer here, but the suggested compromise function would handle
any random attribute if they are just in the right position in the
argument list:
> compromiseCHECKBOX(null, {"name":"myName"}); // works
Cheers,
/Per
On Tue, Jun 17, 2008 at 7:04 AM, machineghost <[EMAIL PROTECTED]> wrote:
> compromiseCHECKBOX({"name":"myName"}); // does not work (as intended)
I'm a little confused by this, since that's the base syntax. Without
it, how do you make:
(or an INPUT with any other attribute besides name)?
> I haven't seen a single signature like that in MochiKit so far
The whole rea
Ok, so perhaps we should modify createDOMFuncExt to treat the argument
array as a list of optional arguments? With scalar I suppose you mean
typeof(o) == "string", "number" or "boolean"?
I'm not a big fan of overloaded function signatures, though. They tend
to be difficult to document in an under
When I first looked at your function I completely missed the
significance of this line:
myAttrs[args[pos]] = arguments[pos];
and thought that argument was only for specifying which attributes are
required. Having looked at it again, I now understand how it allows
for CHECKBOX("myName") syntax
If I understand you correctly, I think createDOMFuncExt already
accomodates this:
CHECKBOX = createDOMFuncExt(null, "input", ["name"], { type: "checkbox" });
HIDDEN = createDOMFuncExt(null, "input", ["name", "value"], { type: "hidden" });
I'm using this to create SVG functions with required para
I really like your idea of making the creation of the input functions
more generalized. However, if we wanted to preserve the:
CHECKBOX("myNameIsBox1") ==
functionality we'd need a slight modification to createDOMFuncExt.
Specifically, we'd need one more argument that let's you specify a
"defaul
The tab indentation is now fixed in svn trunk [1384].
Regarding the createINPUT and createINPUTFunc functions, I think it
would be better with a more generic solution. When creating SVG DOM
nodes I wrote a createDOMFuncExt function that should work here also.
See http://trac.mochikit.com/wiki/Moc