actionscript 3 - Are dispatch events not necessary in Flex/ AS 3.0 -
i creating application, in calling many functions, say, not right way right functions, need dispatch events better results. please can clear me regarding benefits of dispatch events, many websites says "it executes event".
the question may feel foolish, answer let me in learning flex in right way.
thanks in advance.
in general, if find writing code has parent.somefunction()
or outerdocument.someotherfunction()
, time use events. code makes child component dependent on it's parent. better way have function executed on parent use addeventlistener()
on parent class register listener function , call dispatchevent()
in child.
if writing itemrenderers datagrids or list components, need learn technique.
Comments
Post a Comment