royale-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yish...@apache.org
Subject [royale-asjs] 02/03: Starting to fix ACE package
Date Mon, 02 Apr 2018 17:52:29 GMT
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

commit 6c3771a35aa8747330aac235b8e2ca8845acda26
Author: DESKTOP-RH4S838\Yishay <yishayjobs@hotmail.com>
AuthorDate: Sun Feb 25 15:39:29 2018 +0200

    Starting to fix ACE package
---
 .../main/royale/org/apache/royale/ace/ACEEditor.as | 30 +++++++++++++---
 .../royale/org/apache/royale/ace/Application.as    | 40 ----------------------
 2 files changed, 25 insertions(+), 45 deletions(-)

diff --git a/frameworks/projects/Ace/src/main/royale/org/apache/royale/ace/ACEEditor.as b/frameworks/projects/Ace/src/main/royale/org/apache/royale/ace/ACEEditor.as
index 42a2600..a194f78 100644
--- a/frameworks/projects/Ace/src/main/royale/org/apache/royale/ace/ACEEditor.as
+++ b/frameworks/projects/Ace/src/main/royale/org/apache/royale/ace/ACEEditor.as
@@ -19,27 +19,47 @@
 package org.apache.royale.ace
 {
 	import org.apache.royale.core.UIBase;
+
+	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
 	{
+		/**
+		 * <inject_html>
+		 * <script src="https://cdn.rawgit.com/ajaxorg/ace-builds/master/src-min-noconflict/ace.js"></script>
+		 * </inject_html>
+		 */
+		public function ACEEditor()
+		{
+			super();
+		}
 		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/frameworks/projects/Ace/src/main/royale/org/apache/royale/ace/Application.as
b/frameworks/projects/Ace/src/main/royale/org/apache/royale/ace/Application.as
deleted file mode 100644
index 4a7c6d3..0000000
--- a/frameworks/projects/Ace/src/main/royale/org/apache/royale/ace/Application.as
+++ /dev/null
@@ -1,40 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  Licensed to the Apache Software Foundation (ASF) under one or more
-//  contributor license agreements.  See the NOTICE file distributed with
-//  this work for additional information regarding copyright ownership.
-//  The ASF licenses this file to You under the Apache License, Version 2.0
-//  (the "License"); you may not use this file except in compliance with
-//  the License.  You may obtain a copy of the License at
-//
-//      http://www.apache.org/licenses/LICENSE-2.0
-//
-//  Unless required by applicable law or agreed to in writing, software
-//  distributed under the License is distributed on an "AS IS" BASIS,
-//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-//  See the License for the specific language governing permissions and
-//  limitations under the License.
-//
-////////////////////////////////////////////////////////////////////////////////
-package org.apache.royale.ace
-{
-    import org.apache.royale.core.Application;
-	import org.apache.royale.core.IFlexInfo;
-	
-	
-	public class Application extends org.apache.royale.core.Application implements IFlexInfo
-	{
-		/**
-		 * The Royale Compiler will inject html into the index.html file.  Surround with
-		 * "inject_html" tag as follows:
-		 *
-		 * <inject_html>
-		 * <script src="https://raw.githubusercontent.com/ajaxorg/ace-builds/master/src-min-noconflict/ace.js"></script>
-		 * </inject_html>
-		 */
-		public function Application()
-		{
-			super();
-		}
-    }
-}

-- 
To stop receiving notification emails like this one, please contact
yishayw@apache.org.

Mime
View raw message