flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ha...@apache.org
Subject [02/10] git commit: [flex-asjs] [refs/heads/refactor-strand] - Forgot addBeadsToStrand
Date Sat, 15 Jul 2017 21:35:31 GMT
Forgot addBeadsToStrand


Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/8a688f42
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/8a688f42
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/8a688f42

Branch: refs/heads/refactor-strand
Commit: 8a688f4241cfc166d2eae909990721933ba4c5d9
Parents: 8058093
Author: Harbs <harbs@in-tools.com>
Authored: Sat Jul 15 23:57:47 2017 +0300
Committer: Harbs <harbs@in-tools.com>
Committed: Sat Jul 15 23:57:47 2017 +0300

----------------------------------------------------------------------
 .../org/apache/flex/core/addBeadsToStrand.as    | 44 ++++++++++++++++++++
 1 file changed, 44 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/8a688f42/frameworks/projects/Core/src/main/flex/org/apache/flex/core/addBeadsToStrand.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/addBeadsToStrand.as
b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/addBeadsToStrand.as
new file mode 100644
index 0000000..081268c
--- /dev/null
+++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/addBeadsToStrand.as
@@ -0,0 +1,44 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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.flex.core
+{
+    import org.apache.flex.events.IEventDispatcher;
+    import org.apache.flex.core.IStrand;
+    import org.apache.flex.events.Event;
+
+    /**
+     * Helper function for IStrand.addBeads()
+     * @langversion 3.0
+     * @playerversion Flash 10.2
+     * @playerversion AIR 2.6
+     * @productversion FlexJS 0.9
+     * @flexjsignorecoercion org.apache.flex.events.IEventDispatcher
+     */
+    public function addBeadsToStrand(strand:IStrand,beads:Array,dispatch:Boolean=true):void
+    {
+        if(beads)
+        {
+            while(beads.length){
+                strand.addBead(beads.shift());
+            }
+        }
+        if(dispatch)
+            (strand as IEventDispatcher).dispatchEvent(new Event("beadsAdded"));
+    }   
+}
\ No newline at end of file


Mime
View raw message