[Prototype-core] Re: Feature suggestion: getClassName

2008-02-22 Thread GarethAtFlignet
Hi Tobias, By namespaced classes do you mean support for classes named like: com.google.MyTestClass com.yahoo.MyTestClass ? If thats the case then I did add some more fuctionality to support this together with a Prototype.Namespace variable that allows you to set the current namespace so you d

[Prototype-core] Re: Feature suggestion: getClassName

2008-02-22 Thread Yanick
On Feb 21, 6:44 am, Tobie Langel <[EMAIL PROTECTED]> wrote: > Hi, > > That unfortunately doesn't solve the problem for namespaced classes: > > var Vehicles = {}; > > Class.create('Vehicle.Cars', {}); > > Best, > > Tobie > No, but this might (just wrote this draft in 10 minutes... could be optimiz

[Prototype-core] Re: Feature suggestion: getClassName

2008-02-22 Thread GarethAtFlignet
Thanks Yanick, will look at your code in a few mins. In the meantime here is some code that I added to provide OO namespace functionality I need for a project we're working on (please bear in mind that my javascript skills have rarely gone beyond the odd piece of DOM manipulation and as such it i

[Prototype-core] Re: Simple event delegation

2008-02-22 Thread Ken Snyder
Based on this thread, I created flexible Event delegation functions for attaching and removing delegation rules: http://kendsnyder.com/sandbox/delegate/ http://scripteka.com/script/element-delegate - Ken Snyder --~--~-~--~~~---~--~~ You received this message be

[Prototype-core] Re: Simple event delegation

2008-02-22 Thread kangax
Ken, take a look at my implementation [1] - it looks very much alike, except for the syntax : ) [1] http://code.google.com/p/protolicious/source/browse/trunk/src/event.register.js - kangax On Feb 22, 1:07 pm, Ken Snyder <[EMAIL PROTECTED]> wrote: > Based on this thread, I created flexible Even

[Prototype-core] Re: Simple event delegation

2008-02-22 Thread Ken Snyder
kangax wrote: > Ken, > take a look at my implementation [1] - it looks very much alike, > except for the syntax : ) > > [1] > http://code.google.com/p/protolicious/source/browse/trunk/src/event.register.js > > - kangax > > Cool! So if I understand it correctly, register() has three difference

[Prototype-core] Re: Simple event delegation

2008-02-22 Thread kangax
Protolicious is my personal repo for little snippets I use at work or play with : ) You noticed right about main differences. My main concern was definitely a performance, therefore selector caching and plain loops. Another thing to note is that it accepts comma-separated selector expressions: E

[Prototype-core] Re: Feature suggestion: getClassName

2008-02-22 Thread GarethAtFlignet
> > Personnally, I fail to see the point of a getClassName() function... > but it could be useful in some cases. (--to the OP) Keep in mind that > the concept of "Classes" in JS is not as straightforeward as in pure > Java (or other OO languages); because of it's loose-type syntax, any > anonymous