"Pablo Montilla" <[EMAIL PROTECTED]> writes:
> Hello, I've started using a declarative way for my event connections. I
> would create an array with objects that define the different events and
> its targets, and then call a generic connectEventMap() method that
> would do the plumbing for me. An example would be:
> var eventMap = [
> { name: 'credit', onkeyup: onValueKeyUp },
> { name: 'debit', onkeyup: onValueKeyUp },
> { name: 'creditNational', onkeyup: onNationalValueKeyUp, onchange:
> onInputChange },
> { name: 'debitNational', onkeyup: onNationalValueKeyUp, onchange:
> onInputChange },
> { tag: 'input', onblur: onInputBlur }
> ]
>
> Could something like this be useful for MochiKit?
I'd like seeing your code. :-) You could post it here to the list.
Getting something like that with map() wouldn't be all that hard (but why
reinventing the wheel if you have already done the hard part? ;-))...
--
Jorge Godoy <[EMAIL PROTECTED]>
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---