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
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
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,
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?
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:
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
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
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
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
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
10 matches
Mail list logo