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 2019/12/19 03:26:13 UTC
[royale-asjs] branch develop updated: handle late changing label
names. Fixes #627
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 ff3d570 handle late changing label names. Fixes #627
ff3d570 is described below
commit ff3d570f04e3504e7cfa685dad7400db80199673
Author: Alex Harui <ah...@apache.org>
AuthorDate: Wed Dec 18 19:25:55 2019 -0800
handle late changing label names. Fixes #627
---
.../src/main/royale/mx/containers/beads/TabNavigatorView.as | 2 ++
frameworks/projects/MXRoyale/src/main/royale/mx/core/Container.as | 6 +++++-
2 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/frameworks/projects/MXRoyale/src/main/royale/mx/containers/beads/TabNavigatorView.as b/frameworks/projects/MXRoyale/src/main/royale/mx/containers/beads/TabNavigatorView.as
index c924f55..28d6b37 100644
--- a/frameworks/projects/MXRoyale/src/main/royale/mx/containers/beads/TabNavigatorView.as
+++ b/frameworks/projects/MXRoyale/src/main/royale/mx/containers/beads/TabNavigatorView.as
@@ -164,6 +164,8 @@ public class TabNavigatorView extends GroupView
{
var child:Container = contentArea.getElementAt(i) as Container;
tabDP.push({ label: child.label});
+ // run this again if the label changes
+ child.addEventListener("labelChanged", childrenAddedHandler);
}
(tabBar as TabBar).dataProvider = tabDP;
if ((tabBar.model as ISelectionModel).selectedIndex == -1)
diff --git a/frameworks/projects/MXRoyale/src/main/royale/mx/core/Container.as b/frameworks/projects/MXRoyale/src/main/royale/mx/core/Container.as
index 58ded37..2667c83 100644
--- a/frameworks/projects/MXRoyale/src/main/royale/mx/core/Container.as
+++ b/frameworks/projects/MXRoyale/src/main/royale/mx/core/Container.as
@@ -738,7 +738,11 @@ public class Container extends UIComponent
}
public function set label(value:String):void
{
- _label = value;
+ if (value != _label)
+ {
+ _label = value;
+ dispatchEvent(new Event("labelChanged"));
+ }
}
[Inspectable(category="General")]