You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@royale.apache.org by pu...@apache.org on 2021/09/18 15:15:14 UTC

[royale-asjs] branch develop updated: Added noLabel and yesLabel in Alert.as

This is an automated email from the ASF dual-hosted git repository.

pushminakazi pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/royale-asjs.git


The following commit(s) were added to refs/heads/develop by this push:
     new 4dde3f2  Added noLabel and yesLabel in Alert.as
4dde3f2 is described below

commit 4dde3f26f84473e6bf4960612520b03997a83b12
Author: pashminakazi <pa...@gmail.com>
AuthorDate: Sat Sep 18 08:15:03 2021 -0700

    Added noLabel and yesLabel in Alert.as
---
 .../MXRoyale/src/main/royale/mx/controls/Alert.as  | 85 ++++++++++++++++++++--
 1 file changed, 78 insertions(+), 7 deletions(-)

diff --git a/frameworks/projects/MXRoyale/src/main/royale/mx/controls/Alert.as b/frameworks/projects/MXRoyale/src/main/royale/mx/controls/Alert.as
index 62ecdcb..45e99f1 100644
--- a/frameworks/projects/MXRoyale/src/main/royale/mx/controls/Alert.as
+++ b/frameworks/projects/MXRoyale/src/main/royale/mx/controls/Alert.as
@@ -331,7 +331,8 @@ public class Alert extends Panel
 				"controls", "cancelLabel");
 		*/
 	}
-    //----------------------------------
+    
+	//----------------------------------
     //  noLabel
     //----------------------------------
     
@@ -339,14 +340,47 @@ public class Alert extends Panel
      *  @private
      *  Storage for the noLabel property.
      */
-    //private static var _noLabel:String;
+    private static var _noLabel:String;
     
     /**
      *  @private
      */
-    //private static var noLabelOverride:String;
+    private static var noLabelOverride:String;
 
-    //[Inspectable(category="General")]
+    [Inspectable(category="General")]
+
+    /**
+     *  The label for the No button.
+     *
+     *  <p>If you use a different label, you may need to adjust the 
+     *  <code>buttonWidth</code> property to fully display it.</p>
+     *
+     *  The English resource bundle sets this property to "NO". 
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public static function get noLabel():String
+    {
+        //initialize();
+        
+        return _noLabel;
+    }
+
+    /**
+     *  @private
+     */
+    public static function set noLabel(value:String):void
+    {
+        noLabelOverride = value;
+
+        _noLabel = value != null ?
+                   value : ""
+                   /* resourceManager.getString(
+                      "controls", "noLabel"); */
+    }
 
     /**
      *  @private
@@ -383,18 +417,55 @@ public class Alert extends Panel
 		*/
 	}
 	
+   //----------------------------------
+    //  yesLabel
+    //----------------------------------
+    
     /**
      *  @private
      *  Storage for the yesLabel property.
      */
-    //private static var _yesLabel:String;
+    private static var _yesLabel:String;
     
     /**
      *  @private
      */
-    //private static var yesLabelOverride:String;
+    private static var yesLabelOverride:String;
 
-    //[Inspectable(category="General")]
+    [Inspectable(category="General")]
+
+    /**
+     *  The label for the Yes button.
+     *
+     *  <p>If you use a different label, you may need to adjust the 
+     *  <code>buttonWidth</code> property to fully display the label.</p>
+     *
+     *  The English resource bundle sets this property to "YES". 
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public static function get yesLabel():String
+    {
+        //initialize();
+        
+        return _yesLabel;
+    }
+
+    /**
+     *  @private
+     */
+    public static function set yesLabel(value:String):void
+    {
+        yesLabelOverride = value;
+
+        _yesLabel = value != null ?
+                    value : ""
+                    /* resourceManager.getString(
+                        "controls", "yesLabel"); */
+    }
 
     //--------------------------------------------------------------------------
     //