You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@royale.apache.org by ca...@apache.org on 2020/04/24 18:26:48 UTC

[royale-asjs] branch develop updated: core: add IRemovableBead with tearDown method for cleaning listeners before removal

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

carlosrovira 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 e8e68d3  core: add IRemovableBead with tearDown method for cleaning listeners before removal
e8e68d3 is described below

commit e8e68d36811954e854744d8762973420eb229959
Author: Carlos Rovira <ca...@apache.org>
AuthorDate: Fri Apr 24 20:26:43 2020 +0200

    core: add IRemovableBead with tearDown method for cleaning listeners before removal
---
 .../projects/Core/src/main/royale/CoreClasses.as   |  1 +
 .../org/apache/royale/core/IRemovableBead.as       | 45 ++++++++++++++++++++++
 2 files changed, 46 insertions(+)

diff --git a/frameworks/projects/Core/src/main/royale/CoreClasses.as b/frameworks/projects/Core/src/main/royale/CoreClasses.as
index 2d3e8c0..8a6c776 100644
--- a/frameworks/projects/Core/src/main/royale/CoreClasses.as
+++ b/frameworks/projects/Core/src/main/royale/CoreClasses.as
@@ -26,6 +26,7 @@ package {
  */
 internal class CoreClasses
 {
+	import org.apache.royale.core.IRemovableBead; IRemovableBead;
 	import org.apache.royale.core.IBeadKeyController; IBeadKeyController;
 	import org.apache.royale.core.IFocusable; IFocusable;
 	import org.apache.royale.core.IId; IId;
diff --git a/frameworks/projects/Core/src/main/royale/org/apache/royale/core/IRemovableBead.as b/frameworks/projects/Core/src/main/royale/org/apache/royale/core/IRemovableBead.as
new file mode 100644
index 0000000..e3bf401
--- /dev/null
+++ b/frameworks/projects/Core/src/main/royale/org/apache/royale/core/IRemovableBead.as
@@ -0,0 +1,45 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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.core
+{
+    /**
+     *  The IRemovableBead interface is an interface for beads that
+     *  need to do some work before beign removed from the strand calling tearDown method like
+     *  clean listeners.
+     * 
+     *  @see org.apache.royale.core.IStrand#getBeadByType
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 10.2
+     *  @playerversion AIR 2.6
+     *  @productversion Royale 0.9.8
+     */
+	public interface IRemovableBead extends IBead
+	{
+        /**
+		 *  The actions needed before the removal
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.2
+		 *  @playerversion AIR 2.6
+		 *  @productversion Royale 0.9.8
+		 */
+        function tearDown():void;
+	}
+}