This is an automated email from the ASF dual-hosted git repository. harbs pushed a commit to branch feature/strandwork in repository https://gitbox.apache.org/repos/asf/royale-asjs.git
commit 3fe1bed56e200a1b3465998da2a3cf180039633f Author: Harbs <[email protected]> AuthorDate: Thu Dec 7 16:58:16 2017 +0200 Forgot addBeadsToStrand --- .../org/apache/royale/core/addBeadsToStrand.as | 44 ++++++++++++++++++++++ 1 file changed, 44 insertions(+) diff --git a/frameworks/projects/Core/src/main/royale/org/apache/royale/core/addBeadsToStrand.as b/frameworks/projects/Core/src/main/royale/org/apache/royale/core/addBeadsToStrand.as new file mode 100644 index 0000000..14ff61c --- /dev/null +++ b/frameworks/projects/Core/src/main/royale/org/apache/royale/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.royale.core +{ + import org.apache.royale.events.IEventDispatcher; + import org.apache.royale.core.IStrand; + import org.apache.royale.events.Event; + + /** + * Helper function for IStrand.addBeads() + * @langversion 3.0 + * @playerversion Flash 10.2 + * @playerversion AIR 2.6 + * @productversion Royale 0.9 + * @royaleignorecoercion org.apache.royale.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 -- To stop receiving notification emails like this one, please contact "[email protected]" <[email protected]>.
