Well... Let consider an example. - I have 10 Inspectable parameters which user can modify in Component inspector - I need all of them to start the component - There are default values for each, of course.
So, with use of commitProperties(), I have to create - 10 conditions in my commitProperties() function to check all vars - 10 flags xxxChanged While I agree that it looks more like "best practice" example (and will probable use it), there is some unpleasant feeling that that's too many code/variables just to call simple setters... Again, thanks for pointing to this way. On 2/19/09, Muzak <p.ginnebe...@telenet.be> wrote: > > ----- Original Message ----- > From: "Gregory N" <greg.gousa...@gmail.com> > To: "Flash Coders List" <email@example.com> > Sent: Thursday, February 19, 2009 7:17 PM > Subject: Re: [Flashcoders] component def doesn't pass params to constructor? > > >> After some consideration... >> >> If I have, say dozen of Inspectable parameters AND a method that need >> several of them to work properly, then I'll have to call this method >> after a delay - to be sure that all necessary setters were called >> before it.. >> Thus, turning back to enter_frame trick :-( >> Or am I missing something trivial? >> > > With the use of commitProperties() you'll be calling it from your init() > method and nothing will happen, as all "xxxChanged" flags > will be false. > If you set default values for you internal properties, your component should > work fine. > There should be no need for a delay, if there is, youl probably need to > rethink your components inner workflow. > > regards, > Muzak > > _______________________________________________ > Flashcoders mailing list > Flashcoders@chattyfig.figleaf.com > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders > -- -- Best regards, GregoryN ================================ http://GOusable.com Flash components development. Usability services. _______________________________________________ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders