There are several techniques that you can use for this; it really depends on what the need is and the sophistication of the application. Personally, I would employ a presentationModel to solve this, but using an MVC framework and VO's can be challenging for some. In this case, using public properties in the components would work fine. Respectfully though, the assertion that using events creates a "tightly-coupled" strategy is not correct. Tight coupling is where components have a direct dependency on one another. Loose coupling avoids this by linking the components with properties and/or events. I do agree though, that you wouldn't necessarily want/need to pass data around amongst components, using custom events. This is where the beauty of a Model comes into play.
Here's a good article to read, that might help for this solution: http://www.adobe.com/devnet/flex/articles/loose_coupling.html <http://www.adobe.com/devnet/flex/articles/loose_coupling.html> -TH --- In [email protected], "Amy" <amyblankens...@...> wrote: > > --- In [email protected], Laurence MacNeill LMacNeill@ wrote: > > > > At 05:32 PM 5/14/2009, you wrote: > > > > > > > > >You can just handle the click event from your button and in the > > >handler function pull the necessary information out of your 3 custom > > >components and then do what you want with it. > > > > Right -- but don't I have to have those components dispatch their own > > events in order to pull data from them? At least, as I understand > > it, that's the best practice. What you're telling me to do (if I'm > > understanding) would tightly couple my form with the components, > > because I'd be accessing stuff that's supposed to be internal to the > > components, right? > > I have a really hard time figuring out why people recommend passing information in custom events. It results in overly tight coupling, IMO, because both the component dispatching the event and the one receiving the event need to have that custom event compiled into them (so in addition to tight coupling it also bloats your file size). > > I think it's much better practice to simply make public properties on your components available, and then just go read those properties when the event fires. > > I know that there are a few cases where it makes more sense to use a custom event, but in most cases it's just extra work, extra file size, and extra tight coupling for little gain. > > HTH; > > Amy >

