Duplicate them exactly and make sure they both work.  Then modify one of them one property at a time to see what is causing the difference.

Tracy

 


From: [email protected] [mailto:[email protected]] On Behalf Of Kelly
Sent: Sunday, September 25, 2005 1:46 AM
To: [email protected]
Subject: [flexcoders] PopUp Manager not working ---WTF?

 

I am trying to create a popup window in my application.

 

It’s not working.

 

I have two buttons that both create a PopUp. The Buttons are right next to each other.

 

One works and the other one doesn’t.

 

Each button calls a function.

 

The functions are right next to each other on the same AS page.

 

 

Here is the code:

 

 

<!—In application page à

<mx:Button id="newMessageButton" label="New Message" click="NewMessage()" />

<mx:Button id="PrintButton" icon="@Embed('printer.png')" click="PrintMessage()" />

 

 

<!—In Actionscript for application à

 

function NewMessage() {

            var popup = mx.managers.PopUpManager.createPopUp(this, NewMessage, true, {deferred: true});

            //popup.centerPopUp();

}

 

function PrintMessage() {

           

            var popup = mx.managers.PopUpManager.createPopUp(this, PrintPreview, true, {deferred: true, TheMessage:messageDetails.text, TheSender:messageFrom.text, TheDate:mDateSent.text});

            popup.centerPopUp();

}

 

 

The print button works and creates a popup window as expected.

 

The newMessage button does nothing the first time it is clicked and the second time it is clicked the page goes blank.

 

 

WTF?

 

 

 

 

 

Kelly Roman

 

[EMAIL PROTECTED]

 

Dekayd Media Inc. --

Rich Internet Application Development

w/ Macromedia Flex

 




--
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




Reply via email to