I mostly use events myself these days, but here are some other options.
http://www.cflex.net/showFileDetails.cfm?ObjectID=558
Tracy

-----Original Message-----
From: [email protected]
[mailto:[EMAIL PROTECTED] On Behalf Of Manish Jethani
Sent: Friday, February 01, 2008 3:43 AM
To: [email protected]
Subject: Re: [flexcomponents] Newbie component question...

On 2/1/08, Daniel Poon <[EMAIL PROTECTED]> wrote:
> I learnt how to make a component in a separate file e.g.
> component.mxml, but I am having problem with passing variables back to
> the main.mxml.
>
> If I have a login TitleWindow for the component.mxml, once the user
> input userID password, how do I pass this back to the main.mxml?
[snip]

This is one of the patterns I follow.

 <!-- component.mxml -->
 <TitleWindow>
   private function save()
   {
     data.userID = userIDTextInput.userID;
     data.password = passwordTextInput.password;
   }

   private function close()
   {
     PopUpManager.removePopUp(this);

     dispatchEvent(new Event(Event.CLOSE));
   }
 </TitleWindow>

>From your OK button you call save()  and close(). The application
handles the close event and gets the data from the data property of
the component.

Manish


 
Yahoo! Groups Links





Reply via email to