[Prototype-core] Re: New Name for Users Group (RoR Spinoffs)

2008-06-17 Thread Florian Traverse
+1 for [EMAIL PROTECTED] it's kinda clear :)

2008/6/17 Walter Lee Davis [EMAIL PROTECTED]:

 ++ for the attack squadron. Keep 'em guessing.

 TJ, your name will do in a pinch.

 Walter

 On Jun 17, 2008, at 2:00 PM, Ryan Gahl [EMAIL PROTECTED] wrote:

 My vote is for Super Thunderbots Attack Squadron 3000

 If no one votes for that though, I'd settle for Prototype and
 Scriptaculous Users



 On 6/17/08, T.J. Crowder  [EMAIL PROTECTED][EMAIL PROTECTED]
 wrote:


 Hi folks,

 I've been chatting today with Tobie about renaming / replacing the RoR
 Spinoffs mailing list (there's a thread about it over there[1]).
 Rationale and discussion over there, but the short version is that
 pretty much everyone agrees we should do it, and so Tobie and I were
 talking about mechanics and transition.

 So we need to think of a new name.  I made a suggestion in the thread,
 I made a suggestion that no one really commented on either way.  I'll
 revise it slightly:  My suggestion is Prototype and Scriptaculous
 Users ( [EMAIL PROTECTED]
 [EMAIL PROTECTED]).  Boring, but
 fairly clear.

 Tobie suggested we should discuss the name here.  What do you think?
 Better ideas?
 --
 T.J. Crowder
 tj / crowder software / com

 [1] -
 http://groups.google.com/group/rubyonrails-spinoffs/browse_thread/thread/0732340bedfdd74b#
 http://groups.google.com/group/rubyonrails-spinoffs/browse_thread/thread/0732340bedfdd74b#
 --
 WebWidgetry.com / MashupStudio.com
 Future Home of the World's First Complete Web Platform
 --
 Inquire: 1-920-574-2218
 Blog: http://www.someElement.comhttp://www.someElement.com
 LinkedIn Profile: http://www.linkedin.com/in/ryangahl
 http://www.linkedin.com/in/ryangahl


 


--~--~-~--~~~---~--~~
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: A callbacks module for adding before/after hooks to object methods

2008-05-16 Thread Florian Traverse
You can have a look at how it is handled in Archetype Components (an Open
Source Framework based on Prototype). It's called MethodBuilder, but this is
basically a Facet in AOP.

It does not just add a before and an after for any function of a component,
but it also provides some really enjoyable tools like having a this bound
to the component in all it's function, so you don't have to put
.bind(this) everywhere when using callbacks.

Get more informations at http://archetypejs.org :)

2008/5/16 kangax [EMAIL PROTECTED]:


 I have done something similar in Class.addBehavior:
 http://github.com/kangax/protolicious/tree/master/class.addbehavior.js
 On the other hand, it's actually pretty easy to do this with plain
 Function#wrap:

 (function(p){
  p.push = p.push.wrap(function(){
var args = $A(arguments), proceed = args.shift();
console.log('before: ' + args);
(function(){ console.log('after: ' + args) }).defer();
return proceed.apply(proceed, args);
  })
 })(Array.prototype);

 It's arguably not as clean as your implementation, so some could
 definitely find it useful : )

 - kangax

 On May 14, 12:13 pm, Pat Nakajima [EMAIL PROTECTED] wrote:
  I've started putting together a way to specify per-object before/after
  callbacks for any method. Probably not something to go in core, but
  maybe something that would be interesting to core contributors.
 
  There are some examples in a GitHub wiki (http://github.com/nakajima/
  nakatype/wikis/callbacks), but basically, you specify callbacks like
  so:
 
var someArray = [1,2,3];
 
Callbacks.add(someArray, {
  before: {
push: function(entry) {
  var msg = 'about to push ' + entry + ' on array: ' +
  this.join(', ');
  console.info(msg);
}
  },
 
  after: {
push: function(entry) {
  var msg = 'just pushed ' + entry + ' on array: ' +
  this.join(', ');
  console.info(msg);
}
  }
});
 
someArray.push(4);
 
  In addition to adding 4 to someArray, the above code snippet will log
  to the console before and after.
 
  If anybody has any suggestions/criticisms/threats, please do share!
 


--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---