[Prototype-core] Re: Core Plans for Event Delegation?

2008-11-07 Thread Pat Nakajima

While on the topic, here's my rudimentary attempt at an event
delegation library for Prototype: http://github.com/nakajima/event-delegation.
It's not great, but maybe a workable holdover for the time being.

On Nov 6, 6:59 pm, kangax <[EMAIL PROTECTED]> wrote:
> On Nov 6, 5:06 pm, Dan <[EMAIL PROTECTED]> wrote:
>
> > > Event delegation is definitely one of the most important additions
> > > that we have in mind (along with element wrappers). We just need to
> > > deal with bugfixes before adding new features : )
>
> > Understood. I've been following all of the discussions here and on
> > related blogs. It sounds like there's a lot to do!
>
> Yes there is : )
> We appreciate any help - patches/tests, reports, suggestions, etc.
>
>
>
> > > Perhaps 1.6.1 is a good candidate for it (though such estimates are
> > > obviously not official by any means).
>
> > I would love to see this feature in 1.6.1. Do you know who is planning
> > to take on the development on this feature?
>
> Not really. I think some of the core folks have their own
> implementations. I have been working on one too, some time ago (http://
> github.com/kangax/protolicious/tree/master/event.register.js)
>
>
>
> > > Which addons were you using?
>
> > I've been reading a lot about Low Pro and others... I've been using my
> > own though, which I'm sure has about a billion holes in it. I'll paste
> > it at the end of this post.
>
> I'll try to check your code once I have a chance.
> Is there a reason you expose a global `CssEventObserver` (rather than
> store it in a closure)?
>
>
>
> > Thanks for the response,
> > Dan
>
> > ---
>
> --
> kangax
>
> [snip implementation]
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Prototype: Core" group.
To post to this group, send email to prototype-core@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/prototype-core?hl=en
-~--~~~~--~~--~--~---



[Prototype-core] Re: Core Plans for Event Delegation?

2008-11-06 Thread kangax

On Nov 6, 5:06 pm, Dan <[EMAIL PROTECTED]> wrote:
> > Event delegation is definitely one of the most important additions
> > that we have in mind (along with element wrappers). We just need to
> > deal with bugfixes before adding new features : )
>
> Understood. I've been following all of the discussions here and on
> related blogs. It sounds like there's a lot to do!

Yes there is : )
We appreciate any help - patches/tests, reports, suggestions, etc.

>
> > Perhaps 1.6.1 is a good candidate for it (though such estimates are
> > obviously not official by any means).
>
> I would love to see this feature in 1.6.1. Do you know who is planning
> to take on the development on this feature?

Not really. I think some of the core folks have their own
implementations. I have been working on one too, some time ago (http://
github.com/kangax/protolicious/tree/master/event.register.js)

>
> > Which addons were you using?
>
> I've been reading a lot about Low Pro and others... I've been using my
> own though, which I'm sure has about a billion holes in it. I'll paste
> it at the end of this post.

I'll try to check your code once I have a chance.
Is there a reason you expose a global `CssEventObserver` (rather than
store it in a closure)?

>
> Thanks for the response,
> Dan
>
> ---
>

--
kangax

[snip implementation]
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Prototype: Core" group.
To post to this group, send email to prototype-core@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/prototype-core?hl=en
-~--~~~~--~~--~--~---



[Prototype-core] Re: Core Plans for Event Delegation?

2008-11-06 Thread Dan

> Event delegation is definitely one of the most important additions
> that we have in mind (along with element wrappers). We just need to
> deal with bugfixes before adding new features : )

Understood. I've been following all of the discussions here and on
related blogs. It sounds like there's a lot to do!

> Perhaps 1.6.1 is a good candidate for it (though such estimates are
> obviously not official by any means).

I would love to see this feature in 1.6.1. Do you know who is planning
to take on the development on this feature?

> Which addons were you using?

I've been reading a lot about Low Pro and others... I've been using my
own though, which I'm sure has about a billion holes in it. I'll paste
it at the end of this post.

Thanks for the response,
Dan

---

var CssEventObserver = {
/**
 * State variable; ensures object isn't initialized more than once
 */
initialized: false,
/**
 * Initializes object
 */
init: function() {
if (!this.initialized) {
this.initialized = true;
var body = $(document.body);
for (var e in this.handlers) {
body.observe(e, 
this.__handleDomEvent.bind(this));
}
}
},
dispose: function() { /* TODO: removes bindings from INIT and
unregisters all handlers */ },
isRegistered: function(selector, eventName, handler) {
var queue = this.handlers[eventName];
if (queue) {
for (var i=0; ihttp://groups.google.com/group/prototype-core?hl=en
-~--~~~~--~~--~--~---



[Prototype-core] Re: Core Plans for Event Delegation?

2008-11-04 Thread kangax

On Nov 3, 8:21 pm, Justin <[EMAIL PROTECTED]> wrote:
> http://code.google.com/p/javascriptmvc/source/browse/trunk/jmvc/plugi...
>
> It uses JMVC, but any parts it uses could be very easily swapped out -
> JMVC mimics a lot of prototype's native functions.
>
> It handles basic CSS (tags, ids, classNames)
>
> But most important, it handles all the tricky cases around submit and
> change.
>
> It's not that big at 277 lines (with some comments)
>
> Let me know if you find it helpful.

Interesting.
Did you guys find those ua sniffs necessary?

[...]

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



[Prototype-core] Re: Core Plans for Event Delegation?

2008-11-03 Thread Tobie Langel

Thanks for the pointer.

Combined to something like Samuel Lebeau's bouncer[1], this should be
a winner.

Tobie

[1] http://github.com/samleb/bouncer/tree/master

On Nov 4, 2:21 am, Justin <[EMAIL PROTECTED]> wrote:
> http://code.google.com/p/javascriptmvc/source/browse/trunk/jmvc/plugi...
>
> It uses JMVC, but any parts it uses could be very easily swapped out -
> JMVC mimics a lot of prototype's native functions.
>
> It handles basic CSS (tags, ids, classNames)
>
> But most important, it handles all the tricky cases around submit and
> change.
>
> It's not that big at 277 lines (with some comments)
>
> Let me know if you find it helpful.
>
> kangax wrote:
> > On Nov 3, 1:05 pm, Dan <[EMAIL PROTECTED]> wrote:
> > > Hello,
>
> > > What is planned regarding support for Event Delegation within
> > > Prototype Core? I've been going back and forth between writing my own,
> > > grabbing one of the various implementations out there, or waiting
> > > around for support in core.
>
> > > I would of course prefer that it be part of Prototype Core as I could
> > > count on future support for it while having confidence in the solid
> > > thought put into the implementation (so please, please, please add
> > > this feature to Core!).
>
> > > If there are no immediate plans for implementing Event Delegation
> > > within Core, is there an implementation that the Core team recommends
> > > which would closely reflect a possible future Core implementation?
>
> > Event delegation is definitely one of the most important additions
> > that we have in mind (along with element wrappers). We just need to
> > deal with bugfixes before adding new features : )
>
> > Perhaps 1.6.1 is a good candidate for it (though such estimates are
> > obviously not official by any means).
>
> > Which addons were you using?
>
> > > Thanks,
> > > Dan
>
> > --
> > kangax
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Prototype: Core" group.
To post to this group, send email to prototype-core@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/prototype-core?hl=en
-~--~~~~--~~--~--~---



[Prototype-core] Re: Core Plans for Event Delegation?

2008-11-03 Thread Justin

http://code.google.com/p/javascriptmvc/source/browse/trunk/jmvc/plugins/controller/delegator.js

It uses JMVC, but any parts it uses could be very easily swapped out -
JMVC mimics a lot of prototype's native functions.

It handles basic CSS (tags, ids, classNames)

But most important, it handles all the tricky cases around submit and
change.

It's not that big at 277 lines (with some comments)


Let me know if you find it helpful.


kangax wrote:
> On Nov 3, 1:05 pm, Dan <[EMAIL PROTECTED]> wrote:
> > Hello,
> >
> > What is planned regarding support for Event Delegation within
> > Prototype Core? I've been going back and forth between writing my own,
> > grabbing one of the various implementations out there, or waiting
> > around for support in core.
> >
> > I would of course prefer that it be part of Prototype Core as I could
> > count on future support for it while having confidence in the solid
> > thought put into the implementation (so please, please, please add
> > this feature to Core!).
> >
> > If there are no immediate plans for implementing Event Delegation
> > within Core, is there an implementation that the Core team recommends
> > which would closely reflect a possible future Core implementation?
>
> Event delegation is definitely one of the most important additions
> that we have in mind (along with element wrappers). We just need to
> deal with bugfixes before adding new features : )
>
> Perhaps 1.6.1 is a good candidate for it (though such estimates are
> obviously not official by any means).
>
> Which addons were you using?
>
> >
> > Thanks,
> > Dan
>
> --
> kangax
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Prototype: Core" group.
To post to this group, send email to prototype-core@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/prototype-core?hl=en
-~--~~~~--~~--~--~---



[Prototype-core] Re: Core Plans for Event Delegation?

2008-11-03 Thread kangax

On Nov 3, 1:05 pm, Dan <[EMAIL PROTECTED]> wrote:
> Hello,
>
> What is planned regarding support for Event Delegation within
> Prototype Core? I've been going back and forth between writing my own,
> grabbing one of the various implementations out there, or waiting
> around for support in core.
>
> I would of course prefer that it be part of Prototype Core as I could
> count on future support for it while having confidence in the solid
> thought put into the implementation (so please, please, please add
> this feature to Core!).
>
> If there are no immediate plans for implementing Event Delegation
> within Core, is there an implementation that the Core team recommends
> which would closely reflect a possible future Core implementation?

Event delegation is definitely one of the most important additions
that we have in mind (along with element wrappers). We just need to
deal with bugfixes before adding new features : )

Perhaps 1.6.1 is a good candidate for it (though such estimates are
obviously not official by any means).

Which addons were you using?

>
> Thanks,
> Dan

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