[Prototype-core] Re: Inheritance: your thoughts?

2007-08-22 Thread ben
can set instance properties by referring to 'this': var Person = Class.create(function(self) { self.classMethod = function() {...}; this.instanceMethod = function() {...}; }) This also eliminates the need to return anything from the closure. If there's any interes

[Prototype-core] Empty catch blocks

2007-04-01 Thread Ben Weaver
}); if (!dispatched && exception && (callback == 'onException')) { throw exception; } } Thanks for developing such a useful library. Best wishes, -Ben --~--~-~--~~~---~--~~ You received this message because you are subscribed to t

[Prototype-core] Re: Integration of something like ben nolan's behaviour?

2007-05-03 Thread Ben Nolan
I should update bennolan.com/behaviour/. :) Ben On 5/3/07, Michael Peters <[EMAIL PROTECTED]> wrote: > > Mislav Marohnić wrote: > > > Yeah, this is it. You only need Event.onReady() for this. You can find > > it in the event branch or you can copy it over from Low

[Prototype-core] Re: Integration of something like ben nolan's behaviour?

2007-05-03 Thread Ben Nolan
I don't think the little snippet will do it. You want something like: Behaviour = { sheets_ : $A(), register : function(sheet){ this.sheets_.push(sheet); }, apply : function(){ this.sheets_.each(** as above **); } } Ben On 5/4/07, chris <[EMAIL PROTECTED]> wrote: > > Would

[Prototype-core] Re: documentation suggestion for $F()/Form.Element.getValue()

2007-05-16 Thread Ben Nolan
ny issue with changing the behaviour of $F() to more closely > match $() so that a null is returned if no such element exists, > instead of bombing out?) > > See > > http://www.prototypejs.org/api/form/element/getValue > > > > > --M. > > > > > --

[Prototype-core] Re: Any interest in a Delayed Shift Queue class for prototype?

2007-05-17 Thread Ben Nolan
Szlvain, I've started work on one such repository. See: http://prototypejs.groupswiki.com/pages/index Cheers, Ben On 5/17/07, Sylvain ZIMMER <[EMAIL PROTECTED]> wrote: > > I searched a bit but didn't find any official or even semi-official > prototype addons repos

[Prototype-core] Re: Community Repository

2007-05-18 Thread Ben Nolan
Hey Tobie, Any chance I could get a copy of that data and put it into my wiki? I know it's reproduction of data - but if the wiki looks okay maybe it'll be easier to maintain than having it in Mephisto? Ben On 5/17/07, Tobie Langel <[EMAIL PROTECTED]> wrote: > > Hi guys,

[Prototype-core] Functional Javascript

2007-06-14 Thread Ben Nolan
Some of my favourites: Element.succ = ...; $R(this.startElement, this.endElement).function(el){ el.addClassName('selected'); }); Builder.node('div', {class:'calendar'}, $R(1..31).map(function(i){ Builder.node('div', i) }); -- Regards, Ben Nolan http:/

[Prototype-core] Re: Alternate syntax for inheritance

2007-08-25 Thread Ben Newman
question here]? I'm glad you asked! Them's my thoughts. Ben On Aug 24, 3:54 am, "Mislav Marohnić" <[EMAIL PROTECTED]> wrote: > The alternate syntax suggested by Ben Newman and supported by Alex is > demonstrated in these two > pastes:http://pastie.caboo.se/903

[Prototype-core] Object#hasOwnProperty support for Safari

2007-09-27 Thread Ben Newman
This may not be appropriate for a release candidate version of the library, but I thought I'd share :) http://dev.rubyonrails.org/ticket/9700 I haven't seen any other implementations of hasOwnProperty that could be called sound, but maybe I didn't look hard enough. In any case, I'll be perfectl

[Prototype-core] Prototype and Caja

2008-02-06 Thread Ben Laurie
t it would work either under Caja or with plain JS. So, I was wondering: a) How the core team feel about this? b) Whether there's anyone that would be interested in working with us to make this happen? Cheers, Ben. --~--~-~--~~~---~--~~ You received this mess

[Prototype-core] Re: Prototype and Caja

2008-02-06 Thread Ben Laurie
On Feb 6, 2008 12:49 PM, Tobie Langel <[EMAIL PROTECTED]> wrote: > > Hi Ben, > > Dould you kindly advise on what would need to be modified ? I certainly will, but currently it is all in notes and people's heads. I'm going to try to pull something together for next we

[Prototype-core] Late binding for contextual iterators (patch advertisement)

2008-03-02 Thread Ben Newman
;call" method can be used as an iterator. The changes made in the patch are pretty conservative, but I think similar changes might be appropriate elsewhere in the library, if there's consensus on these suggestions. Cheers, Ben --~--~-~--~~~---~--~~ Yo

[Prototype-core] Re: Late binding for contextual iterators (patch advertisement)

2008-03-02 Thread Ben Newman
gt; > console.timeEnd('binded'); > > > console.time('call'); > > for (var i=10001; --i;) { > > Element.visible.call({ }, document.body);} > > > console.timeEnd('call'); > > > binded: ~400ms > > call: ~250ms > > > On Mar 2, 3:23 pm,

[Prototype-core] Re: Any intention of providing a function.throttle?

2010-04-26 Thread "Cowboy" Ben Alman
implement. (And please don't mind the "jQuery" in the name, it doesn't require jQuery in any way, it just uses it as an optional namespace!) http://benalman.com/projects/jquery-throttle-debounce-plugin/ Either way, if you find any of the code useful, feel free to use it! - Be

[Prototype-core] Re: Any intention of providing a function.throttle?

2010-04-27 Thread "Cowboy" Ben Alman
otype" version of my jQuery plugin here, it has all the same functionality of the jQuery version, but is called in a prototype-style way: http://gist.github.com/380755 - Ben On Apr 27, 5:52 am, Mislav Marohnić wrote: > On Sun, Apr 25, 2010 at 23:08, "Cowboy" Ben Alman wrote: >

[Prototype-core] Re: Any intention of providing a function.throttle?

2010-04-27 Thread "Cowboy" Ben Alman
e first that came to mind. - Ben On Apr 27, 10:19 am, Mislav Marohnić wrote: > On Tue, Apr 27, 2010 at 16:09, "Cowboy" Ben Alman wrote: > > > > > That being said, this throttle (and yours) don't have an option for > > disabling that final "deferred"