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

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


The following commit(s) were added to refs/heads/ace-editor by this push:
     new 4643a0e  Working example of ace editor, lots of cleaning up to do and 
also need to put classes in a separate package
4643a0e is described below

commit 4643a0e258ee12ec798da749fb8df7c124326d6e
Author: DESKTOP-RH4S838\Yishay <[email protected]>
AuthorDate: Sun Feb 18 18:23:25 2018 +0200

    Working example of ace editor, lots of cleaning up to do and also need to 
put classes in a separate package
---
 examples/royale/Ace/src/main/royale/ACEEditor.as   | 20 ++++++++++++++------
 examples/royale/Ace/src/main/royale/Application.as |  2 +-
 2 files changed, 15 insertions(+), 7 deletions(-)

diff --git a/examples/royale/Ace/src/main/royale/ACEEditor.as 
b/examples/royale/Ace/src/main/royale/ACEEditor.as
index 7c08f07..cd51a60 100644
--- a/examples/royale/Ace/src/main/royale/ACEEditor.as
+++ b/examples/royale/Ace/src/main/royale/ACEEditor.as
@@ -19,28 +19,36 @@
 package 
 {
        import org.apache.royale.core.UIBase;
-       import ace.Editor;
+       COMPILE::JS {
+               import ace.Editor;
+               import ace.Document;
+       }
+       COMPILE::SWF
+       public class ACEEditor extends org.apache.royale.core.UIBase
+       {
+       }
        
+       COMPILE::JS
        public class ACEEditor extends org.apache.royale.core.UIBase
        {
                private var editor:Editor;                      
 
                override public function addedToParent():void 
                { 
-                  super.addedToParent(); 
-                  editor = ace.edit(id); 
+                       super.addedToParent(); 
+                       editor = ace["edit"](id); 
                } 
 
                private var _theme:String; 
                public function get theme():String 
                { 
-                   return _theme; 
+                       return _theme; 
                } 
 
                public function set theme(value:String):void 
                { 
-                  _theme = value; 
-                  editor.setTheme(value); 
+                       _theme = value; 
+                       editor.setTheme(value); 
                } 
        }
 }
diff --git a/examples/royale/Ace/src/main/royale/Application.as 
b/examples/royale/Ace/src/main/royale/Application.as
index c9626f1..1f87c76 100644
--- a/examples/royale/Ace/src/main/royale/Application.as
+++ b/examples/royale/Ace/src/main/royale/Application.as
@@ -29,7 +29,7 @@ package
                 * "inject_html" tag as follows:
                 *
                 * <inject_html>
-                * <script 
src="https://raw.githubusercontent.com/ajaxorg/ace-builds/master/src-min-noconflict/ace.js";></script>
+                * <script 
src="https://cdn.rawgit.com/ajaxorg/ace-builds/master/src-min-noconflict/ace.js";></script>
                 * </inject_html>
                 */
                public function Application()

-- 
To stop receiving notification emails like this one, please contact
[email protected].

Reply via email to