You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@royale.apache.org by ah...@apache.org on 2020/01/06 07:22:47 UTC
[royale-asjs] branch develop updated: ensure selectedIndex is in
range. Should fix #652
This is an automated email from the ASF dual-hosted git repository.
aharui 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 e849758 ensure selectedIndex is in range. Should fix #652
e849758 is described below
commit e849758e284751beaac2ece1cf8d561d3992e22a
Author: Alex Harui <ah...@apache.org>
AuthorDate: Sun Jan 5 23:22:31 2020 -0800
ensure selectedIndex is in range. Should fix #652
---
.../main/royale/mx/controls/listClasses/AdvancedListBase.as | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/frameworks/projects/MXRoyale/src/main/royale/mx/controls/listClasses/AdvancedListBase.as b/frameworks/projects/MXRoyale/src/main/royale/mx/controls/listClasses/AdvancedListBase.as
index da8649b..886283e 100644
--- a/frameworks/projects/MXRoyale/src/main/royale/mx/controls/listClasses/AdvancedListBase.as
+++ b/frameworks/projects/MXRoyale/src/main/royale/mx/controls/listClasses/AdvancedListBase.as
@@ -2597,6 +2597,17 @@ public class AdvancedListBase extends ListBase /* extends UIComponent
_selectable = value;
}
+ /**
+ * @private
+ * @royaleignorecoercion org.apache.royale.core.ISelectionModel
+ */
+ override public function set selectedIndex(value:int):void
+ {
+ if (collection)
+ value = Math.min(collection.length - 1, value);
+ super.selectedIndex = value;
+ }
+
//----------------------------------
// showDataTips
//----------------------------------