Usage of initialize() vs. setup() in Mootools
Posted
by RyOnLife
on Stack Overflow
See other posts from Stack Overflow
or by RyOnLife
Published on 2010-06-07T06:56:18Z
Indexed on
2010/06/08
22:32 UTC
Read the original article
Hit count: 167
mootools
Mootools classes have an initialize()
method that's called when a new object is instantiated.
It seems that setup()
is a commonly used method as well.
Most classes I've observed call this.setup()
from initialize()
and nowhere else, which has left me wondering:
What's the purpose of setup()
? Why not just put the setup()
code in initialize()
? When does it make sense to use a setup()
method?
© Stack Overflow or respective owner