You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flex.apache.org by ah...@apache.org on 2014/10/02 21:58:59 UTC
[3/8] git commit: [flex-asjs] [refs/heads/develop] - don't require
all objects to have id properties
don't require all objects to have id properties
Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/d4d2ae9a
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/d4d2ae9a
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/d4d2ae9a
Branch: refs/heads/develop
Commit: d4d2ae9a1c7bae98706d3a49db30db274f2516aa
Parents: 4a76018
Author: Alex Harui <ah...@apache.org>
Authored: Thu Oct 2 12:43:01 2014 -0700
Committer: Alex Harui <ah...@apache.org>
Committed: Thu Oct 2 12:58:45 2014 -0700
----------------------------------------------------------------------
.../src/org/apache/flex/utils/MXMLDataInterpreter.as | 10 ++++++++++
1 file changed, 10 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/d4d2ae9a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/utils/MXMLDataInterpreter.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/utils/MXMLDataInterpreter.as b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/utils/MXMLDataInterpreter.as
index ec96f89..94b59d7 100644
--- a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/utils/MXMLDataInterpreter.as
+++ b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/utils/MXMLDataInterpreter.as
@@ -180,6 +180,16 @@ public class MXMLDataInterpreter
comp.document = document;
else if (name == "_id")
id = value as String; // and don't assign to comp
+ else if (name == "id")
+ {
+ // not all objects have to have their own id property
+ try {
+ comp["id"] = value;
+ } catch (e:Error)
+ {
+
+ }
+ }
else
comp[name] = value;
}