When working with popups, rather than directly set properties of visual
controls, I set a public property, and in the popup I bind the control
property to the public property backing variable.

 

This helps avoid timing issues.

 

Tracy

 

________________________________

From: [email protected] [mailto:[EMAIL PROTECTED] On
Behalf Of valdhor
Sent: Wednesday, July 09, 2008 3:19 PM
To: [email protected]
Subject: [flexcoders] Re: Trouble passing values to a child window

 

I think it's a timing issue. Try this...

<?xml version="1.0" encoding="utf-8"?>
<mx:WindowedApplication xmlns:mx="http://www.adobe.com/2006/mxml";
layout="absolute">
    <mx:Script>
        <![CDATA[
            public var theNote:noteWindow;

            //********** popup selected note
            public function floatingNote():void
            {
                theNote = new noteWindow();
                theNote.title = "Floating note";
                theNote.maximizable = false;
                theNote.open();
                theNote.noteContents.text="My contents";
                theNote.noteTitle.text = "Mytitle";
            }
        ]]>
    </mx:Script>
    <mx:Button label="Create Note Window" click="floatingNote()"/>
</mx:WindowedApplication>

--- In [email protected], "Andrew Wetmore" <[EMAIL PROTECTED]>
wrote:
>
> sorry, I should have said below if I DO comment out the two lines that
are
> currently commented out, the code runs fine
> 
> On Wed, Jul 9, 2008 at 2:02 PM, Andrew Wetmore [EMAIL PROTECTED] wrote:
> 
> > Hi. I have an app where the user can select a note and opt to "pop"
> >
> >
> > 
> >
> 
> 
> 
> -- 
> Andrew Wetmore
> User Experience Director
> Open Learning Exchange - www.ole.org
> 978-319-7324
>

 

Reply via email to