PDA

View Full Version : initialize function in the class system



gkatz
18 Nov 2012, 5:22 AM
the sencha docs http://docs.sencha.com/touch/2-1/#!/guide/class_system doc does not talk about the initialize function at all yet most custom components use it.
why is it not in the docs? should I use it when I build a custom component? also whats the difference between constructor and initialize function?
thanks.

bricemason
19 Nov 2012, 7:03 PM
These links might help:

http://www.sencha.com/forum/showthread.php?163127

http://www.sencha.com/forum/showthread.php?187754

Additionally I will say that chapter 3 of the book Sencha Touch In Action goes much more in depth into the component lifecycle. I have purchased the early access edition and I have found it worth it. More info here:

http://www.manning.com/garcia2/

Brice