[royale-compiler] branch develop updated: ArrayLikeUtil changes: -reset the lookup cache when the project changes, to account for potential variation between targets. -also permit unary operators for
This is an automated email from the ASF dual-hosted git repository. gregdove pushed a commit to branch develop in repository https://gitbox.apache.org/repos/asf/royale-compiler.git The following commit(s) were added to refs/heads/develop by this push: new 2dc5711 ArrayLikeUtil changes: -reset the lookup cache when the project changes, to account for potential variation between targets. -also permit unary operators for ArrayLike classes with unchanged index access. 2dc5711 is described below commit 2dc57118d8050fad9cd34a9e45b5055ef64cd16d Author: greg-dove AuthorDate: Sun Feb 2 13:05:35 2020 +1300 ArrayLikeUtil changes: -reset the lookup cache when the project changes, to account for potential variation between targets. -also permit unary operators for ArrayLike classes with unchanged index access. --- .../org/apache/royale/utils/ArrayLikeUtil.java | 81 +- 1 file changed, 50 insertions(+), 31 deletions(-) diff --git a/compiler/src/main/java/org/apache/royale/utils/ArrayLikeUtil.java b/compiler/src/main/java/org/apache/royale/utils/ArrayLikeUtil.java index 2ec5fd8..c34d70c 100644 --- a/compiler/src/main/java/org/apache/royale/utils/ArrayLikeUtil.java +++ b/compiler/src/main/java/org/apache/royale/utils/ArrayLikeUtil.java @@ -126,7 +126,7 @@ public class ArrayLikeUtil IMetaTag arrayLikeTag = ArrayLikeUtil.getArrayLikeMetaData(metaSource); String setterArg; setterArg = getSetterArg(arrayLikeTag); -if (!setterArg.equals("[]")) { //otherwise we leave it as is +if (!setterArg.equals(INDEX_ACCESS_UNCHANGED)) { //otherwise we leave it as is //get the FunctionCallNode replacement's arguments from the original assignment ExpressionNodeBase indexArg = (ExpressionNodeBase) dynNode.getRightOperandNode(); ExpressionNodeBase valueArg = (ExpressionNodeBase) ((BinaryOperatorAssignmentNode) child).getRightOperandNode(); @@ -161,7 +161,7 @@ public class ArrayLikeUtil IDefinition metaSource = ArrayLikeUtil.resolveArrayLikeDefinitionSource(target, project); IMetaTag arrayLikeTag = ArrayLikeUtil.getArrayLikeMetaData(metaSource); String getterArg = getGetterArg(arrayLikeTag); -if (!getterArg.equals("[]")) { +if (!getterArg.equals(INDEX_ACCESS_UNCHANGED)) { ExpressionNodeBase indexArg = (ExpressionNodeBase) dynNode.getRightOperandNode(); FunctionCallNode replacement = createDynamicAccessMutation(dynNode, getterArg); replacement.getArgumentsNode().addChild(indexArg); @@ -177,7 +177,7 @@ public class ArrayLikeUtil IDefinition metaSource = ArrayLikeUtil.resolveArrayLikeDefinitionSource(target, project); IMetaTag arrayLikeTag = ArrayLikeUtil.getArrayLikeMetaData(metaSource); String getterArg = getGetterArg(arrayLikeTag); -if (!getterArg.equals("[]")) { //otherwise we leave it as is +if (!getterArg.equals(INDEX_ACCESS_UNCHANGED)) { //otherwise we leave it as is ExpressionNodeBase indexArg = (ExpressionNodeBase) dynNode.getRightOperandNode(); FunctionCallNode replacement = createDynamicAccessMutation(dynNode, getterArg); replacement.getArgumentsNode().addChild(indexArg); @@ -193,7 +193,7 @@ public class ArrayLikeUtil IDefinition metaSource = ArrayLikeUtil.resolveArrayLikeDefinitionSource(target, project); IMetaTag arrayLikeTag = ArrayLikeUtil.getArrayLikeMetaData(metaSource); String getterArg = getGetterArg(arrayLikeTag); -if (!getterArg.equals("[]")) { //otherwise we leave it as is +if (!getterArg.equals(INDEX_ACCESS_UNCHANGED)) { //otherwise we leave it as is ExpressionNodeBase indexArg = (ExpressionNodeBase) dynNode.getRightOperandNode(); FunctionCallNode replacement = createDynamicAccessMutation(dynNode, getterArg); replacement.getArgumentsNode().addChild(indexArg); @@ -213,7 +213,7 @@ public class ArrayLikeUtil IDefinition metaSource = ArrayLikeUtil.resolveArrayLikeDefinitionSource(target, project); IMetaTag arrayLikeTag = ArrayLikeUtil.getArrayLikeMetaData(metaSource); String getterArg = getGetterArg(arrayLikeTag); -if (!getterArg.equals("[]")) { //otherwise we leave it as is +if (!getterArg.equals(INDEX_AC
[royale-asjs] 02/05: work on states
This is an automated email from the ASF dual-hosted git repository. harbs pushed a commit to branch feature/router in repository https://gitbox.apache.org/repos/asf/royale-asjs.git commit 2b1b15caef09e43b2f3a499c038e0e6bb1e3e5f2 Author: Harbs AuthorDate: Sat Feb 1 19:51:38 2020 +0200 work on states --- .../royale/jewel/todomvc/views/TodoFooter.mxml | 4 ++- .../jewel/todomvc/views/TodoListSection.mxml | 4 ++- .../org/apache/royale/routing/RouteTitleLookup.as | 39 ++ .../org/apache/royale/routing/RouteToState.as | 29 +--- .../org/apache/royale/routing/SetRouteTitle.as | 4 +-- 5 files changed, 72 insertions(+), 8 deletions(-) diff --git a/examples/jewel/todomvc/src/main/royale/jewel/todomvc/views/TodoFooter.mxml b/examples/jewel/todomvc/src/main/royale/jewel/todomvc/views/TodoFooter.mxml index 71756ae..0423f1c 100644 --- a/examples/jewel/todomvc/src/main/royale/jewel/todomvc/views/TodoFooter.mxml +++ b/examples/jewel/todomvc/src/main/royale/jewel/todomvc/views/TodoFooter.mxml @@ -80,7 +80,9 @@ limitations under the License. } ]]> - + + + diff --git a/examples/jewel/todomvc/src/main/royale/jewel/todomvc/views/TodoListSection.mxml b/examples/jewel/todomvc/src/main/royale/jewel/todomvc/views/TodoListSection.mxml index 47e5b8f..50ab3ec 100644 --- a/examples/jewel/todomvc/src/main/royale/jewel/todomvc/views/TodoListSection.mxml +++ b/examples/jewel/todomvc/src/main/royale/jewel/todomvc/views/TodoListSection.mxml @@ -70,7 +70,9 @@ limitations under the License. - + + + diff --git a/frameworks/projects/Basic/src/main/royale/org/apache/royale/routing/RouteTitleLookup.as b/frameworks/projects/Basic/src/main/royale/org/apache/royale/routing/RouteTitleLookup.as new file mode 100644 index 000..d41986b --- /dev/null +++ b/frameworks/projects/Basic/src/main/royale/org/apache/royale/routing/RouteTitleLookup.as @@ -0,0 +1,39 @@ + +// +// 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.routing +{ + public class RouteTitleLookup extends SetRouteTitle + { +public function RouteTitleLookup() +{ + super(); + lookup = {}; +} +public var lookup:Object; +override protected function handleStateSet():void +{ + var baseName:String = host.routeState.getBaseName(); + if(lookup[baseName]) +host.routeState.title = lookup[baseName]; + super.handleStateSet(); + +} + + } +} \ No newline at end of file diff --git a/frameworks/projects/Basic/src/main/royale/org/apache/royale/routing/RouteToState.as b/frameworks/projects/Basic/src/main/royale/org/apache/royale/routing/RouteToState.as index df4ef7c..cbe9d96 100644 --- a/frameworks/projects/Basic/src/main/royale/org/apache/royale/routing/RouteToState.as +++ b/frameworks/projects/Basic/src/main/royale/org/apache/royale/routing/RouteToState.as @@ -52,8 +52,14 @@ package org.apache.royale.routing */ private function attachStateEvent():void { - assert(host.host is IStatesObject,"syncState can only be used on IStatesObjects"); - (host.host as IStatesObject).addEventListener("currentStateChange",handleStateChange); + var statesObject:IStatesObject = component; + if(!statesObject) + { +assert(host.host is IStatesObject,"syncState can only be used on IStatesObjects"); +statesObject = host.host as IStatesObject; + + } + statesObject.addEventListener("currentStateChange",handleStateChange); } private function handleStateChange():void @@ -61,7 +67,13 @@ package org.apache.royale.routing if(settingState)// don't do anything if the event was fired as a result of a hash. return; //TODO what about a parent path - host.routeState.path = (host.host as IStatesObject).currentState; + var statesObject:IStatesObject = component; + if(!statesObject) + { +
[royale-asjs] 04/05: Fixed router bugs
This is an automated email from the ASF dual-hosted git repository. harbs pushed a commit to branch feature/router in repository https://gitbox.apache.org/repos/asf/royale-asjs.git commit ed14387aa0b6c79dffb0055d76ebab9d7e1a3528 Author: Harbs AuthorDate: Sun Feb 2 00:31:15 2020 +0200 Fixed router bugs --- .../Basic/src/main/resources/basic-manifest.xml| 1 + .../org/apache/royale/routing/RouteToState.as | 36 +- .../royale/org/apache/royale/routing/Router.as | 20 ++-- .../org/apache/royale/routing/SetRouteTitle.as | 1 + 4 files changed, 26 insertions(+), 32 deletions(-) diff --git a/frameworks/projects/Basic/src/main/resources/basic-manifest.xml b/frameworks/projects/Basic/src/main/resources/basic-manifest.xml index 0f01dc0..7f898e4 100644 --- a/frameworks/projects/Basic/src/main/resources/basic-manifest.xml +++ b/frameworks/projects/Basic/src/main/resources/basic-manifest.xml @@ -285,6 +285,7 @@ + diff --git a/frameworks/projects/Basic/src/main/royale/org/apache/royale/routing/RouteToState.as b/frameworks/projects/Basic/src/main/royale/org/apache/royale/routing/RouteToState.as index cbe9d96..6a6fcd3 100644 --- a/frameworks/projects/Basic/src/main/royale/org/apache/royale/routing/RouteToState.as +++ b/frameworks/projects/Basic/src/main/royale/org/apache/royale/routing/RouteToState.as @@ -52,28 +52,15 @@ package org.apache.royale.routing */ private function attachStateEvent():void { - var statesObject:IStatesObject = component; - if(!statesObject) - { -assert(host.host is IStatesObject,"syncState can only be used on IStatesObjects"); -statesObject = host.host as IStatesObject; - - } - statesObject.addEventListener("currentStateChange",handleStateChange); - + getStateComponent().addEventListener("currentStateChange",handleStateChange); } private function handleStateChange():void { if(settingState)// don't do anything if the event was fired as a result of a hash. return; //TODO what about a parent path - var statesObject:IStatesObject = component; - if(!statesObject) - { -statesObject = host.host as IStatesObject; - } - host.routeState.path = statesObject.currentState; + host.routeState.path = getStateComponent().currentState; host.setState(); } private function hashNeeded(ev:ValueEvent):void @@ -96,7 +83,7 @@ package org.apache.royale.routing if(delim) trailing = hash.slice(hash.indexOf(delim)); - ev.value = parentPath + (host.host as IStatesObject).currentState + trailing; + ev.value = parentPath + getStateComponent().currentState + trailing; } private function hashReceived(ev:ValueEvent):void { @@ -119,17 +106,24 @@ package org.apache.royale.routing */ private function stateChanged(ev:ValueEvent):void { +settingState = true; +//TODO what about using the base name of the path? +getStateComponent().currentState = host.routeState.path; +settingState = false; + +} +/** + * @royaleignorecoercion org.apache.royale.core.IStatesObject + */ +private function getStateComponent():IStatesObject +{ var statesObject:IStatesObject = component; if(!statesObject) { assert(host.host is IStatesObject,"syncState can only be used on IStatesObjects"); statesObject = host.host as IStatesObject; } -settingState = true; -//TODO what about using the base name of the path? -statesObject.currentState = host.routeState.path; -settingState = false; - + return statesObject; } /** * The component whose state we sync. (Defaults to the strand of the router.) diff --git a/frameworks/projects/Basic/src/main/royale/org/apache/royale/routing/Router.as b/frameworks/projects/Basic/src/main/royale/org/apache/royale/routing/Router.as index 55b0881..05ad347 100644 --- a/frameworks/projects/Basic/src/main/royale/org/apache/royale/routing/Router.as +++ b/frameworks/projects/Basic/src/main/royale/org/apache/royale/routing/Router.as @@ -55,17 +55,10 @@ package org.apache.royale.routing { } -/** - * Use this to automatically sync the state of the strand. - * This only works for the state property of the RouterState. - * It also assumes that the strand is an IStatesObject. - * For this to work correctly, it's usually assumed that the bead is attached to the application View - * @langversion 3.0 - * @playerversion Flash 10.2 - * @playerversion AIR 2.6 - * @productversion Royale 0.9.7 - */ -public var host:IStrand; +public function get host():IStrand +{ + return _strand; +} private var _strand:IStrand; public function set strand(value:IStrand):void
[royale-asjs] branch feature/router updated (204a154 -> bf72c82)
This is an automated email from the ASF dual-hosted git repository. harbs pushed a change to branch feature/router in repository https://gitbox.apache.org/repos/asf/royale-asjs.git. from 204a154 added default route add 38738b0 Exclude SVGBase from swf sources to avoid compiler error add 82ba63b jewel-tooltip: listen on change events from target and uses ROLL events instead MOUSE counterparts to avoid trigger on childs of the listener object (solves #696) add dd83c65 jewel-iconbutton and togglebutton: add missing bindable properties and docs add f337f42 jewel-tooltip: decouple remove of tip from ROLL_OUT and make public so we can remove from outside (used in #697) add 23813cb Missing imports add e53abf6 tour-de-jewel: added tooltip remove example from renderer (exposed in #697) add bc8995d jewel-texinputbase; ENTER key press was not working in all situations. capture needs to be true add 8b354b8 WIP on swf Graphics emulation. add f3a6c01 mxmlitemrenderer: add missing states support add 98da05e jewel-examples: Add todomvc example. Fully functional, but need styling add 223763c todomvc-jewel-example: fix some functionality and add a bit some styles. add b4bd64c Merge branch 'develop' of https://github.com/apache/royale-asjs into develop add ad82c50 mxmlitemrenderer: separate states to a new class MXMLStatesItemRenderer, and make StyledMXMLItemRenderer extend that class so Jewel renderers has state support by default add cb044ed mxmlstatesrenderer: clean imports add 42eb35e tour-de-jewel: fix tag add 93c5612 ToolTipRemovalWhenItemRemoved: new bead to abstract best practice showcased in #697 add a9b39f2 html: add header and section tags add 9725763 html: add footer tag add 5b1f34e changed ISelectionModel to IDataProviderModel (in CollectionChangeUpdateForArrayListData) add ad9c811 Added models to manifest add 8c2f75b Merge pull request #698 from tzivz/develop add c65014a jewel-textinput: add setFocus() method to jewel text based inputs add ee93671 todomvc-jewel-example: near completion add fc94093 todomvc-jewel-example: left from last commit add 8ed79a4 Move ToolTipRemovalWhenItemRemoved to Basic. add 2f8a439 MultiSelectionCollectionViewModel small change add fbcd4c1 Prevent RTE when dragging out of a browser window add b4b4e1f Merge pull request #699 from tzivz/develop add 9e4bc4f todomvc-jewel-example: fix some issues when filtering and styles and add foooter credits add 579962f Fix the typing of graphicsRenderTarget in the JS IGraphicsTarget interface - specifically as 'svg' element tag add a9c66d7 allow DateField dropdown to close when the selectedDate is clicked on. Should fix #700 add 4a11e5e Change Calender icon in DateFieldView.as add c869c22 jewel-tooltip: organize imports add e67f344 todomvc-jewel-example: refactor to separate pieces and make it more "mvc" add 030b618 todomvc-jewel-example: added routing add 3209e52 shared-object: Move LSO to Storage since is not flex add a481208 mxroyale-Objectutil: fix failing test in CruxQuickStartBasic due to "unreachable code" error in ObjectUtil.as add 97cb962 Revert "shared-object: Move LSO to Storage since is not flex" add ec306f9 jewel-layout-basic: position needs to be forced. Still need so JS calcs for parent height add eff29bf left from last commit add 4901f84 left from last committodomvc-jewel-example: persist data in local storage with SharedObject add a27bb5e jewel-todomvc-example: some latest changes add d536238 jewel-datagrid: fix columnWidths broken by latest commits (fix #704) new cc7b2d5 Merge branch 'develop' into feature/router new 2b1b15c work on states add e836539 fix Jewel's DateChooserModel add bf8cc1f jewel-checkbox: add checkWidth and checkHeight properties to allow size the check view part add 8d21ea9 jewel-checkbox: date time is not sufficient to get a unique name for selector add 065fcf5 tour-de-jewel: added checkbox sizes, not sure if this work for IE11 add a0db2c0 Quick fix for swf build of Jewel add 5be3213 Avoid error in IE11 with CSSStyleSheet.insertRule non-optional second parameter add 0f7153b addDynamicSelector: fix for IE11, also remove from CheckBoxView add 75b759b tour-de-jewel: latest fixes. - Jewel CheckBox look change to mimic todomvc style - toggleAll change style if all items is marked/unmaked - Item edit mode now exits with "click outside" - Item edit mode now removes the item if user removes all text - Finish little style things through all example to match todomvc as much as possible add 58d0c95 TodoMVC readme.md add 4f97426 Update readme.md add 2b2951e todomvc-jewel: fix a bug where click outside was not working on sibling renderers due to useCaptu
[royale-asjs] 01/05: Merge branch 'develop' into feature/router
This is an automated email from the ASF dual-hosted git repository. harbs pushed a commit to branch feature/router in repository https://gitbox.apache.org/repos/asf/royale-asjs.git commit cc7b2d5401b42dd8d58cda0c296d3c5bf51f7de8 Merge: 204a154 d536238 Author: Harbs AuthorDate: Fri Jan 31 14:26:32 2020 +0200 Merge branch 'develop' into feature/router examples/jewel/pom.xml | 188 + .../jewel/todomvc/asconfig.json| 40 +- examples/jewel/todomvc/build.xml | 56 ++ examples/jewel/todomvc/pom.xml | 109 +++ .../todomvc/src/main/config/compile-app-config.xml | 46 + .../src/main/resources/todomvc-index-template.html | 30 + .../todomvc/src/main/resources/todomvc-styles.css | 345 examples/jewel/todomvc/src/main/royale/App.mxml| 54 ++ .../jewel/todomvc/controllers/TodoController.as| 234 ++ .../main/royale/jewel/todomvc/events/TodoEvent.as | 69 ++ .../main/royale/jewel/todomvc/models/TodoModel.as | 157 .../jewel/todomvc/renderers/TodoItemRenderer.mxml | 139 +++ .../royale/jewel/todomvc/views/TodoFooter.mxml | 103 +++ .../royale/jewel/todomvc/views/TodoHeader.mxml | 75 ++ .../jewel/todomvc/views/TodoListSection.mxml | 112 +++ .../src/main/royale/jewel/todomvc/vos/TodoVO.as| 50 +- examples/jewel/todomvc/todomvc.as3proj | 115 +++ examples/pom.xml | 1 + .../ASDoc/src/main/config/asdoc-swf-config.xml | 1 + .../royale/itemRenderers/IconListItemRenderer.mxml | 7 + .../Basic/src/main/resources/basic-manifest.xml| 7 + .../apache/royale/core/StyledMXMLItemRenderer.as | 4 +- .../org/apache/royale/display/UIGraphicsBase.as| 63 ++ .../apache/royale/html/accessories/ToolTipBead.as | 46 +- .../accessories/ToolTipRemovalWhenItemRemoved.as | 80 ++ .../CollectionChangeUpdateForArrayListData.as | 5 +- .../org/apache/royale/html/beads/DateFieldView.as | 5 +- .../royale/html/beads/models/DateChooserModel.as | 22 +- .../models/MultiSelectionCollectionViewModel.as| 4 +- .../royale/html/supportClasses/MXMLItemRenderer.as | 9 +- .../html/supportClasses/MXMLStatesItemRenderer.as | 184 .../projects/Core/src/main/royale/CoreClasses.as | 1 + .../org/apache/royale/core/IDateChooserModel.as| 14 + .../royale/org/apache/royale/core/IToolTipBead.as} | 35 +- .../main/royale/org/apache/royale/geom/Matrix.as | 33 + .../html/beads/controllers/DragMouseController.as | 22 +- .../Graphics/src/main/royale/GraphicsClasses.as| 21 +- .../royale/org/apache/royale/display/BitmapData.as | 358 .../royale/org/apache/royale/display/CapsStyle.as | 46 + .../royale/org/apache/royale/display/Graphics.as | 931 + .../apache/royale/display/GraphicsBitmapFill.as| 97 +++ .../org/apache/royale/display/GraphicsEndFill.as | 40 + .../apache/royale/display/GraphicsGradientFill.as | 256 ++ .../org/apache/royale/display/GraphicsSolidFill.as | 67 ++ .../org/apache/royale/display/GraphicsStroke.as| 169 .../org/apache/royale/display/IGraphicsData.as | 29 + .../org/apache/royale/display/IGraphicsFill.as | 35 + .../org/apache/royale/display/IGraphicsStroke.as | 31 + .../org/apache/royale/display/IGraphicsTarget.as | 42 + .../apache/royale/display/InterpolationMethod.as | 46 + .../apache/royale/display/JPEGEncoderOptions.as| 40 + .../royale/org/apache/royale/display/JointStyle.as | 46 + .../org/apache/royale/display/LineScaleMode.as | 52 ++ .../org/apache/royale/display/PNGEncoderOptions.as | 41 + .../royale/display/js/JSRuntimeGraphicsStore.as| 111 +++ .../apache/royale/display/js/createGraphicsSVG.as | 37 + .../apache/royale/display/js/nonNullParamError.as | 30 + .../HTML/src/main/resources/html-manifest.xml | 3 + .../org/apache/royale/html/elements/Footer.as} | 63 +- .../org/apache/royale/html/elements/Header.as} | 63 +- .../org/apache/royale/html/elements/Section.as}| 63 +- .../projects/Jewel/src/main/resources/defaults.css | 2 +- .../royale/org/apache/royale/jewel/IconButton.as | 13 +- .../royale/org/apache/royale/jewel/TextInput.as| 2 +- .../royale/org/apache/royale/jewel/ToggleButton.as | 11 +- .../apache/royale/jewel/beads/controls/ToolTip.as | 39 +- .../royale/jewel/beads/views/DataGridView.as | 2 +- .../supportClasses/textinput/TextInputBase.as | 21 +- .../Jewel/src/main/sass/components/_layout.sass| 2 +- .../MXRoyale/src/main/royale/mx/geom/Matrix.as | 3 - .../src/main/royale/mx/utils/ObjectUtil.as | 2 - 71 files changed, 5063 insertions(+), 216 deletions(-) diff --cc frameworks/projects/Basic/src/main/resources/basic-manifest.xml index 4fd27c9,d1e5220..0f01dc0 --- a/frameworks/projects/Basic/src/main/resources/basic-manifest.xml +++ b/frameworks/projects/Basic/src/main/res
[royale-asjs] 03/05: Merge branch 'develop' into feature/router
This is an automated email from the ASF dual-hosted git repository. harbs pushed a commit to branch feature/router in repository https://gitbox.apache.org/repos/asf/royale-asjs.git commit 74034942b78a6985ad140a178aceed7c50045080 Merge: 2b1b15c 2b2951e Author: Harbs AuthorDate: Sat Feb 1 19:52:01 2020 +0200 Merge branch 'develop' into feature/router examples/jewel/todomvc/readme.md | 45 +++ .../todomvc/src/main/resources/todomvc-styles.css | 36 ++ .../jewel/todomvc/controllers/TodoController.as| 24 ++-- .../main/royale/jewel/todomvc/events/TodoEvent.as | 2 +- .../main/royale/jewel/todomvc/models/TodoModel.as | 4 +- .../jewel/todomvc/renderers/TodoItemRenderer.mxml | 41 -- .../royale/jewel/todomvc/views/TodoHeader.mxml | 12 +- .../src/main/royale/CheckBoxPlayGround.mxml| 15 +++ .../apache/royale/utils/css/addDynamicSelector.as | 13 +- .../projects/Jewel/src/main/resources/defaults.css | 14 +-- .../projects/Jewel/src/main/royale/JewelClasses.as | 2 +- .../royale/org/apache/royale/jewel/CheckBox.as | 46 ++- .../royale/jewel/beads/models/DateChooserModel.as | 19 +++ .../royale/jewel/beads/views/CheckBoxView.as | 140 +++-- .../Jewel/src/main/sass/components/_checkbox.sass | 21 ++-- 15 files changed, 349 insertions(+), 85 deletions(-)
[royale-asjs] 05/05: Should work but the states of the buttons are messed up
This is an automated email from the ASF dual-hosted git repository. harbs pushed a commit to branch feature/router in repository https://gitbox.apache.org/repos/asf/royale-asjs.git commit bf72c82671ed5250c5ee8a070015ff862342fb8d Author: Harbs AuthorDate: Sun Feb 2 00:31:37 2020 +0200 Should work but the states of the buttons are messed up --- examples/jewel/todomvc/asconfig.json | 2 +- .../jewel/todomvc/controllers/TodoController.as| 39 - .../main/royale/jewel/todomvc/events/TodoEvent.as | 1 - .../main/royale/jewel/todomvc/models/TodoModel.as | 26 ++- .../jewel/todomvc/renderers/TodoItemRenderer.mxml | 8 ++-- .../royale/jewel/todomvc/views/TodoFooter.mxml | 50 ++ .../jewel/todomvc/views/TodoListSection.mxml | 36 +++- 7 files changed, 66 insertions(+), 96 deletions(-) diff --git a/examples/jewel/todomvc/asconfig.json b/examples/jewel/todomvc/asconfig.json index 4b6259e..14ab179 100644 --- a/examples/jewel/todomvc/asconfig.json +++ b/examples/jewel/todomvc/asconfig.json @@ -20,7 +20,7 @@ "config": "royale", "compilerOptions": { "debug": false, -"targets": ["JSRoyale","SWF"], +"targets": ["JSRoyale"], "source-map": true }, "additionalOptions": "-remove-circulars -js-output-optimization=skipAsCoercions", diff --git a/examples/jewel/todomvc/src/main/royale/jewel/todomvc/controllers/TodoController.as b/examples/jewel/todomvc/src/main/royale/jewel/todomvc/controllers/TodoController.as index 304f64f..f63d397 100644 --- a/examples/jewel/todomvc/src/main/royale/jewel/todomvc/controllers/TodoController.as +++ b/examples/jewel/todomvc/src/main/royale/jewel/todomvc/controllers/TodoController.as @@ -54,23 +54,18 @@ package jewel.todomvc.controllers */ public function set strand(value:IStrand):void { _strand = value; - IEventDispatcher(_strand).addEventListener(TodoEvent.ADD_TODO_ITEM, addTodoItem); - IEventDispatcher(_strand).addEventListener(TodoEvent.TOGGLE_ALL_COMPLETE, toggleAllComplete); - IEventDispatcher(_strand).addEventListener(TodoEvent.REMOVE_COMPLETED, removeCompleted); - IEventDispatcher(_strand).addEventListener(TodoEvent.REFRESH_LIST, refreshList); - IEventDispatcher(_strand).addEventListener(TodoEvent.REFRESH_LIST_BY_USER, refreshListByUser); - IEventDispatcher(_strand).addEventListener(TodoEvent.ITEM_STATE_CHANGED, itemStateChangedHandler); - IEventDispatcher(_strand).addEventListener(TodoEvent.ITEM_LABEL_CHANGED, itemLabelChangedHandler); - IEventDispatcher(_strand).addEventListener(TodoEvent.ITEM_REMOVED, itemRemovedHandler); + (_strand as IEventDispatcher).addEventListener(TodoEvent.ADD_TODO_ITEM, addTodoItem); + (_strand as IEventDispatcher).addEventListener(TodoEvent.TOGGLE_ALL_COMPLETE, toggleAllComplete); + (_strand as IEventDispatcher).addEventListener(TodoEvent.REMOVE_COMPLETED, removeCompleted); + (_strand as IEventDispatcher).addEventListener(TodoEvent.REFRESH_LIST, refreshList); + (_strand as IEventDispatcher).addEventListener(TodoEvent.ITEM_STATE_CHANGED, itemStateChangedHandler); + (_strand as IEventDispatcher).addEventListener(TodoEvent.ITEM_LABEL_CHANGED, itemLabelChangedHandler); + (_strand as IEventDispatcher).addEventListener(TodoEvent.ITEM_REMOVED, itemRemovedHandler); model = _strand.getBeadByType(IBeadModel) as TodoModel; // retrieve local items and use it if exists - var localAllItems:Array = model.storage.data["items"]; - if(localAllItems) - model.allItems = new ArrayList(localAllItems); - else - model.allItems = new ArrayList(); + model.allItems = new ArrayList(model.getItemStore()); model.setUpFilteredCollections(); model.listItems = model.allItems; @@ -88,8 +83,7 @@ package jewel.todomvc.controllers */ protected function saveDataToLocal():void { try { - model.storage.data["items"] = model.allItems.source; - model.storage.flush(); + model.setItemStore(model.allItems.source);
[MAVEN-BUILD] Royale-asjs - Build # 2612 - Still Failing
The Apache Jenkins build system has built Royale-asjs (build #2612) Status: Still Failing Check console output at https://builds.apache.org/job/Royale-asjs/2612/ to view the results.
[royale-website] branch asf-site updated: todomvc-jewel: fix a bug where click outside was not working on sibling renderers due to useCapture not true
This is an automated email from the ASF dual-hosted git repository. carlosrovira pushed a commit to branch asf-site in repository https://gitbox.apache.org/repos/asf/royale-website.git The following commit(s) were added to refs/heads/asf-site by this push: new 8e5d6ff todomvc-jewel: fix a bug where click outside was not working on sibling renderers due to useCapture not true 8e5d6ff is described below commit 8e5d6fff5f077e525db0f62f22048896bc34ca02 Author: Carlos Rovira AuthorDate: Sat Feb 1 17:19:54 2020 +0100 todomvc-jewel: fix a bug where click outside was not working on sibling renderers due to useCapture not true --- todomvc-jewel/App.js | 4 ++-- todomvc-jewel/App.js.map | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/todomvc-jewel/App.js b/todomvc-jewel/App.js index a9c6f85..976cbf7 100644 --- a/todomvc-jewel/App.js +++ b/todomvc-jewel/App.js @@ -677,8 +677,8 @@ xt.prototype.flush=xt.prototype.flush;xt.prototype.clear=function(){this.Uc&&(th function At(a){a.Vc=window.localStorage;if(!a.Vc&&'undefined'!=typeof Storage){var b=window.location.pathname.replace(/(^..)(:)/,'$1$$');window.location.href=window.location.protocol+'//127.0.0.1'+b;a.Vc=window.localStorage}if(!a.Vc)throw Error('local storage not supported');if(b=a.Vc.getItem(a.jj+'::'+a.kj))b=Q(window.atob(b)),b=new Uint8Array(b.split('').map(function(a){return a.charCodeAt(0)>>>0})),a.Uc=(new Ct(b.buffer)).Ia()}xt.prototype.Kb=function(){this.Uc||(this.Uc={});return this.Uc}; Object.defineProperties(xt.prototype,{data:{get:xt.prototype.Kb}});xt.prototype.g={names:[{name:'SharedObject',h:be,kind:A}]};xt.prototype.i=function(){return{accessors:function(){return{data:{type:t,access:E,declaredBy:be}}},methods:function(){return{'|getLocal':{type:be,declaredBy:be,parameters:function(){return[u,!1,u,!0,q,!0]}},SharedObject:{type:'',declaredBy:be},flush:{type:u,declaredBy:be,parameters:function(){return[B,!0]}},clear:{type:H,declaredBy:be};xt.prototype.j=10;funct [...] Dt.prototype.i=function(){return{accessors:function(){return{compareFunction:{type:Va,access:F,declaredBy:Ie},fields:{type:p,access:F,declaredBy:Ie},unique:{type:q,access:E,declaredBy:Ie}}},methods:function(){return{findItem:{type:B,declaredBy:Ie,parameters:function(){return[p,!1,t,!1,u,!1,q,!0,Va,!0]}},propertyAffectsSort:{type:q,declaredBy:Ie,parameters:function(){return[u,!1]}},reverse:{type:H,declaredBy:Ie},sort:{type:H,declaredBy:Ie,parameters:function(){return[p,!1]}};Dt.protot [...] -1,nb,!0,'$ID3',0,0,null],0,2,'rollover',this.xa,'rollout',this.Ua])}N(Et,rr);M(Fd,Et);Et.prototype.gj=!1;Et.prototype.Dl=function(a){this.dispatchEvent(new ns(ud,this.item,null,a.target.selected))};Et.prototype.changeItemState=Et.prototype.Dl;Et.prototype.Qn=function(){window.removeEventListener(Ub,W(this.ie,this,Xb),!1);this.dispatchEvent(new ns(td,this.item))};Et.prototype.removeItemClickHandler=Et.prototype.Qn;Et.prototype.ho=function(){this.ie()};Et.prototype.updateLabelAndExit=Et.pr [...] -Et.prototype.Nl=function(){this.editfield.text=this.description.text;this.currentState='editing';this.destroy_btn.visible=!1;this.editfield.Yn();window.addEventListener(Ub,W(this.ie,this,Xb),!1)};Et.prototype.goToEditMode=Et.prototype.Nl;Et.prototype.ie=function(){window.removeEventListener(Ub,W(this.ie,this,Xb),!1);this.item.label!=this.editfield.text&&this.dispatchEvent(new ns(sd,this.item,this.editfield.text));this.currentState=he;this.gj&&(this.destroy_btn.visible=!0)}; +1,nb,!0,'$ID3',0,0,null],0,2,'rollover',this.xa,'rollout',this.Ua])}N(Et,rr);M(Fd,Et);Et.prototype.gj=!1;Et.prototype.Dl=function(a){this.dispatchEvent(new ns(ud,this.item,null,a.target.selected))};Et.prototype.changeItemState=Et.prototype.Dl;Et.prototype.Qn=function(){document.removeEventListener(Ub,W(this.ie,this,Xb),!0);this.dispatchEvent(new ns(td,this.item))};Et.prototype.removeItemClickHandler=Et.prototype.Qn;Et.prototype.ho=function(){this.ie()};Et.prototype.updateLabelAndExit=Et. [...] +Et.prototype.Nl=function(){this.editfield.text=this.description.text;this.currentState='editing';this.destroy_btn.visible=!1;this.editfield.Yn();document.addEventListener(Ub,W(this.ie,this,Xb),!0)};Et.prototype.goToEditMode=Et.prototype.Nl;Et.prototype.ie=function(){document.removeEventListener(Ub,W(this.ie,this,Xb),!0);this.item.label!=this.editfield.text&&this.dispatchEvent(new ns(sd,this.item,this.editfield.text));this.currentState=he;this.gj&&(this.destroy_btn.visible=!0)}; Et.prototype.commitLabelChanges=Et.prototype.ie;Et.prototype.Tn=function(){this.gj=!0;this.currentState==he&&(this.destroy_btn.visible=!0)};Et.prototype.rollOverHandler=Et.prototype.Tn;Et.prototype.Sn=function(){this.gj=!1;this.currentState==he&&(this.destroy_btn.visible=!1)};Et.prototype.rollOutHandler=Et.prototype.Sn;Et.prototype.Vp=function(){return P(this.data,Is)};Object.defineProperties(Et.prototype,{item:{get:Et.prototype.Vp}});Et.prototype.xa=function(a){this.Tn(a)};Et.prototype. [
[royale-asjs] branch develop updated: todomvc-jewel: fix a bug where click outside was not working on sibling renderers due to useCapture not true
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 2b2951e todomvc-jewel: fix a bug where click outside was not working on sibling renderers due to useCapture not true 2b2951e is described below commit 2b2951e471ccee2a315b03a8a2c1926f45bdd599 Author: Carlos Rovira AuthorDate: Sat Feb 1 17:18:07 2020 +0100 todomvc-jewel: fix a bug where click outside was not working on sibling renderers due to useCapture not true --- .../main/royale/jewel/todomvc/renderers/TodoItemRenderer.mxml | 11 ++- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/examples/jewel/todomvc/src/main/royale/jewel/todomvc/renderers/TodoItemRenderer.mxml b/examples/jewel/todomvc/src/main/royale/jewel/todomvc/renderers/TodoItemRenderer.mxml index 6cd6f26..325215b 100644 --- a/examples/jewel/todomvc/src/main/royale/jewel/todomvc/renderers/TodoItemRenderer.mxml +++ b/examples/jewel/todomvc/src/main/royale/jewel/todomvc/renderers/TodoItemRenderer.mxml @@ -59,7 +59,7 @@ limitations under the License. public function removeItemClickHandler(event:MouseEvent):void { COMPILE::JS { -window.removeEventListener('click', commitLabelChanges, false); +document.removeEventListener('click', commitLabelChanges, true); } dispatchEvent(new TodoEvent(TodoEvent.ITEM_REMOVED, item)); } @@ -83,19 +83,19 @@ limitations under the License. COMPILE::JS { -window.addEventListener('click', commitLabelChanges, false); +document.addEventListener('click', commitLabelChanges, true); } } /** - * remove window listener to stop listening click events. If user made changes to label, commit + * remove document listener to stop listening click events. If user made changes to label, commit * changes to the todo item and exit 'editing' state. * Make destroy button visible if mouse is over renderer. */ public function commitLabelChanges():void { COMPILE::JS { -window.removeEventListener('click', commitLabelChanges, false); +document.removeEventListener('click', commitLabelChanges, true); } if(item.label != editfield.text) dispatchEvent(new TodoEvent(TodoEvent.ITEM_LABEL_CHANGED, item, editfield.text)); @@ -144,7 +144,8 @@ limitations under the License. text="{item ? item.label : ''}" multiline="true" visible.normal="true" visible.editing="false" className="{item ? (item.done ? 'todolabel completed' : 'todolabel') : 'todolabel' }" -doubleClick="goToEditMode(event)"/> +doubleClick="goToEditMode(event)" +/>
[MAVEN-BUILD] Royale-asjs - Build # 2611 - Still Failing
The Apache Jenkins build system has built Royale-asjs (build #2611) Status: Still Failing Check console output at https://builds.apache.org/job/Royale-asjs/2611/ to view the results.
[MAVEN-BUILD] Royale-asjs - Build # 2610 - Still Failing
The Apache Jenkins build system has built Royale-asjs (build #2610) Status: Still Failing Check console output at https://builds.apache.org/job/Royale-asjs/2610/ to view the results.
[royale-asjs] branch develop updated: Update readme.md
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 4f97426 Update readme.md 4f97426 is described below commit 4f974267511963e146965fb5fe49df6c67f127fc Author: Carlos Rovira AuthorDate: Sat Feb 1 11:01:29 2020 +0100 Update readme.md --- examples/jewel/todomvc/readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/jewel/todomvc/readme.md b/examples/jewel/todomvc/readme.md index b07fdab..85b8eb4 100644 --- a/examples/jewel/todomvc/readme.md +++ b/examples/jewel/todomvc/readme.md @@ -2,7 +2,7 @@ > Apache Royale™ is a productive, open-source frontend application technology > that lets you code in MXML & AS3 and output to different formats, included > Javascript and SWF. -> _[Apache Royale™ Website - https://royale.apache.org)_ +> _[Apache Royale™ Website](https://royale.apache.org)_ ## Learning Apache Royale
[royale-asjs] branch develop updated: TodoMVC readme.md
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 58d0c95 TodoMVC readme.md 58d0c95 is described below commit 58d0c95093fdf00241a762a5f8f343f912e6e870 Author: Carlos Rovira AuthorDate: Sat Feb 1 11:00:48 2020 +0100 TodoMVC readme.md --- examples/jewel/todomvc/readme.md | 45 1 file changed, 45 insertions(+) diff --git a/examples/jewel/todomvc/readme.md b/examples/jewel/todomvc/readme.md new file mode 100644 index 000..b07fdab --- /dev/null +++ b/examples/jewel/todomvc/readme.md @@ -0,0 +1,45 @@ +# Apache Royale TodoMVC Example + +> Apache Royale™ is a productive, open-source frontend application technology that lets you code in MXML & AS3 and output to different formats, included Javascript and SWF. + +> _[Apache Royale™ Website - https://royale.apache.org)_ + + +## Learning Apache Royale + +The [Apache Royale getting started documentation](https://apache.github.io/royale-docs/get-started) is a great way to get started. + +Here are some links you may find helpful: + +* [Documentation](https://apache.github.io/royale-docs) +* [API Reference](https://royale.apache.org/asdoc) +* [Blog](https://royale.apache.org/blog) +* [Apache Royale on GitHub](https://github.com/apache/royale-asjs/wiki/Apache-Royale-Source-Code-Repositories) +* [Support (Dev Mailing List)](https://royale.apache.org/mailing-lists) +* [FAQ](https://royale.apache.org/faq/) +* [Get Involved](https://royale.apache.org/get-involved) + +Articles and guides from the community: + +* [Royale Examples](https://royale.apache.org/category/royale-examples) + +Apache Royale social media: + +* [Twitter](https://twitter.com/apacheroyale) +* [Facebook](https://facebook.com/ApacheRoyaleSDK/) +* [LinkedIn](https://www.linkedin.com/groups/12118437) + +Get help from other Apache Royale users: + +* [Apache Royale on StackOverflow](https://stackoverflow.com/questions/tagged/apache-royale) +* [Discussion Forum (User Mailing List)](https://royale.apache.org/mailing-lists) + +_If you have other helpful links to share, or find any of the links above no longer work, please [let us know](https://github.com/apache/royale-asjs/issues)._ + + +## Running + +The app is built upon [AS3](https://apache.github.io/royale-docs/features/as3) and [MXML](https://apache.github.io/royale-docs/features/mxml) languages and compiled with the Apache Royale Compiler. +We use [Maven](https://maven.apache.org) and [ANT](https://ant.apache.org) to build the project. + +To run the app, go to the generated code and run `index.html` or visit [https://royale.apache.org/todomvc-jewel].