Available since version VERSION NUMBER
Class | Extends | Implements |
---|---|---|
Note: This component is currently only available in JavaScript.
Overview text here
how to use it goes here
Check the Reference of org.apache.royale.SET.NAME{:target=‘_blank’} for a more detailed list of properties and methods.
the contents below are for the Jewel Alert. Update them for this component.
PROPERTY | Type | Description |
---|---|---|
title | String | The title of the Alert . |
message | String | The message to display in the Alert body. |
flags | uint | The buttons to display on the Alert as bit-mask values. Possible values are: YES , NO , OK , and CANCEL . |
Method | Parameters | Description |
---|---|---|
show | message(String), title(String), flags(uint), parent(Object) | Shows the Alert non modal anchored to the given parent object, which is usally a root component such as *, as a UIView or body if null. |
close | buttonFlag:uint = 0x000004 | Closes the dialog element. |
The Alert
component uses the CloseEvent.CLOSE
event when the user removes it from the application. You can attach callback listeners to the CloseEvent.CLOSE
as follows:
var alert:Alert = Alert.show("Do you want to save your changes?", "Save Changes", Alert.OK | Alert.NO); alert.addEventListener(CloseEvent.CLOSE, alertClickHandler);
Then check event.detail
to know what button was clicked inside the dialog.
// Event handler callback function for CloseEvent event private function alertClickHandler(event:CloseEvent):void { if (event.detail == Alert.YES) status.text="You answered Yes"; else status.text="You answered No"; }
The Alert
component uses the following beads:
Bead Type | Implementation | Description |
---|---|---|
IBeadModel{:target=‘_blank’} | org.apache.royale.jewel.beads.models.AlertModel{:target=‘_blank’} | The data model for the Alert. |
IBeadView{:target=‘_blank’} | org.apache.royale.jewel.beads.views.AlertView{:target=‘_blank’} | The bead used to create the elements of the Alert. |
IBeadController{:target=‘_blank’} | org.apache.royale.jewel.beads.controllers.AlertController{:target=‘_blank’} | The bead used to handle input events. |
IBeadLayout{:target=‘_blank’} | org.apache.royale.jewel.beads.layouts.NullLayout{:target=‘_blank’}(*) | The bead used to postion the elements of the Alert. |
(*) NullLayout is used temporarily.