[flexcoders] Component Questions

2008-07-12 Thread Dan Vega
I built a small app that has 4 screens and everything is working great. I want to learn more about breaking up the views into different components before I move on to mvc in Flex. My question is lets say I have my main application and then each of my screens are views. In my main application I

Re: [flexcoders] Component Questions

2008-07-12 Thread Douglas Knudsen
You need to inject data from parents into children. If children need to send data up the chain to parents, use a event. Thus, in the below add a public variable client and set this upon creation like this comp:MyPanel client={_client} .. note its odd to name a publicly available variable

Re: [flexcoders] Component Questions

2008-07-12 Thread Dan Vega
Thanks for the quick reply Douglas.. I know about the _ for private variables, I am just in the process of breaking my app up. Am I doing things thre right way then ? I have an ojbect that 3 of the 4 screens either need to read or update. Do I create a public var and pass it around ? On Sat,

Re: [flexcoders] Component Questions

2008-07-12 Thread Dan Vega
Ok, I re wrote the 1st screen into a component. Here is the code for my component. When a user selects a client from the data grid I want to dispatch an event of clientSelected My question now is in my main app I have the following code. How do I tell my main application to listen for that event?

Re: [flexcoders] Component Questions

2008-07-12 Thread greg h
Hi Dan, I think you might need to include the [Event] metadata tag in your components that are executing dispatchEvent(). Something like this: mx:Metadata [Event(name=clientSelected)] /mx:Metadata For details see this page in the docs:

RE: [flexcoders] Component Questions

2008-07-12 Thread Alex Harui
Sent: Saturday, July 12, 2008 2:45 PM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Component Questions Ok, I re wrote the 1st screen into a component. Here is the code for my component. When a user selects a client from the data grid I want to dispatch an event of clientSelected My

Re: [flexcoders] Component Questions

2008-07-12 Thread Dan Vega
I agree with you but is there an easy way to do this without diving into a framework right away? I understand frameworks in general but I am still learning the ins and outs of Flex. I am just trying to go up the 45 degree ramp instead of the 90 :) THanks! I seem to be in the minority opinion on

Re: [flexcoders] Component Questions

2008-07-12 Thread Dan Vega
Any examples would be a big help!. On Sat, Jul 12, 2008 at 7:30 PM, Dan Vega [EMAIL PROTECTED] wrote: I agree with you but is there an easy way to do this without diving into a framework right away? I understand frameworks in general but I am still learning the ins and outs of Flex. I am

Re: [flexcoders] Component Questions

2008-07-12 Thread greg h
Hi Dan, For more of a walk through on Dispatching Events from Custom Components see this online training title from Lynda.com: Flex 3 Essential Training with: David Gassner http://movielibrary.lynda.com/html/modPage.asp?ID=438 If you do not already have an account for the lynda.com Online

Re: [flexcoders] Component Questions

2008-07-12 Thread Dan Vega
That is a ton of information Greg, thanks so much! I have viewed the Lynda videos before so I guess its about time to revisit them. I think once I wrap my head around how to move data around I will be ready to jump into a framework, after that sky is the limit! Thanks again for the info.. Dan