Daniel was correct, there are no true modal dialogs in Flex.  Modals stop the user from interacting with the app under the modal but they do not stop code processing.  The code runs to the end.  There is no way to stop/pause code execution in the Player.

 

And as Daniel said, the dialogs are being created in the expected order, the second one is just on top of the other.

 

To create a confirmation or other dialog box you have to use events.

 

I have an example in 1.5, but haven’t migrated it to 2.0 yet.

 

Tracy

 


From: [email protected] [mailto:[email protected]] On Behalf Of [EMAIL PROTECTED]
Sent: Tuesday, June 13, 2006 9:07 AM
To: [email protected]
Subject: Re: [flexcoders] Mx.controls.Alert confusion

 

perhaps a bit confused ...

the alert boxes appear on top of each other, sort of a 'last in - first
out" type of scenario, meaning the 'hi' is rendered, then the 'hello' is
rendered on top of 'hi'

working code below ...

----------------------------------------------------------

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute"
creationComplete="doInit()">
<mx:Script>

import mx.controls.Button;

public var btn:Button = new Button();

public function doInit():void
{
btn.addEventListener("click",handleClick);
cnv1.addChild(btn);
}

public function handleClick(e:Event):void
{
mx.controls.Alert.show("hi"); // appears below the 'hello'
alert
mx.controls.Alert.show("hello"); // appears on top of the 'hi'
alert
}
</mx:Script>

<mx:Canvas id="cnv1" height="100" width="100" backgroundColor="white"/>
</mx:Application>

"rama satoskar" To: [EMAIL PROTECTED]ups.com
<satoskar.rama@gmail.com> cc:
Sent by: Subject: [flexcoders] Mx.controls.Alert confusion
[EMAIL PROTECTED]ups.com
06/13/2006 07:32 AM
Please respond to
flexcoders



hi all,
Has anyone come across this?
I have a button whose click event activates an event listener where i
have two alert boxes. The first one displays a message "hi" and the
second one displays"hello". They are written one after the other.
However the second alert message displays first. Why is this?? i am
confused??

The code is given below:

var btn:Button = new Button()
btn.addEventListener(MouseEvent.Click,handleClick)

public function handleClick(event:Event):void
{
mx.controls.Alert.show("hi");
mx.controls.Alert.show("hello");
}

----------------------------------------------------------
This e-mail message (including attachments, if any) is intended for the use
of the individual or entity to which it is addressed and may contain
information that is privileged, proprietary , confidential and exempt from
disclosure. If you are not the intended recipient, you are notified that
any dissemination, distribution or copying of this communication is
strictly prohibited. If you have received this communication in error,
please notify the sender and erase this e-mail message immediately.
----------------------------------------------------------

__._,_.___

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





SPONSORED LINKS
Web site design development Computer software development Software design and development
Macromedia flex Software development best practice


YAHOO! GROUPS LINKS




__,_._,___

Reply via email to