OK, here's a sample of what I'm trying to do.  I want Window2 to 
populate recpName.text which can be found in Window1 when the input 
field in Window2 is changed. 

If I change Window1 to be mx:Application, then recpName.text gets 
populated correctly, but once I change it back to TitleWindow, it 
breaks.

Thank you for your help,
Kim


Window1:

<?xml version="1.0" encoding="utf-8"?>
<mx:TitleWindow xmlns:mx="http://www.macromedia.com/2003/mxml"; 
width="400" height="400" xmlns="*" >
        <mx:Script>
        <![CDATA[
        import mx.containers.TitleWindow;
        import mx.managers.PopUpManager;                        
        
        
        function newWindow() {
           var addressPop:TitleWindow = TitleWindow
(PopUpManager.createPopUp(this, Window2));
                                
        }    
        ]]>
        </mx:Script>
        
        <mx:Text id="recpName" />
        <mx:Button label="Cancel" click="deletePopUp()" />
        <mx:Button label="New Window" click="newWindow()" />
</mx:TitleWindow>




Window2:

<?xml version="1.0" encoding="utf-8"?>
<mx:TitleWindow xmlns:mx="http://www.macromedia.com/2003/mxml"; 
width="400" height="400" xmlns="*" >
        <mx:Script>
        <![CDATA[
                function cancelPopUp() {
                        parentDocument.recpName.text = test.text;
                        deletePopUp();
                }
        ]]>
        </mx:Script>
        <mx:HBox >
                <mx:TextInput id="test" />
        </mx:HBox>
        <mx:Button label="Cancel" click="cancelPopUp()" />
</mx:TitleWindow>



--- In flexcoders@yahoogroups.com, "Sauro, Nick" <[EMAIL PROTECTED]> wrote:
i'm not fully understanding the problem here, a code excerpt might 
help
clarify
 
Nick Sauro + R O U N D A R C H + bus 212.909.2335 + mob 914.882.3687
 

________________________________

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] 
On
Behalf Of kreddington1
Sent: Tuesday, July 19, 2005 4:03 PM
To: flexcoders@yahoogroups.com
Subject: Fwd: RE: [flexcoders] TitleWindow passing vars back to 
another
TitleWindow


Using data binding, I run into the same problem.  The 2nd window 
doesn't seem to be able to talk to the first window. Is there 
another method I could try?

Thanks

--- In flexcoders@yahoogroups.com, "Sauro, Nick" <[EMAIL PROTECTED]> wrote:
you should look into data binding.

Nick Sauro + R O U N D A R C H + bus 212.909.2335 + mob 914.882.3687


________________________________

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] 
On
Behalf Of Kim Reddington
Sent: Tuesday, July 19, 2005 11:33 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] TitleWindow passing vars back to another
TitleWindow


I have created a TitleWindow that opens another TitleWindow.  The 2nd
window contains a form.  I would like the data entered in the form 
to be
passed back to the 1st titlewindow.

If I make the first TitleWindow be an application, then I can use 
parentDocument.name.text = name.text

to pass the name back to the original screen, but if I try to use 
this
same line of code to pass the data from the 2nd TitleWindow to a 1st
TitleWindow, then the text control shows up blank.

Does this make sense?  Is it possible to pass data back to an open
TitleWindow?

Thanks,
Kim    


_________________________________
Kim Reddington
Principal Consultant/Developer
Deluxe Technologies
http://www.deluxetechnologies.com 
<http://www.deluxetechnologies.com/> 
508-231-8744
  




--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives:
http://www.mail-archive.com/flexcoders%40yahoogroups.com 



________________________________

YAHOO! GROUPS LINKS 


      
*      Visit your group "flexcoders
<http://groups.yahoo.com/group/flexcoders> " on the web.
        
*      To unsubscribe from this group, send an email to:
      [EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]> 
        
*      Your use of Yahoo! Groups is subject to the Yahoo! Terms of
Service <http://docs.yahoo.com/info/terms/> . 


________________________________
--- End forwarded message ---





--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives:
http://www.mail-archive.com/flexcoders%40yahoogroups.com 



________________________________

YAHOO! GROUPS LINKS 


        
*        Visit your group "flexcoders
<http://groups.yahoo.com/group/flexcoders> " on the web.
          
*        To unsubscribe from this group, send an email to:
         [EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]> 
          
*        Your use of Yahoo! Groups is subject to the Yahoo! Terms of
Service <http://docs.yahoo.com/info/terms/> . 


________________________________
--- End forwarded message ---





--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/flexcoders/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



Reply via email to