You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@flex.apache.org by Harbs <ha...@gmail.com> on 2017/02/24 11:00:19 UTC
[MDL Dialogs] was: Re: [FlexJS] MDL - Dynamic Child Problem
Having two discussions in one thread is confusing… ;-)
I guess we could make a custom object, but I’m not sure what the point is. AIUI, the purpose of IPopUpHost is to support many levels of popups. Assuming we are right that dialog must be attached to <body>, the simplest way to handle that is to attach it directly.
However, I just looked around a bit, and it seems like that’s not true. It looks like dialog can be attached to pretty much any element. The only caveat seems to be in the polyfill that it’s supposed to not be in an element which has a stacking context.[1]
What I’m not sure about dialog is whether the position can be relative to an element, or it’s always relative to the whole page. Depending on the answer to that, it might make sense to allow different IPopUpHosts, or not.
[1]https://github.com/GoogleChrome/dialog-polyfill <https://github.com/GoogleChrome/dialog-polyfill>
> On Feb 24, 2017, at 6:04 AM, Alex Harui <ah...@adobe.com> wrote:
>
>
>
> On 2/23/17, 12:12 AM, "Harbs" <ha...@gmail.com> wrote:
>
>> It could return the body, but the body is not an IPopUpHost and it does
>> not have addElement().
>>
>> The element of an embedded app will not be the body, so addElement() to
>> that will blow up if it needs to be added to the body.
>
> This is JavaScript right? We can do just about anything we want. I would
> think you can have IPopUpHost return an object that has addElement that
> proxies the calls to body just like any of our other wrapped HTMLElements.
>
> The advantage of having an abstraction like IPopUpHost is that different
> configurations have a better chance of having dialog work properly by
> offering their own custom place to hang dialogs.
>
> Of course, I could be wrong...
> -Alex
>
Re: [MDL Dialogs] was: Re: [FlexJS] MDL - Dynamic Child Problem
Posted by piotrz <pi...@gmail.com>.
In order to refresh dynamically created element in some cases I have to
upgrade also subcomponent.
In each scenario it can be something else. I've created UpgradeElement which
can upgrade only simple component.
In case of Button this will be working:
var btn:Button = new Button();
btn.addBead(new UpgradeElement);
But in case of other components like TextField it won't. So I've decided add
isDynamic property which add ability to refresh on demand - instead doing
this every time.
Piotr
-----
Apache Flex PMC
piotrzarzycki21@gmail.com
--
View this message in context: http://apache-flex-development.2333347.n4.nabble.com/FlexJS-MDL-Dynamic-Child-Problem-tp59595p60045.html
Sent from the Apache Flex Development mailing list archive at Nabble.com.
Re: [MDL Dialogs] was: Re: [FlexJS] MDL - Dynamic Child Problem
Posted by piotrz <pi...@gmail.com>.
Carlos,
I'm bringing back to live this thread with question about default upgrade.
Piotr
-----
Apache Flex PMC
piotrzarzycki21@gmail.com
--
View this message in context: http://apache-flex-development.2333347.n4.nabble.com/FlexJS-MDL-Dynamic-Child-Problem-tp59595p60154.html
Sent from the Apache Flex Development mailing list archive at Nabble.com.
Re: [MDL Dialogs] was: Re: [FlexJS] MDL - Dynamic Child Problem
Posted by piotrz <pi...@gmail.com>.
I have found in MDL library that process of upgrade won't occur if component
is already upgraded. In this case I could get rid off this isDynamic
property and just add upgrade ability as default.
What do you think Carlos ?
Piotr
-----
Apache Flex PMC
piotrzarzycki21@gmail.com
--
View this message in context: http://apache-flex-development.2333347.n4.nabble.com/FlexJS-MDL-Dynamic-Child-Problem-tp59595p60046.html
Sent from the Apache Flex Development mailing list archive at Nabble.com.
Re: [MDL Dialogs] was: Re: [FlexJS] MDL - Dynamic Child Problem
Posted by Alex Harui <ah...@adobe.com>.
On 3/3/17, 8:00 AM, "piotrz" <pi...@gmail.com> wrote:
>I didn't think about such scenario, so it look like we should expose
>isDynamic also to MXML.
That might work, although it can't be a constructor parameter. MXML
doesn't allow constructor parameters.
I would rather explore why whatever isDynamic does can't be built into the
lifecycle so no isDynamic flag is ever needed. Are we just trying to
detect if addElement is being called after the onLoad event?
Thanks,
-Alex
Re: [MDL Dialogs] was: Re: [FlexJS] MDL - Dynamic Child Problem
Posted by piotrz <pi...@gmail.com>.
I didn't think about such scenario, so it look like we should expose
isDynamic also to MXML.
Piotr
-----
Apache Flex PMC
piotrzarzycki21@gmail.com
--
View this message in context: http://apache-flex-development.2333347.n4.nabble.com/FlexJS-MDL-Dynamic-Child-Problem-tp59595p60043.html
Sent from the Apache Flex Development mailing list archive at Nabble.com.
Re: [MDL Dialogs] was: Re: [FlexJS] MDL - Dynamic Child Problem
Posted by Alex Harui <ah...@adobe.com>.
Piotr,
Santanu may be right that there are dynamic MXML scenarios involving
states and includeIn/excludeFrom. In those cases, the instances are
created by MXMLDataInterpreter just like other MXML tags, but may not be
added to the DOM until much later, or removed and re-added as states
change.
I haven't looked at the code, but are you sure that whatever isDynamic
does can't be run on addedToParent?
Thanks,
-Alex
On 3/2/17, 5:06 AM, "piotrz" <pi...@gmail.com> wrote:
>Sankar,
>
>Code which you are showing me should work without the problem.
>
>var tmpComp:Button = new Button(true); - need to be true in constructor.
>
>This:
>
> <mdl:Button text="Click to add External components"
> click="button1_clickHandler(event)" accent="true"/>
>
>You don't need any action cause MDL will handle this one.
>
>Piotr
>
>
>
>-----
>Apache Flex PMC
>piotrzarzycki21@gmail.com
>--
>View this message in context:
>http://apache-flex-development.2333347.n4.nabble.com/FlexJS-MDL-Dynamic-Ch
>ild-Problem-tp59595p59983.html
>Sent from the Apache Flex Development mailing list archive at Nabble.com.
Re: [MDL Dialogs] was: Re: [FlexJS] MDL - Dynamic Child Problem
Posted by Harbs <ha...@gmail.com>.
Yeah. Debugging these things are not fun.
Chrome also allows you to set breakpoints on DOM elements.
I’ve found this useful in breaking at a specific place in the lifecycle to see what’s going on.
> On Mar 3, 2017, at 7:24 AM, Alex Harui <ah...@adobe.com> wrote:
>
>
>
> On 3/2/17, 8:51 PM, "piotrz" <pi...@gmail.com> wrote:
>
>> I will try to fight with this. The problem is that in this case I don't
>> have
>> any exception in the console. :)
>
> Yuk. I think I would next examine the DOM. Compare it against the
> js-debug version. If DOM objects are missing in js-release, then I would
> set breakpoints where they are created.
>
> HTH,
> -Alex
>
Re: [MDL Dialogs] was: Re: [FlexJS] MDL - Dynamic Child Problem
Posted by Alex Harui <ah...@adobe.com>.
On 3/2/17, 8:51 PM, "piotrz" <pi...@gmail.com> wrote:
>I will try to fight with this. The problem is that in this case I don't
>have
>any exception in the console. :)
Yuk. I think I would next examine the DOM. Compare it against the
js-debug version. If DOM objects are missing in js-release, then I would
set breakpoints where they are created.
HTH,
-Alex
Re: [MDL Dialogs] was: Re: [FlexJS] MDL - Dynamic Child Problem
Posted by piotrz <pi...@gmail.com>.
I will try to fight with this. The problem is that in this case I don't have
any exception in the console. :)
Piotr
-----
Apache Flex PMC
piotrzarzycki21@gmail.com
--
View this message in context: http://apache-flex-development.2333347.n4.nabble.com/FlexJS-MDL-Dynamic-Child-Problem-tp59595p60024.html
Sent from the Apache Flex Development mailing list archive at Nabble.com.
Re: [MDL Dialogs] was: Re: [FlexJS] MDL - Dynamic Child Problem
Posted by Alex Harui <ah...@adobe.com>.
On 3/2/17, 5:59 PM, "piotrz" <pi...@gmail.com> wrote:
>Alex,
>
>What could help you to fix that. Should I try to find in minified JS my
>potential class and show it here?
I don't know how much time you have, but it would be great if you simply
tried to debug into it on your own. Maybe you will find a set of tools
and techniques that is better than mine.
I think every time, I get an exception in the console, then it is a matter
of figuring out what renamed variables map back to the original variable
names.
For me, I find it difficult to set breakpoints because so many original
lines of code have been packed onto a single line. I often delete the
source map and hand edit the minified code to break the line of minified
code that is throwing the exception into many lines so I can reliably set
a breakpoint.
Good luck,
-Alex
Re: [MDL Dialogs] was: Re: [FlexJS] MDL - Dynamic Child Problem
Posted by piotrz <pi...@gmail.com>.
Alex,
What could help you to fix that. Should I try to find in minified JS my
potential class and show it here?
Piotr
-----
Apache Flex PMC
piotrzarzycki21@gmail.com
--
View this message in context: http://apache-flex-development.2333347.n4.nabble.com/FlexJS-MDL-Dynamic-Child-Problem-tp59595p60021.html
Sent from the Apache Flex Development mailing list archive at Nabble.com.
Re: [MDL Dialogs] was: Re: [FlexJS] MDL - Dynamic Child Problem
Posted by Alex Harui <ah...@adobe.com>.
On 3/2/17, 9:19 AM, "piotrz" <pi...@gmail.com> wrote:
>Alex,
>
>Do you think because it is something with variable renaming in release
>version?
>I remember that this problem come back to us.
Almost every time js-debug works and js-release doesn't, it has to do with
renaming. It is a pain to figure out (at least, I haven't found an easy
way), but it is important to find and fix these.
-Alex
Re: [MDL Dialogs] was: Re: [FlexJS] MDL - Dynamic Child Problem
Posted by piotrz <pi...@gmail.com>.
Alex,
Do you think because it is something with variable renaming in release
version?
I remember that this problem come back to us.
Piotr
-----
Apache Flex PMC
piotrzarzycki21@gmail.com
--
View this message in context: http://apache-flex-development.2333347.n4.nabble.com/FlexJS-MDL-Dynamic-Child-Problem-tp59595p59991.html
Sent from the Apache Flex Development mailing list archive at Nabble.com.
Re: [MDL Dialogs] was: Re: [FlexJS] MDL - Dynamic Child Problem
Posted by Alex Harui <ah...@adobe.com>.
Hi Piotr,
Congratulations on finding the problem. You might want to make a set of
externs or typedefs for MDL. That would prevent renaming of these
functions and type check those functions as well. See the way I put
together the BarcodeScanner.swc in the flex-tourjs repo.
-Alex
On 3/4/17, 4:12 AM, "piotrz" <pi...@gmail.com> wrote:
>Santanau,
>
>I just pushed fix for problem with release version of your application.
>
>Alex,
>
>In that case it was problem with function which I've called from
>javascript
>[1]
>
>[1] https://paste.apache.org/FyB8
>
>Piotr
>
>
>
>
>
>-----
>Apache Flex PMC
>piotrzarzycki21@gmail.com
>--
>View this message in context:
>http://apache-flex-development.2333347.n4.nabble.com/FlexJS-MDL-Dynamic-Ch
>ild-Problem-tp59595p60068.html
>Sent from the Apache Flex Development mailing list archive at Nabble.com.
Re: [MDL Dialogs] was: Re: [FlexJS] MDL - Dynamic Child Problem
Posted by piotrz <pi...@gmail.com>.
I think it depends whether you will show me some scenario where it need it. I
think some components you may never use as dynamic - you will always use it
in mxml.
I know that we have states where components even in mxml can be dynamically
created, but I need to see such scenario to make them dynamic.
Just let me know and I will start to work when I found the time. :)
Piotr
-----
Apache Flex PMC
piotrzarzycki21@gmail.com
--
View this message in context: http://apache-flex-development.2333347.n4.nabble.com/FlexJS-MDL-Dynamic-Child-Problem-tp59595p60611.html
Sent from the Apache Flex Development mailing list archive at Nabble.com.
Re: [MDL Dialogs] was: Re: [FlexJS] MDL - Dynamic Child Problem
Posted by sankar <sa...@gmail.com>.
piotrz wrote
> I just introduce another bead which may be helpful for custom component,
> but in most cases will be used inside MDL components UpgradeChildren.
>
> I've just make as default possible to create dynamically following
> components:
> Button,
> RadioButton,
> CheckBox,
> TextArea,
> TextField,
> IconToggle,
> Spinner,
> Switch,
> Tooltip
Hi Piotr,
Thanks for this update! I shall give a try by downloading latest source from
repo soon possible.
I was wondering, is that the final list where you should add the new bad, or
this going to get updated across other available components to MDL, i.e.
Table item renderer, toast etc. (?)
Thanks!
--
View this message in context: http://apache-flex-development.2333347.n4.nabble.com/FlexJS-MDL-Dynamic-Child-Problem-tp59595p60606.html
Sent from the Apache Flex Development mailing list archive at Nabble.com.
Re: [MDL Dialogs] was: Re: [FlexJS] MDL - Dynamic Child Problem
Posted by piotrz <pi...@gmail.com>.
Hi Carlos,
No problem :) Thanks!
Santanau,
I just introduce another bead which may be helpful for custom component, but
in most cases will be used inside MDL components UpgradeChildren.
I've just make as default possible to create dynamically following
components:
Button,
RadioButton,
CheckBox,
TextArea,
TextField,
IconToggle,
Spinner,
Switch,
Tooltip
I think newest nightly build will have all the changes. Let me know about
any cases where you have some more problems with component dynamic creation.
Piotr
-----
Apache Flex PMC
piotrzarzycki21@gmail.com
--
View this message in context: http://apache-flex-development.2333347.n4.nabble.com/FlexJS-MDL-Dynamic-Child-Problem-tp59595p60564.html
Sent from the Apache Flex Development mailing list archive at Nabble.com.
Re: [MDL Dialogs] was: Re: [FlexJS] MDL - Dynamic Child Problem
Posted by Carlos Rovira <ca...@codeoscopic.com>.
Hi Piotr,
sorry, just see this, but as you said I'm very busy this days and even
can't take the time to look to all the threads going on.
I can't analyze right now the changes you want to do, but I trust you and
I'm sure what you plan will be the right way to go.
Hope I can return in some days as I get all the overload controlled.
Thanks and sorry to get late!
Carlos
2017-03-16 12:24 GMT+01:00 sankar <sa...@gmail.com>:
> piotrz wrote
> > I'm thinking on adding as "default" to components ability for dynamic
> > creation without any "isDynamic" property etc. I wanted to discuss it
> with
> > Carlos in the other thread, but he is busy currently, so I'm still
> waiting
> > for his input.
>
> Hi Piotr,
>
> That sounds nice. Although I don't know if there'll be any stress to
> processing, which Carlos and others can suggest. But I'm fine with this
> solution and I haven't seen any noticeable delay/stress to my browser even
> when I give quite heavy application codes.
>
> I'm using following codes in my modified UIBase class at this moment, and
> this working expecedly.
>
>
> > public function addElement(c:IChild, dispatchEvent:Boolean = true):void
> > {
> > ...
> > COMPILE::JS
> > {
> > if ("componentHandler" in document.defaultView)
> > {
> > var componentHandler:Object = window["componentHandler"];
> > componentHandler["upgradeElement"](c.positioner);
> > }
> > element.appendChild(c.positioner);
> > (c as IUIBase).addedToParent();
> > }
> > }
>
> Thanks!
>
>
>
>
> --
> View this message in context: http://apache-flex-
> development.2333347.n4.nabble.com/FlexJS-MDL-Dynamic-Child-
> Problem-tp59595p60506.html
> Sent from the Apache Flex Development mailing list archive at Nabble.com.
>
--
Carlos Rovira
Director General
M: +34 607 22 60 05
http://www.codeoscopic.com
http://www.avant2.es
Este mensaje se dirige exclusivamente a su destinatario y puede contener
información privilegiada o confidencial. Si ha recibido este mensaje por
error, le rogamos que nos lo comunique inmediatamente por esta misma vía y
proceda a su destrucción.
De la vigente Ley Orgánica de Protección de Datos (15/1999), le comunicamos
que sus datos forman parte de un fichero cuyo responsable es CODEOSCOPIC
S.A. La finalidad de dicho tratamiento es facilitar la prestación del
servicio o información solicitados, teniendo usted derecho de acceso,
rectificación, cancelación y oposición de sus datos dirigiéndose a nuestras
oficinas c/ Paseo de la Habana 9-11, 28036, Madrid con la documentación
necesaria.
Re: [MDL Dialogs] was: Re: [FlexJS] MDL - Dynamic Child Problem
Posted by sankar <sa...@gmail.com>.
piotrz wrote
> I'm thinking on adding as "default" to components ability for dynamic
> creation without any "isDynamic" property etc. I wanted to discuss it with
> Carlos in the other thread, but he is busy currently, so I'm still waiting
> for his input.
Hi Piotr,
That sounds nice. Although I don't know if there'll be any stress to
processing, which Carlos and others can suggest. But I'm fine with this
solution and I haven't seen any noticeable delay/stress to my browser even
when I give quite heavy application codes.
I'm using following codes in my modified UIBase class at this moment, and
this working expecedly.
> public function addElement(c:IChild, dispatchEvent:Boolean = true):void
> {
> ...
> COMPILE::JS
> {
> if ("componentHandler" in document.defaultView)
> {
> var componentHandler:Object = window["componentHandler"];
> componentHandler["upgradeElement"](c.positioner);
> }
> element.appendChild(c.positioner);
> (c as IUIBase).addedToParent();
> }
> }
Thanks!
--
View this message in context: http://apache-flex-development.2333347.n4.nabble.com/FlexJS-MDL-Dynamic-Child-Problem-tp59595p60506.html
Sent from the Apache Flex Development mailing list archive at Nabble.com.
Re: [MDL Dialogs] was: Re: [FlexJS] MDL - Dynamic Child Problem
Posted by piotrz <pi...@gmail.com>.
Hi Santanau,
I'm thinking on adding as "default" to components ability for dynamic
creation without any "isDynamic" property etc. I wanted to discuss it with
Carlos in the other thread, but he is busy currently, so I'm still waiting
for his input. If I got it positiv I will start work and you shouldn't have
problem for dynamic creation of component even in mxml. - I hope ;)
Thanks,
Piotr
-----
Apache Flex PMC
piotrzarzycki21@gmail.com
--
View this message in context: http://apache-flex-development.2333347.n4.nabble.com/FlexJS-MDL-Dynamic-Child-Problem-tp59595p60494.html
Sent from the Apache Flex Development mailing list archive at Nabble.com.
Re: [MDL Dialogs] was: Re: [FlexJS] MDL - Dynamic Child Problem
Posted by sankar <sa...@gmail.com>.
piotrz wrote
> In that case it was problem with function which I've called from
> javascript [1]
>
> [1] https://paste.apache.org/FyB8
Hi Piotr,
I was busy for quite some time from the updates here. Thank you! for the
link you shared. That actually fix the problem for dynamically adding
component in "bin-release" version!
I didn't able to test your latest updates yet, I shall do that hopefully
soon.
Thanks!
--
View this message in context: http://apache-flex-development.2333347.n4.nabble.com/FlexJS-MDL-Dynamic-Child-Problem-tp59595p60493.html
Sent from the Apache Flex Development mailing list archive at Nabble.com.
Re: [MDL Dialogs] was: Re: [FlexJS] MDL - Dynamic Child Problem
Posted by piotrz <pi...@gmail.com>.
Santanau,
I just pushed fix for problem with release version of your application.
Alex,
In that case it was problem with function which I've called from javascript
[1]
[1] https://paste.apache.org/FyB8
Piotr
-----
Apache Flex PMC
piotrzarzycki21@gmail.com
--
View this message in context: http://apache-flex-development.2333347.n4.nabble.com/FlexJS-MDL-Dynamic-Child-Problem-tp59595p60068.html
Sent from the Apache Flex Development mailing list archive at Nabble.com.
Re: [MDL Dialogs] was: Re: [FlexJS] MDL - Dynamic Child Problem
Posted by sankar <sa...@gmail.com>.
piotrz wrote
> var tmpComp:Button = new Button(true); - need to be true in constructor.
I've seen such usage of addition do not works in compiled "bin-release"
version. Things not works like 'ripple' etc. in "bin-release" version.
Thanks!
--
View this message in context: http://apache-flex-development.2333347.n4.nabble.com/FlexJS-MDL-Dynamic-Child-Problem-tp59595p59989.html
Sent from the Apache Flex Development mailing list archive at Nabble.com.
Re: [MDL Dialogs] was: Re: [FlexJS] MDL - Dynamic Child Problem
Posted by piotrz <pi...@gmail.com>.
Sankar,
Code which you are showing me should work without the problem.
var tmpComp:Button = new Button(true); - need to be true in constructor.
This:
<mdl:Button text="Click to add External components"
click="button1_clickHandler(event)" accent="true"/>
You don't need any action cause MDL will handle this one.
Piotr
-----
Apache Flex PMC
piotrzarzycki21@gmail.com
--
View this message in context: http://apache-flex-development.2333347.n4.nabble.com/FlexJS-MDL-Dynamic-Child-Problem-tp59595p59983.html
Sent from the Apache Flex Development mailing list archive at Nabble.com.
Re: [MDL Dialogs] was: Re: [FlexJS] MDL - Dynamic Child Problem
Posted by sankar <sa...@gmail.com>.
piotrz wrote
> Ok but you didn't add this Grid to MXML, you will add this component by
> addElement yes ?
>
> Maybe I do not understand your use cases - provide me an example if you
> can.
Hi Piotr,
My test was pretty basic with FlexJS MDL default components only. Here's the
basic test case where I added a MDL button to one GridCell after a button
click:
https://kobra.io/#/e/-KeE-9-OM5UGpVORDPwt
Thanks!
--
View this message in context: http://apache-flex-development.2333347.n4.nabble.com/FlexJS-MDL-Dynamic-Child-Problem-tp59595p59982.html
Sent from the Apache Flex Development mailing list archive at Nabble.com.
Re: [MDL Dialogs] was: Re: [FlexJS] MDL - Dynamic Child Problem
Posted by piotrz <pi...@gmail.com>.
Sankar,
Ok but you didn't add this Grid to MXML, you will add this component by
addElement yes ?
If you are adding Grid in MXML - It will be initialized on his own - MDL
will upgrade it automatically.
Maybe I do not understand your use cases - provide me an example if you can.
If you have created your custom component it is your responsibility to make
upgrade, I can only add upgrade to the component which we currently created
with Carlos.
Piotr
-----
Apache Flex PMC
piotrzarzycki21@gmail.com
--
View this message in context: http://apache-flex-development.2333347.n4.nabble.com/FlexJS-MDL-Dynamic-Child-Problem-tp59595p59981.html
Sent from the Apache Flex Development mailing list archive at Nabble.com.
Re: [MDL Dialogs] was: Re: [FlexJS] MDL - Dynamic Child Problem
Posted by sankar <sa...@gmail.com>.
Hi Piotr,
I may oppose this your opinion:
piotrz wrote
> I don't see any advantage to have this property in MXML. Dynamic component
> is supposed to be created from code new Button(true).
Say I have an external Grid component which has many buttons and TextFields
declared in MXML tag - and I wants to add that external Grid component to
somewhere at runtime. So in the way your opinion, I see the dynamic addition
and component upgrade will going to fail, unless I write every component
addition code in that external Grid component in <fx:Script/> area.
Secondly, have you tried your fix in "bin-release" version?
I did a small test by adding a button the way constructor demands it; it
does well in "bin-debug" version though but "bin-release".
Thanks!
--
View this message in context: http://apache-flex-development.2333347.n4.nabble.com/FlexJS-MDL-Dynamic-Child-Problem-tp59595p59980.html
Sent from the Apache Flex Development mailing list archive at Nabble.com.
Re: [MDL Dialogs] was: Re: [FlexJS] MDL - Dynamic Child Problem
Posted by piotrz <pi...@gmail.com>.
Hi Sankar,
I don't see any advantage to have this property in MXML. Dynamic component
is supposed to be created from code new Button(true).
If you need more dynamic components which is already in our MDL library let
me know. I've changed only few of them to be dynamic.
If component do not have in the constructor isDynamic you may try to add
UpgradeElement bead during creation, but it won't guarantee that your
component will be refreshed. Sometimes refreshing required refreshing also
sub components.
Piotr
-----
Apache Flex PMC
piotrzarzycki21@gmail.com
--
View this message in context: http://apache-flex-development.2333347.n4.nabble.com/FlexJS-MDL-Dynamic-Child-Problem-tp59595p59979.html
Sent from the Apache Flex Development mailing list archive at Nabble.com.
Re: [MDL Dialogs] was: Re: [FlexJS] MDL - Dynamic Child Problem
Posted by sankar <sa...@gmail.com>.
Hi,
I recently updated my local framework source from Git repository. I am not
sure where we're standing now with this but I wanted to give Piotr's Button
and TextField implementation a try with new UpgradeElement bead.
So far I able to get the dynamic element upgraded by this way:
var newButton:Button = new Button(true);
Piotr, I have a question:
- I didn't seen any "isDynamic" property in MXML declaration as I know the
property was only limited to constructor. Are you planning to do something
on this?
Also, if I have a component filled with many elements, i.e. buttons,
textfields etc. and want to add that component at runtime, I shall basically
needs to set "isDynamic=true" to every components in it, is that right?
Thanks!
--
View this message in context: http://apache-flex-development.2333347.n4.nabble.com/FlexJS-MDL-Dynamic-Child-Problem-tp59595p59978.html
Sent from the Apache Flex Development mailing list archive at Nabble.com.
Re: [MDL Dialogs] was: Re: [FlexJS] MDL - Dynamic Child Problem
Posted by Harbs <ha...@gmail.com>.
> and in some
> situations, it might need to be the parent document's body if you are in
> an IFrame.
That’s not going to work unless there’s some way to create elements in the outer document which we currently don’t have.
I think the simplest way to go about it, is to leave it as-is for now. It’s actually about as simple as it can be.
I assume in another half-year or so we’re going to move over to mdc-web when it has it’s release.[1][2]
They are in the process of working on dialog in a way which does not use <dialog>, so I’m assuming it can be used somewhere other than <body>.[3][4]
[1]https://github.com/material-components/material-components-web <https://github.com/material-components/material-components-web>
[2]https://www.pivotaltracker.com/n/projects/1664011 <https://www.pivotaltracker.com/n/projects/1664011>
[3]https://github.com/material-components/material-components-web/issues/32 <https://github.com/material-components/material-components-web/issues/32>
[4]http://codepen.io/amsheehan/pen/QdBPXL?editors=0100 <http://codepen.io/amsheehan/pen/QdBPXL?editors=0100>
> On Feb 25, 2017, at 7:37 AM, Alex Harui <ah...@adobe.com> wrote:
>
>
>
> On 2/24/17, 3:00 AM, "Harbs" <harbs.lists@gmail.com <ma...@gmail.com>> wrote:
>
>> Having two discussions in one thread is confusing… ;-)
>>
>> I guess we could make a custom object, but I’m not sure what the point
>> is. AIUI, the purpose of IPopUpHost is to support many levels of popups.
>> Assuming we are right that dialog must be attached to <body>, the
>> simplest way to handle that is to attach it directly.
>>
>> However, I just looked around a bit, and it seems like that’s not true.
>> It looks like dialog can be attached to pretty much any element. The only
>> caveat seems to be in the polyfill that it’s supposed to not be in an
>> element which has a stacking context.[1]
>>
>> What I’m not sure about dialog is whether the position can be relative to
>> an element, or it’s always relative to the whole page. Depending on the
>> answer to that, it might make sense to allow different IPopUpHosts, or
>> not.
>
> IMO, that's the point of IPopUpHost. It allows various configurations to
> dictate where to hang the popups. It doesn't have to be body, and in some
> situations, it might need to be the parent document's body if you are in
> an IFrame.
>
> Regular Flex has a PopUpManager, but really, it was designed for multiple
> overlapping windows like in MS Windows and was overkill for most
> applications. In fact, the FlexJS examples don't have a PopUpManager and
> can still hang one modal dialog at a time somewhere. So, IMO, popup
> support should also be PAYG and have an abstraction that doesn't assume it
> is the <body> tag.
>
> My 2 cents,
> -Alex
Re: [MDL Dialogs] was: Re: [FlexJS] MDL - Dynamic Child Problem
Posted by Alex Harui <ah...@adobe.com>.
On 2/24/17, 3:00 AM, "Harbs" <ha...@gmail.com> wrote:
>Having two discussions in one thread is confusing… ;-)
>
>I guess we could make a custom object, but I’m not sure what the point
>is. AIUI, the purpose of IPopUpHost is to support many levels of popups.
>Assuming we are right that dialog must be attached to <body>, the
>simplest way to handle that is to attach it directly.
>
>However, I just looked around a bit, and it seems like that’s not true.
>It looks like dialog can be attached to pretty much any element. The only
>caveat seems to be in the polyfill that it’s supposed to not be in an
>element which has a stacking context.[1]
>
>What I’m not sure about dialog is whether the position can be relative to
>an element, or it’s always relative to the whole page. Depending on the
>answer to that, it might make sense to allow different IPopUpHosts, or
>not.
IMO, that's the point of IPopUpHost. It allows various configurations to
dictate where to hang the popups. It doesn't have to be body, and in some
situations, it might need to be the parent document's body if you are in
an IFrame.
Regular Flex has a PopUpManager, but really, it was designed for multiple
overlapping windows like in MS Windows and was overkill for most
applications. In fact, the FlexJS examples don't have a PopUpManager and
can still hang one modal dialog at a time somewhere. So, IMO, popup
support should also be PAYG and have an abstraction that doesn't assume it
is the <body> tag.
My 2 cents,
-Alex