On Dec 5, 12:53 am, BeiMingyu <[email protected]> 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
--
You received this message because you are subscribed to the Google Groups
"Prototype & script.aculo.us" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/prototype-scriptaculous?hl=en.