Re: [1/2] git commit: [flex-asjs] [refs/heads/develop] - Upgrade should wait for other beads (e.g. IDataProviderItemRendererMapper) to do their thing

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [1/2] git commit: [flex-asjs] [refs/heads/develop] - Upgrade should wait for other beads (e.g. IDataProviderItemRendererMapper) to do their thing

piotrz
Yishay,

Please check DataContainer which is extended by List for Menu. It may
already had functions which you could override.

Thanks,
Piotr

On Mon, Aug 7, 2017, 13:28 <[hidden email]> wrote:

> Repository: flex-asjs
> Updated Branches:
>   refs/heads/develop 8d6d7ca84 -> dee26275e
>
>
> Upgrade should wait for other beads (e.g. IDataProviderItemRendererMapper)
> to do their thing
>
>
> Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
> Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/9dac303c
> Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/9dac303c
> Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/9dac303c
>
> Branch: refs/heads/develop
> Commit: 9dac303cbf5c4bf7dd2a3f2f2a37e2d809fc281b
> Parents: 253e73b
> Author: DESKTOP-RH4S838\Yishay <[hidden email]>
> Authored: Mon Aug 7 13:48:39 2017 +0300
> Committer: DESKTOP-RH4S838\Yishay <[hidden email]>
> Committed: Mon Aug 7 13:48:39 2017 +0300
>
> ----------------------------------------------------------------------
>  .../src/main/flex/org/apache/flex/mdl/Menu.as             | 10 ++++++++--
>  1 file changed, 8 insertions(+), 2 deletions(-)
> ----------------------------------------------------------------------
>
>
>
> http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/9dac303c/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/Menu.as
> ----------------------------------------------------------------------
> diff --git
> a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/Menu.as
> b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/Menu.as
> index bc69fc4..193addd 100644
> ---
> a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/Menu.as
> +++
> b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/Menu.as
> @@ -18,6 +18,7 @@
>
>  ////////////////////////////////////////////////////////////////////////////////
>  package org.apache.flex.mdl
>  {
> +       import org.apache.flex.events.Event;
>         import org.apache.flex.html.List;
>         import org.apache.flex.mdl.beads.UpgradeElement;
>
> @@ -58,9 +59,14 @@ package org.apache.flex.mdl
>                         super();
>
>              className = ""; //set to empty string avoid 'undefined'
> output when no class selector is assigned by user;
> -            addBead(new UpgradeElement());
> +                       addEventListener("beadsAdded", addUpgradeBead);
>          }
> -
> +
> +               protected function addUpgradeBead(event:Event):void
> +               {
> +                       addBead(new UpgradeElement());
> +               }
> +
>          /**
>           *  Default position for Menu in MDL is bottom/left (or no class
> selector specified)
>           *
>
>
Apache Flex PMC
piotrzarzycki21@gmail.com
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [1/2] git commit: [flex-asjs] [refs/heads/develop] - Upgrade should wait for other beads (e.g. IDataProviderItemRendererMapper) to do their thing

Harbs
DataContainerBase is a mess. I’m planning on reorganizing that when I finish my work with the strand branch.

The problem here was that the bead was added too soon.

> On Aug 7, 2017, at 3:02 PM, Piotr Zarzycki <[hidden email]> wrote:
>
> Yishay,
>
> Please check DataContainer which is extended by List for Menu. It may already had functions which you could override.
>
> Thanks,
> Piotr
>
>
> On Mon, Aug 7, 2017, 13:28 <[hidden email] <mailto:[hidden email]>> wrote:
> Repository: flex-asjs
> Updated Branches:
>   refs/heads/develop 8d6d7ca84 -> dee26275e
>
>
> Upgrade should wait for other beads (e.g. IDataProviderItemRendererMapper) to do their thing
>
>
> Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo <http://git-wip-us.apache.org/repos/asf/flex-asjs/repo>
> Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/9dac303c <http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/9dac303c>
> Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/9dac303c <http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/9dac303c>
> Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/9dac303c <http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/9dac303c>
>
> Branch: refs/heads/develop
> Commit: 9dac303cbf5c4bf7dd2a3f2f2a37e2d809fc281b
> Parents: 253e73b
> Author: DESKTOP-RH4S838\Yishay <[hidden email] <mailto:[hidden email]>>
> Authored: Mon Aug 7 13:48:39 2017 +0300
> Committer: DESKTOP-RH4S838\Yishay <[hidden email] <mailto:[hidden email]>>
> Committed: Mon Aug 7 13:48:39 2017 +0300
>
> ----------------------------------------------------------------------
>  .../src/main/flex/org/apache/flex/mdl/Menu.as             | 10 ++++++++--
>  1 file changed, 8 insertions(+), 2 deletions(-)
> ----------------------------------------------------------------------
>
>
> http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/9dac303c/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/Menu.as <http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/9dac303c/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/Menu.as>
> ----------------------------------------------------------------------
> diff --git a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/Menu.as b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/Menu.as
> index bc69fc4..193addd 100644
> --- a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/Menu.as
> +++ b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/Menu.as
> @@ -18,6 +18,7 @@
>  ////////////////////////////////////////////////////////////////////////////////
>  package org.apache.flex.mdl
>  {
> +       import org.apache.flex.events.Event;
>         import org.apache.flex.html.List;
>         import org.apache.flex.mdl.beads.UpgradeElement;
>
> @@ -58,9 +59,14 @@ package org.apache.flex.mdl
>                         super();
>
>              className = ""; //set to empty string avoid 'undefined' output when no class selector is assigned by user;
> -            addBead(new UpgradeElement());
> +                       addEventListener("beadsAdded", addUpgradeBead);
>          }
> -
> +
> +               protected function addUpgradeBead(event:Event):void
> +               {
> +                       addBead(new UpgradeElement());
> +               }
> +
>          /**
>           *  Default position for Menu in MDL is bottom/left (or no class selector specified)
>           *
>

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [1/2] git commit: [flex-asjs] [refs/heads/develop] - Upgrade should wait for other beads (e.g. IDataProviderItemRendererMapper) to do their thing

piotrz
Harbs,

Cool! If you will have after refactor in the base class registration for those events "beadsAdded" or "initComplete" my point is that try to reuse it in Menu.

Thanks,
Piotr
Apache Flex PMC
piotrzarzycki21@gmail.com
Loading...