Mike,

>I like the idea of a single name for both get/set because it fits well
>with the jQuery model.  I would opt for a new method name so that
>existing methods can be deprecated and eventually removed.  This is
>why I'm not a big fan of overriding "val".  I think it's too ingrained
>at this point and a behavior change would be trouble.  Even though the
>return type would be the same, the return value would not (or might
>not).

The disadvantage using one method (and it's what I don't like) is that
sometimes it break the chain and sometimes it doesn't--depending on whether
you're retrieving or setting a value. But I'm willing to live with that (but
I do think that concept is hard for people new to chaining to grasp.)

I think it's imperative that Plug-ins are intuitive to the developer. I'm
leading towards using 2 different methods for String/Array input &
output--instead of setting an option. Plus it seems like you could
(potentially) want to use both on a given page.

Do you think these are methods you'd want to implement into the Form
Plug-in? If so, then I'd want the Array method to be fieldValue() and make
sure it outputs data the same way as you do currently. Maybe we'd use
fieldString() as the method for interacting w/the elements using strings.

-Dan


Reply via email to