That's bad advice Rishi; that leads to tight coupling and "parent abuse". It's ok to have a parent call a method on a child ( data binding is preferred though). But, children shouldn't call methods directly on their parents. Instead, have the child component dispatch an event to initiate the save method on the parent.
-TH --- In flexcoders@yahoogroups.com, Rishi Tandon <rishitandon123@...> wrote: > > Use object oriented best practice. > Mxml I'd nothing but a actionscript class. > If u r initializing the custom component inside the other component, then u > can directly access the method or else use the > Application.application.componentiD.methodName if u are > Where are u initializing globally. > > Sent from my iPhone > > On Aug 28, 2011, at 2:21 AM, "shail" <shail_link@...> wrote: > > > Hi Group, > > > > I have a customize container component in which i am using one > > sub-component. The customize container has one overriden method save(), i > > want to call this method in subcomponent. Can this be possible? > > > > my code looks like this - > > > > GraphDex.mxml > > <CustPanel> > > <script> > > overrides public void save(){ > > //plz ignore syntex > > } > > </script> > > > > <Dex id="dexone"/> > > </CustPanel> > > > > Here I want to call mentioned save() method in Dex component that contain > > some graphs, so on click event of Dex graphs i want to call save > > functionality. > > > > As being new bee,Please suggest if my approach is wrong. > > > > >