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/08/14 06:02:21 UTC
[royale-asjs] 06/08: setters cannot assume that mxmlDocument is set
because they can get set before the component is added to the document
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
commit 2b04c203a6ca7afe4ac008b898df8e315fb5d8d5
Author: Alex Harui <ah...@apache.org>
AuthorDate: Tue Aug 13 20:11:19 2019 -0700
setters cannot assume that mxmlDocument is set because they can get set before the component is added to the document
---
.../projects/MXRoyale/src/main/royale/mx/controls/RadioButton.as | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/frameworks/projects/MXRoyale/src/main/royale/mx/controls/RadioButton.as b/frameworks/projects/MXRoyale/src/main/royale/mx/controls/RadioButton.as
index 46ab092..36fca0f 100644
--- a/frameworks/projects/MXRoyale/src/main/royale/mx/controls/RadioButton.as
+++ b/frameworks/projects/MXRoyale/src/main/royale/mx/controls/RadioButton.as
@@ -282,7 +282,8 @@ public class RadioButton extends Button
{
(rbicon.element as HTMLInputElement).checked = value;
}
- group.setSelection(this, false);
+ if (group != null)
+ group.setSelection(this, false);
dispatchEvent(new Event("selectedChanged"));
}
@@ -314,7 +315,7 @@ public class RadioButton extends Button
*/
public function get group():RadioButtonGroup
{
- if (_group == null)
+ if (_group == null && mxmlDocument != null)
{
_group = mxmlDocument[groupName];
}