You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@flex.apache.org by Yishay Weiss <yi...@hotmail.com> on 2016/12/01 14:44:54 UTC

RE: [FlexJS, MDL] Add icon to DeletableChip

I added StrandUtils.loadBead() to core. To see an example of how it’s used you can look in AccordionCollapseBead, which has the following line:

                                                       _layout = StrandUtils.loadBead(IOneFlexibleChildLayout, "iBeadLayout", _strand) as IOneFlexibleChildLayout;

The utility class searches to see if the bead already exists in the strand and if not, it adds it.



In my opinion beads should use this when they require other beads. This insures the dependencies are loaded on the strand and available to the beads.



How beads cooperate is an interesting discussion. This is just one way. They can also listen to events on the strand and emit them. The problem with that is that it’s difficult to enforce order of execution. It’s even more complicated because FlexJS doesn’t currently have the concept of event handler priorities, as far as I know.





From: Yishay Weiss<ma...@hotmail.com>
Sent: Wednesday, November 30, 2016 12:58 PM
To: dev@flex.apache.org<ma...@flex.apache.org>
Subject: RE: [FlexJS, MDL] Add icon to DeletableChip



Yes, I mean loading inside DeletableChip.



From: piotrz<ma...@gmail.com>
Sent: Wednesday, November 30, 2016 12:06 PM
To: dev@flex.apache.org<ma...@flex.apache.org>
Subject: Re: [FlexJS, MDL] Add icon to DeletableChip



Hi Yishay,

How would I use such util in my case when I whant to "merge" two beads?
DeletableChip whant to use MaterialIcons bead - You mean loading inside
DeletableChip?
If you could elaborate more on your idea.

Piotr



-----
Apache Flex PMC
piotrzarzycki21@gmail.com
--
View this message in context: http://apache-flex-development.2333347.n4.nabble.com/FlexJS-MDL-Add-icon-to-DeletableChip-tp56766p56816.html
Sent from the Apache Flex Development mailing list archive at Nabble.com.

RE: [FlexJS, MDL] Add icon to DeletableChip

Posted by piotrz <pi...@gmail.com>.
I think everything in your Util is ok. If I wanted to have more components
which bead provide I will create separate bead which provide such feature.
:)

Piotre



-----
Apache Flex PMC
piotrzarzycki21@gmail.com
--
View this message in context: http://apache-flex-development.2333347.n4.nabble.com/FlexJS-MDL-Add-icon-to-DeletableChip-tp56766p56917.html
Sent from the Apache Flex Development mailing list archive at Nabble.com.

RE: [FlexJS, MDL] Add icon to DeletableChip

Posted by piotrz <pi...@gmail.com>.
Exactly. Cause in MDL we may want Two icons, so there will be two beads, or
it's something which beads not for ?

Piotr



-----
Apache Flex PMC
piotrzarzycki21@gmail.com
--
View this message in context: http://apache-flex-development.2333347.n4.nabble.com/FlexJS-MDL-Add-icon-to-DeletableChip-tp56766p56915.html
Sent from the Apache Flex Development mailing list archive at Nabble.com.

RE: [FlexJS, MDL] Add icon to DeletableChip

Posted by Yishay Weiss <yi...@hotmail.com>.
I’m not sure I understand the scenario. Do you mean that a user can abuse the mxml and feed duplicate beads to the strand?



From: piotrz<ma...@gmail.com>
Sent: Friday, December 2, 2016 12:51 AM
To: dev@flex.apache.org<ma...@flex.apache.org>
Subject: RE: [FlexJS, MDL] Add icon to DeletableChip



Yishay,

What if we have two exactly same Bead ? I think util doesn't cover this
scenario.

<mdl:beads>
                <mdl:MaterialIconCancel />
                <mdl:MaterialIconCancel />
</mdl:beads>

Piotr



-----
Apache Flex PMC
piotrzarzycki21@gmail.com
--
View this message in context: http://apache-flex-development.2333347.n4.nabble.com/FlexJS-MDL-Add-icon-to-DeletableChip-tp56766p56895.html
Sent from the Apache Flex Development mailing list archive at Nabble.com.

RE: [FlexJS, MDL] Add icon to DeletableChip

Posted by piotrz <pi...@gmail.com>.
Yishay,

What if we have two exactly same Bead ? I think util doesn't cover this
scenario.

<mdl:beads>
                <mdl:MaterialIconCancel />
                <mdl:MaterialIconCancel />
</mdl:beads>

Piotr



-----
Apache Flex PMC
piotrzarzycki21@gmail.com
--
View this message in context: http://apache-flex-development.2333347.n4.nabble.com/FlexJS-MDL-Add-icon-to-DeletableChip-tp56766p56895.html
Sent from the Apache Flex Development mailing list archive at Nabble.com.