3 Replies Latest reply on Oct 18, 2006 11:04 AM by S4Potential

    createChildren size draw

    S4Potential Level 1
      My understanding is when creating a class few built-in methods are always executed in this order: constructor, createChildren, init and then draw. When extending the class, the parent class same methods can be, and should be, executed via the super method. That's all chic and swell but I would like to know more about this.

      One big question I have is do some, or all, of these methods are executed more than once without being explicitly invoked by the programmer?

      Makes sense to me that the constructor is only executed at instanciation time. But what about createChildren, init and draw. Draw seems to be a good candidate for executing when needed without being invoked by the programmer.

      In many createChildren code I came across, I always see:
      if (myObject == undifined) createObject.....

      To me it indicates the method can be executed more than once.

      Well, things seem to take shape in my head as I am writing this. Of course createChildren, init and draw can be executed more than once. This is very true when a subclass call them via the super method but, what about no subclass ever is created or, if any, doesn't use the super method?

      Then, I guess these methods are never ever executed more than once.

      Also, is there any other methods that are part of this select club?

      Where could I find any documentation to help me understand these, and other important, matters?