[Prototype-core] Re: Event delegation / registration ideas

2009-01-04 Thread Радослав Станков
I'm using event delegation a lot recently. I even opened a ticket for it - http://prototype.lighthouseapp.com/projects/8886/tickets/435-eventdelegate-and-elementmethodsdelegate The problem I see in your approach, is that Event.stopObserving won't clear callback from cache, but if your

[Prototype-core] Re: iterable/$A

2007-09-03 Thread Радослав Станков
I didn't understand why don't use Array.prototype.slice from here http://www.danwebb.net/2006/11/7/a-low-down-dirty-goblin-of-a-hack ? It was working well when I tested with my app ? --~--~-~--~~~---~--~~ You received this message because you are subscribed to

[Prototype-core] Multi event assignment

2007-08-16 Thread Радослав Станков
For a widget of mine I needed to a group of li elements to assign a multiple events (note this is just part of the code so 'this' reference to the widget: revision 1: var li = $$('#main li.views'); li.each(function(el) { el.observe('mousedown',

[Prototype-core] Re: Event.observe will destroy the scope of Javascript OOP?

2007-07-14 Thread Радослав Станков
function Cat(){ this.color = yellow; } Cat.prototype.showColor = function(){ alert(this.color) } Cat.prototype.init(){ Event.observe(button, click, this.showColor.bind(this)); } Will work just fine :) the problem is that when you assign action to a button the scope of the function

[Prototype-core] Re: $ function

2007-06-18 Thread Радослав Станков
Vote for #1 I think we as developers should think about the performance and code, and we should be aware of this traps . But to make fix which will be helpful for unaware people and lower the quality, I don't think It is a good idea. --~--~-~--~~~---~--~~ You

[Prototype-core] Re: Element.build and element.build

2007-06-01 Thread Радослав Станков
My be such wrapper around new Element() will be useful, but Ask your self when you insert nodes where do you insert them, or how (with appendChild, insertBefore, insertAfter, ), an when inserting item do you just create it, or add events or do other things except that ? mainly I do some thing

[Prototype-core] Re: Element.build and element.build

2007-05-30 Thread Радослав Станков
this sounds like: $('some_element_id').appendChild( new Element(tagName, options) ); --~--~-~--~~~---~--~~ 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] Re: Integration of something like ben nolan's behaviour?

2007-05-04 Thread Радослав Станков
I use this for events assignment (with little extension of mine): http://alternateidea.com/blog/articles/2006/3/21/introducing-css-event-selectors --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Prototype: Core