On Dec 5, 12:53 am, BeiMingyu <
cwen1...@gmail.com> wrote:
> I have a problem about the source code (version 1.7):
> var Class = (function() {
> function create() {
> var parent = null, properties = $A(arguments);
> if (Object.isFunction(properties[0]))
> parent = properties.shift();
> function klass() {
> * this.initialize.apply(this, arguments); // Where has the method
> initialize been defined??
> * }}
>
> *Where has the method initialize been defined??*
It can be defined by the specification object passed into
Class.create. If it isn't, a default is defined about 15 lines further
down:
if (!klass.prototype.initialize)
klass.prototype.initialize = Prototype.emptyFunction;
HTH,
--
T.J. Crowder
Independent Software Engineer
tj / crowder software / com
www / crowder software / com