You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flex.apache.org by pi...@apache.org on 2017/01/03 13:09:46 UTC
git commit: [flex-asjs] [refs/heads/develop] - If Bindable property
is assigned to component itself ItemRendererSimpleBinding throws exception -
example of such binding can be find:
\examples\flexjs\MDLExample\src\main\flex\itemRenderers\CustomMenuItemRe
Repository: flex-asjs
Updated Branches:
refs/heads/develop 6642ca7d4 -> 59223444e
If Bindable property is assigned to component itself ItemRendererSimpleBinding throws exception - example of such binding can be find: \examples\flexjs\MDLExample\src\main\flex\itemRenderers\CustomMenuItemRenderer.mxml
Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/59223444
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/59223444
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/59223444
Branch: refs/heads/develop
Commit: 59223444ed48d4b15d996919ba5925613db06f03
Parents: 6642ca7
Author: piotrz <pi...@apache.org>
Authored: Tue Jan 3 14:09:40 2017 +0100
Committer: piotrz <pi...@apache.org>
Committed: Tue Jan 3 14:09:40 2017 +0100
----------------------------------------------------------------------
.../org/apache/flex/binding/ItemRendererSimpleBinding.as | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/59223444/frameworks/projects/Binding/src/main/flex/org/apache/flex/binding/ItemRendererSimpleBinding.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Binding/src/main/flex/org/apache/flex/binding/ItemRendererSimpleBinding.as b/frameworks/projects/Binding/src/main/flex/org/apache/flex/binding/ItemRendererSimpleBinding.as
index 5354a8c..889a218 100644
--- a/frameworks/projects/Binding/src/main/flex/org/apache/flex/binding/ItemRendererSimpleBinding.as
+++ b/frameworks/projects/Binding/src/main/flex/org/apache/flex/binding/ItemRendererSimpleBinding.as
@@ -144,7 +144,14 @@ public class ItemRendererSimpleBinding implements IBead, IDocument
private function dataChangeHandler(event:Event):void
{
- document[destinationID][destinationPropertyName] = document.data[sourcePropertyName];
+ if (destinationID == "this")
+ {
+ document[destinationPropertyName] = document.data[sourcePropertyName];
+ }
+ else
+ {
+ document[destinationID][destinationPropertyName] = document.data[sourcePropertyName];
+ }
}
}
Re: git commit: [flex-asjs] [refs/heads/develop] - If Bindable
property is assigned to component itself ItemRendererSimpleBinding throws
exception - example of such binding can be find:
\examples\flexjs\MDLExample\src\main\flex\itemRenderers\CustomMenuItemRe
Posted by piotrz <pi...@gmail.com>.
Code of CustomMenuItemRenderer -> https://paste.apache.org/4m3A - divider =
{menuItem.hasDivider} - it cause fail.
-----
Apache Flex PMC
piotrzarzycki21@gmail.com
--
View this message in context: http://apache-flex-development.2333347.n4.nabble.com/Re-git-commit-flex-asjs-refs-heads-develop-If-Bindable-property-is-assigned-to-component-itself-Iteme-tp57819p57820.html
Sent from the Apache Flex Development mailing list archive at Nabble.com.
Re: git commit: [flex-asjs] [refs/heads/develop] - If Bindable
property is assigned to component itself ItemRendererSimpleBinding throws
exception - example of such binding can be find: \examples\flexjs\MDLExample\src\main\flex\itemRenderers\CustomMenuItemRe
Posted by Piotr Zarzycki <pi...@gmail.com>.
Guys,
That's my first fix in core and I'm not sure if this solution is ok. ) If I
have code where bindable property is assigned to "this" class
ItemRendererSimpleBinding failed on attempt of finding such property.
If it doesn't look good please suggest solution.
Piotr
2017-01-03 14:09 GMT+01:00 <pi...@apache.org>:
> Repository: flex-asjs
> Updated Branches:
> refs/heads/develop 6642ca7d4 -> 59223444e
>
>
> If Bindable property is assigned to component itself
> ItemRendererSimpleBinding throws exception - example of such binding can be
> find: \examples\flexjs\MDLExample\src\main\flex\itemRenderers\
> CustomMenuItemRenderer.mxml
>
>
> Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
> Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/59223444
> Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/59223444
> Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/59223444
>
> Branch: refs/heads/develop
> Commit: 59223444ed48d4b15d996919ba5925613db06f03
> Parents: 6642ca7
> Author: piotrz <pi...@apache.org>
> Authored: Tue Jan 3 14:09:40 2017 +0100
> Committer: piotrz <pi...@apache.org>
> Committed: Tue Jan 3 14:09:40 2017 +0100
>
> ----------------------------------------------------------------------
> .../org/apache/flex/binding/ItemRendererSimpleBinding.as | 9 ++++++++-
> 1 file changed, 8 insertions(+), 1 deletion(-)
> ----------------------------------------------------------------------
>
>
> http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/
> 59223444/frameworks/projects/Binding/src/main/flex/org/
> apache/flex/binding/ItemRendererSimpleBinding.as
> ----------------------------------------------------------------------
> diff --git a/frameworks/projects/Binding/src/main/flex/org/apache/flex/
> binding/ItemRendererSimpleBinding.as b/frameworks/projects/Binding/
> src/main/flex/org/apache/flex/binding/ItemRendererSimpleBinding.as
> index 5354a8c..889a218 100644
> --- a/frameworks/projects/Binding/src/main/flex/org/apache/flex/binding/
> ItemRendererSimpleBinding.as
> +++ b/frameworks/projects/Binding/src/main/flex/org/apache/flex/binding/
> ItemRendererSimpleBinding.as
> @@ -144,7 +144,14 @@ public class ItemRendererSimpleBinding implements
> IBead, IDocument
>
> private function dataChangeHandler(event:Event):void
> {
> - document[destinationID][destinationPropertyName] =
> document.data[sourcePropertyName];
> + if (destinationID == "this")
> + {
> + document[destinationPropertyName] = document.data[
> sourcePropertyName];
> + }
> + else
> + {
> + document[destinationID][destinationPropertyName] =
> document.data[sourcePropertyName];
> + }
> }
>
> }
>
>
--
Greetings
Piotr Zarzycki
Flex/AIR/.NET Developer
mobile: +48 880 859 557
e-mail: piotrzarzycki21@gmail.com
skype: zarzycki10
LinkedIn: http://www.linkedin.com/piotrzarzycki
<https://pl.linkedin.com/in/piotr-zarzycki-92a53552>