Posted on
May 7, 2010 by hubertfc
Maxcompute:
Alert. Show (text, title, flags, parent, eventhandler, iconclass, defaultbuttonflag)
Data Statistics description:
Text: The text that alert will show
Title: The title of the publish window.
Flags: click the button to be displayed in the pop-up window. Currently, there is alert. OK,
Alert. Cancel, alert. Yes,
Alert. No. The default value is alert. OK.
Parent: the object that calls alert, usually this
Closehandle: Specifies the eventhandler name. You do not need to add ""
Iconclass: zookeeper to be presented by alert
Defaultbuttonflag: It can be alert. OK,
Alert. Cancel, alert. Yes,
Alert. No. The default value is alert. OK. The main purpose is to press enter to which button will be pressed after the weak window appears.
Example:
Alert. Show ("do you want to save your changes ?", "Save changes ",
Alert. OK | alert. Cancel | alert. Yes, this, alertclickhandler );
<xml version="1.0"?>
<!-- controls\alert\AlertEvent.mxml
-->
<xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx">
<fx:Script>
CDATA[
import
mx.controls.Alert;
import mx.events.CloseEvent;
private function alertListener(eventObj:CloseEvent):void
{
// Check to see if the OK button was
pressed.
if (eventObj.detail==Alert.OK)
{
myText.text = myInput.text;
}
}
]]>
</fx:Script>
<s:VGroup>
< TextInput id="myInput" width="150" text=""
/>
<s:Button id="myButton" label="Copy
Text"
click='Alert.show("Copy Text?", "Alert", Alert.OK | Alert.CANCEL,
this, alertListener, null, Alert.OK);'/>
<TextInput
id="myText"/>
</s:VGroup>
</s:Application>
Site: http://livedocs.adobe.com/flex/3/langref/mx/controls/Alert.html#show ()