[Proto-Scripty] Re: Class method aliasing

2010-05-27 Thread blechler
Thanks T.J.! That was an excellent and concise answer, and an excellent blog post as well. It took several readings to mentally digest it, but I did ultimately come to understand the content. Thanks for taking the time. B On May 22, 3:26 am, "T.J. Crowder" wrote: > Hi, > > Sorry, just realize

[Proto-Scripty] Re: Class method aliasing

2010-05-22 Thread T.J. Crowder
Hi, Sorry, just realized that while my previous answer is hopefully helpful in terms of why what you were doing doesn't work, it *doesn't* help you alias methods. :-) A couple of options for you: If you want to change that code as little as possible, you can alias when the `initialize` method is

[Proto-Scripty] Re: Class method aliasing

2010-05-22 Thread T.J. Crowder
Hi, When you use object literal notation, the right-hand side of an initialization (the bit after the colon [:]) is evaluated when the literal is evaluated, and then the *value* of the result is used to initialize that property on the object created by the literal (the options object you're passin