You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@flex.apache.org by piotrz <pi...@gmail.com> on 2017/07/18 04:11:54 UTC

[FlexJS] findPopupHost issue

Hi Team,

Prashant on users list raised an issue with UIUtils.findPopUpHost(this as
IUIBase) [1]. I did quick look into that and I think we should have in
findPopUpHost(start:IPopupHost) instead findPopUpHost(start:IUIBase) or Am I
miss something ?

[1]
http://apache-flex-users.2333346.n4.nabble.com/FlexJS-findPopUpHost-Issue-td15474.html

Thanks,
Piotr



-----
Apache Flex PMC
piotrzarzycki21@gmail.com
--
View this message in context: http://apache-flex-development.2333347.n4.nabble.com/FlexJS-findPopupHost-issue-tp63362.html
Sent from the Apache Flex Development mailing list archive at Nabble.com.

Re: [FlexJS] findPopupHost issue

Posted by PKumar <pr...@gmail.com>.
​I am having a gird  with one view column. On clicking view link , i want
to open a popup to view information. I was unaware  about actual use of
findPopupHost so i pass this. I was thinking it will work same as
PopupManager works.



On Tue, Jul 18, 2017 at 8:02 PM, Alex Harui-2 [via Apache Flex Development]
<ml...@n4.nabble.com> wrote:

> I guess I should have been more clear.  FlexJS supports multiple component
> sets and runtimes.  An Application class is probably always going to be
> the entry point of an application, but there is no guarantee in any
> application that the Application class will be a display object or even
> the correct display object in the case of a multi-window desktop
> application.
>
> IPopUpHost is an API for a good place to hang popups, but it is only a
> coincidence that in the currently supported runtimes and most popular
> component sets that the Application is mapped to a display object and thus
> an IPopUpHost.  We should not presume that will always be the case.
>
> If you are looking for a good place to hang a popup you probably want it
> to popup over some UI component.  So, it is best to start with that known
> IUIBase and find an IPopUpHost that will display the popup over that
> IUIBase.  That way, your code will work in a multi-window app someday, and
> other future runtime environments as well.  And that's why findPopUpHost
> takes an IUIBase.  And in other future runtimes, it should be implemented
> to return a useful thing, but that thing may not be the Application
> instance.
>
> So, the recommended practice is to use UIUtils.findPopupHost and pass it
> an IUIBase that you want the popup to float over.
>
> HTH,
> -Alex
>
> On 7/17/17, 10:48 PM, "Yishay Weiss" <[hidden email]
> <http:///user/SendEmail.jtp?type=node&node=63395&i=0>> wrote:
>
> >Even if the Application instance isn’t an IPopUpHost the method will just
> >return null, so the effect is the same as just doing (appInstance as
> >IPopUpHost). I suspect the method is being misused rather than there
> >being a problem with the method.
> >
> >From: Alex Harui<mailto:[hidden email]
> <http:///user/SendEmail.jtp?type=node&node=63395&i=1>>
> >Sent: Tuesday, July 18, 2017 8:33 AM
> >To: [hidden email] <http:///user/SendEmail.jtp?type=node&node=63395&i=2>
> <mailto:[hidden email]
> <http:///user/SendEmail.jtp?type=node&node=63395&i=3>>
> >Subject: Re: [FlexJS] findPopupHost issue
> >
> >FWIW, it may not be safe to assume that Application will always be an
> >IPopUpHost, hence the utility function.
> >
> >Thanks,
> >-Alex
> >
> >On 7/17/17, 9:59 PM, "piotrz" <[hidden email]
> <http:///user/SendEmail.jtp?type=node&node=63395&i=4>> wrote:
> >
> >>Hi Yishay,
> >>
> >>That's a good point - Application is itself an IPopupHost. I've asked
> him
> >>what is the use case for his host popup search.
> >>
> >>Thanks,
> >>Piotr
> >>
> >>
> >>
> >>-----
> >>Apache Flex PMC
> >>[hidden email] <http:///user/SendEmail.jtp?type=node&node=63395&i=5>
> >>--
> >>View this message in context:
> >>https://na01.safelinks.protection.outlook.com/?url=
> http%3A%2F%2Fapache-fl
> >>e
> >>x-development.2333347.n4.nabble.com%2FFlexJS-findPopupHost-issue-tp63362p
>
> >>6
> >>3366.html&data=02%7C01%7C%7Cbfd19d2deba646c64df208d4cd9c9798%7Cfa7b1b5a7b
>
> >>3
> >>4438794aed2c178decee1%7C0%7C0%7C636359519816386890&sdata=CyeQuoJ0gVVl2UHU
>
> >>B
> >>W%2B6hbyDNw%2FOSFuswfzeLTqUf3c%3D&reserved=0
> >>Sent from the Apache Flex Development mailing list archive at
> Nabble.com.
> >
>
>
>
> ------------------------------
> If you reply to this email, your message will be added to the discussion
> below:
> http://apache-flex-development.2333347.n4.nabble.com/FlexJS-findPopupHost-
> issue-tp63362p63395.html
> To start a new topic under Apache Flex Development, email
> ml+s2333347n1h43@n4.nabble.com
> To unsubscribe from Apache Flex Development, click here
> <http://apache-flex-development.2333347.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=1&code=cHJhc2hha3VtYXJAZ21haWwuY29tfDF8LTU0MTcyMzE2NA==>
> .
> NAML
> <http://apache-flex-development.2333347.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>



-- 
*Regards,*
Prashant Kumar* | *Mob.: +91 8408811225




--
View this message in context: http://apache-flex-development.2333347.n4.nabble.com/FlexJS-findPopupHost-issue-tp63362p63424.html
Sent from the Apache Flex Development mailing list archive at Nabble.com.

Re: [FlexJS] findPopupHost issue

Posted by Josh Tynjala <jo...@gmail.com>.
This type of issue used to get me all the time with the classic Flex SDK.
I'd have some subclass of Panel or something, but I'd have some kind of
selectedItem property on it that dispatched Event.CHANGE. If I had a child
that was a Slider or something, the slider's Event.CHANGE would bubble, and
I'd have something higher up in the display list thinking that my Panel
subclass' selectedItem was changing when it wasn't.

Most of the time, that's not an issue, but every once in a while, I'd see
an event listener getting called way too often. If you aren't expecting
that, there can be weird side effects. Performance is obviously a concern,
but also, if your listener triggers some change to the UI, that could
happen at times when it doesn't make any sense, and it's not necessarily
immediately clear why.

(Just thought I'd put a real world story behind why it's good for FlexJS to
avoid bubbling in custom events)

- Josh

On Fri, Jul 21, 2017 at 7:25 AM, Alex Harui <ah...@adobe.com.invalid>
wrote:

> I think we can use setParentTarget to get bubbling to work reliably with
> custom events, but as Peter said, I don't think we want to set up
> parentTarget's just-in-case.  Bubbling custom events is not a recommended
> practice as was mentioned in some other thread recently.
>
> Imagine if you had a Panel as a child of a larger Panel.  Bubbling a close
> event from the inner Panel could easily cause the outer Panel's close
> handler to also fire.
>
> My 2 cents,
> -Alex
>
> On 7/21/17, 6:22 AM, "Peter Ent" <pe...@adobe.com.INVALID> wrote:
>
> >I needed events to bubble for the drag and drop work. While that was fine
> >for the Flash Player, the FlexJS/Google/Browser event mix didn't work.
> >Alex suggested I used setParentTarget on the event to work up the tree and
> >then the event would be dispatched at each level, thus mimicking bubbling.
> >I did this exclusively for drag events (see DragEvent class).
> >
> >Rather than putting that in as the solution for this, I took a simpler
> >approach.
> >
> >‹peter
> >
> >On 7/21/17, 2:35 AM, "Harbs" <ha...@gmail.com> wrote:
> >
> >>Bubbling does not work very well in FlexJS in general.
> >>
> >>When you can rely on native browser event bubbling, it usually works
> >>okay, but custom events don¹t bubble.
> >>
> >>> On Jul 21, 2017, at 1:49 AM, Justin Mclean <ju...@classsoftware.com>
> >>>wrote:
> >>>
> >>> Hi,
> >>>
> >>>> The issue was that the TitleBar was dispatching "close" with
> >>>>bubbles=true.
> >>>> This works fine on SWF but not on the HTML platform without some extra
> >>>> work. So I just had PanelView intercept the event and dispatch one
> >>>>from
> >>>> its strand.
> >>>
> >>> Out of interest is this because of a missing cloneEvent method or that
> >>>it wasn¹t listening on a parent of the item that dispatched the bubbling
> >>>event or something else?
> >>>
> >>> Thanks,
> >>> Justin
> >>
> >
>
>

Re: [FlexJS] findPopupHost issue

Posted by Alex Harui <ah...@adobe.com.INVALID>.
I think we can use setParentTarget to get bubbling to work reliably with
custom events, but as Peter said, I don't think we want to set up
parentTarget's just-in-case.  Bubbling custom events is not a recommended
practice as was mentioned in some other thread recently.

Imagine if you had a Panel as a child of a larger Panel.  Bubbling a close
event from the inner Panel could easily cause the outer Panel's close
handler to also fire.

My 2 cents,
-Alex

On 7/21/17, 6:22 AM, "Peter Ent" <pe...@adobe.com.INVALID> wrote:

>I needed events to bubble for the drag and drop work. While that was fine
>for the Flash Player, the FlexJS/Google/Browser event mix didn't work.
>Alex suggested I used setParentTarget on the event to work up the tree and
>then the event would be dispatched at each level, thus mimicking bubbling.
>I did this exclusively for drag events (see DragEvent class).
>
>Rather than putting that in as the solution for this, I took a simpler
>approach. 
>
>‹peter
>
>On 7/21/17, 2:35 AM, "Harbs" <ha...@gmail.com> wrote:
>
>>Bubbling does not work very well in FlexJS in general.
>>
>>When you can rely on native browser event bubbling, it usually works
>>okay, but custom events don¹t bubble.
>>
>>> On Jul 21, 2017, at 1:49 AM, Justin Mclean <ju...@classsoftware.com>
>>>wrote:
>>> 
>>> Hi,
>>> 
>>>> The issue was that the TitleBar was dispatching "close" with
>>>>bubbles=true.
>>>> This works fine on SWF but not on the HTML platform without some extra
>>>> work. So I just had PanelView intercept the event and dispatch one
>>>>from
>>>> its strand. 
>>> 
>>> Out of interest is this because of a missing cloneEvent method or that
>>>it wasn¹t listening on a parent of the item that dispatched the bubbling
>>>event or something else?
>>> 
>>> Thanks,
>>> Justin
>>
>


Re: [FlexJS] findPopupHost issue

Posted by Peter Ent <pe...@adobe.com.INVALID>.
I needed events to bubble for the drag and drop work. While that was fine
for the Flash Player, the FlexJS/Google/Browser event mix didn't work.
Alex suggested I used setParentTarget on the event to work up the tree and
then the event would be dispatched at each level, thus mimicking bubbling.
I did this exclusively for drag events (see DragEvent class).

Rather than putting that in as the solution for this, I took a simpler
approach. 

‹peter

On 7/21/17, 2:35 AM, "Harbs" <ha...@gmail.com> wrote:

>Bubbling does not work very well in FlexJS in general.
>
>When you can rely on native browser event bubbling, it usually works
>okay, but custom events don¹t bubble.
>
>> On Jul 21, 2017, at 1:49 AM, Justin Mclean <ju...@classsoftware.com>
>>wrote:
>> 
>> Hi,
>> 
>>> The issue was that the TitleBar was dispatching "close" with
>>>bubbles=true.
>>> This works fine on SWF but not on the HTML platform without some extra
>>> work. So I just had PanelView intercept the event and dispatch one from
>>> its strand. 
>> 
>> Out of interest is this because of a missing cloneEvent method or that
>>it wasn¹t listening on a parent of the item that dispatched the bubbling
>>event or something else?
>> 
>> Thanks,
>> Justin
>


Re: [FlexJS] findPopupHost issue

Posted by Harbs <ha...@gmail.com>.
Bubbling does not work very well in FlexJS in general.

When you can rely on native browser event bubbling, it usually works okay, but custom events don’t bubble.

> On Jul 21, 2017, at 1:49 AM, Justin Mclean <ju...@classsoftware.com> wrote:
> 
> Hi,
> 
>> The issue was that the TitleBar was dispatching "close" with bubbles=true.
>> This works fine on SWF but not on the HTML platform without some extra
>> work. So I just had PanelView intercept the event and dispatch one from
>> its strand. 
> 
> Out of interest is this because of a missing cloneEvent method or that it wasn’t listening on a parent of the item that dispatched the bubbling event or something else?
> 
> Thanks,
> Justin


Re: [FlexJS] findPopupHost issue

Posted by Justin Mclean <ju...@classsoftware.com>.
Hi,

> The issue was that the TitleBar was dispatching "close" with bubbles=true.
> This works fine on SWF but not on the HTML platform without some extra
> work. So I just had PanelView intercept the event and dispatch one from
> its strand. 

Out of interest is this because of a missing cloneEvent method or that it wasn’t listening on a parent of the item that dispatched the bubbling event or something else?

Thanks,
Justin

Re: [FlexJS] findPopupHost issue

Posted by Peter Ent <pe...@adobe.com.INVALID>.
I fixed this and committed/pushed it on the develop branch.

The issue was that the TitleBar was dispatching "close" with bubbles=true.
This works fine on SWF but not on the HTML platform without some extra
work. So I just had PanelView intercept the event and dispatch one from
its strand. 

—peter

On 7/20/17, 1:45 PM, "Peter Ent" <pe...@adobe.com.INVALID> wrote:

>I'm taking a look at this. Would you mind filing a JIRA on this?
>
>Thanks,
>Peter
>
>On 7/19/17, 1:23 PM, "PKumar" <pr...@gmail.com> wrote:
>
>>​Panel , close event not firing on JS side. swf side it is working fine.
>>This may  be an issue.​
>>
>>On Wed, Jul 19, 2017 at 11:00 PM, Prashant Kumar <pr...@gmail.com>
>>wrote:
>>
>>> ​I am having a gird  with one view column. On clicking view link , i
>>>want
>>> to open a popup to view information. I was unaware  about actual use of
>>> findPopupHost so i pass this. I was thinking it will work same as
>>> PopupManager works.
>>>
>>>
>>>
>>> On Tue, Jul 18, 2017 at 8:02 PM, Alex Harui-2 [via Apache Flex
>>> Development] <ml...@n4.nabble.com> wrote:
>>>
>>>> I guess I should have been more clear.  FlexJS supports multiple
>>>> component
>>>> sets and runtimes.  An Application class is probably always going to
>>>>be
>>>> the entry point of an application, but there is no guarantee in any
>>>> application that the Application class will be a display object or
>>>>even
>>>> the correct display object in the case of a multi-window desktop
>>>> application.
>>>>
>>>> IPopUpHost is an API for a good place to hang popups, but it is only a
>>>> coincidence that in the currently supported runtimes and most popular
>>>> component sets that the Application is mapped to a display object and
>>>> thus
>>>> an IPopUpHost.  We should not presume that will always be the case.
>>>>
>>>> If you are looking for a good place to hang a popup you probably want
>>>>it
>>>> to popup over some UI component.  So, it is best to start with that
>>>>known
>>>> IUIBase and find an IPopUpHost that will display the popup over that
>>>> IUIBase.  That way, your code will work in a multi-window app someday,
>>>> and
>>>> other future runtime environments as well.  And that's why
>>>>findPopUpHost
>>>> takes an IUIBase.  And in other future runtimes, it should be
>>>>implemented
>>>> to return a useful thing, but that thing may not be the Application
>>>> instance.
>>>>
>>>> So, the recommended practice is to use UIUtils.findPopupHost and pass
>>>>it
>>>> an IUIBase that you want the popup to float over.
>>>>
>>>> HTH,
>>>> -Alex
>>>>
>>>> On 7/17/17, 10:48 PM, "Yishay Weiss" <[hidden email]
>>>> <http:///user/SendEmail.jtp?type=node&node=63395&i=0>> wrote:
>>>>
>>>> >Even if the Application instance isn’t an IPopUpHost the method will
>>>> just
>>>> >return null, so the effect is the same as just doing (appInstance as
>>>> >IPopUpHost). I suspect the method is being misused rather than there
>>>> >being a problem with the method.
>>>> >
>>>> >From: Alex Harui<mailto:[hidden email]
>>>> <http:///user/SendEmail.jtp?type=node&node=63395&i=1>>
>>>> >Sent: Tuesday, July 18, 2017 8:33 AM
>>>> >To: [hidden email]
>>>><http:///user/SendEmail.jtp?type=node&node=63395&i=2>
>>>> <mailto:[hidden email]
>>>> <http:///user/SendEmail.jtp?type=node&node=63395&i=3>>
>>>> >Subject: Re: [FlexJS] findPopupHost issue
>>>> >
>>>> >FWIW, it may not be safe to assume that Application will always be an
>>>> >IPopUpHost, hence the utility function.
>>>> >
>>>> >Thanks,
>>>> >-Alex
>>>> >
>>>> >On 7/17/17, 9:59 PM, "piotrz" <[hidden email]
>>>> <http:///user/SendEmail.jtp?type=node&node=63395&i=4>> wrote:
>>>> >
>>>> >>Hi Yishay,
>>>> >>
>>>> >>That's a good point - Application is itself an IPopupHost. I've
>>>>asked
>>>> him
>>>> >>what is the use case for his host popup search.
>>>> >>
>>>> >>Thanks,
>>>> >>Piotr
>>>> >>
>>>> >>
>>>> >>
>>>> >>-----
>>>> >>Apache Flex PMC
>>>> >>[hidden email] <http:///user/SendEmail.jtp?type=node&node=63395&i=5>
>>>> >>--
>>>> >>View this message in context:
>>>> >>https://na01.safelinks.protection.outlook.com/?url=http%
>>>> 3A%2F%2Fapache-fl
>>>> >>e
>>>> 
>>>>>>x-development.2333347.n4.nabble.com%2FFlexJS-findPopupHost-issue-tp63
>>>>>>3
>>>>>>62p
>>>>
>>>> >>6
>>>> 
>>>>>>3366.html&data=02%7C01%7C%7Cbfd19d2deba646c64df208d4cd9c9798%7Cfa7b1b
>>>>>>5
>>>>>>a7b
>>>>
>>>> >>3
>>>> 
>>>>>>4438794aed2c178decee1%7C0%7C0%7C636359519816386890&sdata=CyeQuoJ0gVVl
>>>>>>2
>>>>>>UHU
>>>>
>>>> >>B
>>>> >>W%2B6hbyDNw%2FOSFuswfzeLTqUf3c%3D&reserved=0
>>>> >>Sent from the Apache Flex Development mailing list archive at
>>>> Nabble.com.
>>>> >
>>>>
>>>>
>>>>
>>>> ------------------------------
>>>> If you reply to this email, your message will be added to the
>>>>discussion
>>>> below:
>>>> 
>>>>https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fapache-
>>>>f
>>>>lex-development.2333347.n4.nabble.com%2FFlexJS-&data=02%7C01%7C%7Cdbbe7
>>>>d
>>>>adabb14873df6408d4cecda439%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7
>>>>C
>>>>636360830010202344&sdata=oGGZq5DF8kfi%2BpWLjJj75rbtkq7hz1hie9A2jQp3s5I%
>>>>3
>>>>D&reserved=0
>>>> findPopupHost-issue-tp63362p63395.html
>>>> To start a new topic under Apache Flex Development, email
>>>> ml+s2333347n1h43@n4.nabble.com
>>>> To unsubscribe from Apache Flex Development, click here
>>>> 
>>>><https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fapache
>>>>-
>>>>flex-development.2333347.n4.nabble.com%2Ftemplate%2FNamlServlet.jtp%3Fm
>>>>a
>>>>cro%3Dunsubscribe_by_code%26node%3D1%26code%3DcHJhc2hha3VtYXJAZ21haWwuY
>>>>2
>>>>9tfDF8LTU0MTcyMzE2NA&data=02%7C01%7C%7Cdbbe7dadabb14873df6408d4cecda439
>>>>%
>>>>7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636360830010202344&sdata=a
>>>>J
>>>>JdBJ4aEConEUVtIajKsLjirK9W8v2aWlFka87hQnY%3D&reserved=0==>
>>>> .
>>>> NAML
>>>> 
>>>><https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fapache
>>>>-
>>>>flex-development.2333347.n4.nabble.com%2Ftemplate%2FNamlServlet.jtp%3Fm
>>>>a
>>>>cro%3Dmacro_viewer%26id%3Dinstant_html%2521nabble%253Aemail.naml%26base
>>>>%
>>>>3Dnabble.naml.namespaces.BasicNamespace-nabble.view.web.template.Nabble
>>>>N
>>>>amespace-nabble.view.web.template.NodeNamespace%26breadcrumbs%3Dnotify_
>>>>s
>>>>ubscribers%2521nabble%253Aemail.naml-instant_emails%2521nabble%253Aemai
>>>>l
>>>>.naml-send_instant_email%2521nabble%253Aemail.naml&data=02%7C01%7C%7Cdb
>>>>b
>>>>e7dadabb14873df6408d4cecda439%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C
>>>>0
>>>>%7C636360830010202344&sdata=AOLnAyvDgJXXufwbHxv%2Be8My3Dc%2BKfGrwZU1XVT
>>>>T
>>>>i%2BI%3D&reserved=0>
>>>>
>>>
>>>
>>>
>>> --
>>> *Regards,*
>>> Prashant Kumar* | *Mob.: +91 8408811225 <084088%2011225>
>>>
>>
>>
>>
>>-- 
>>*Regards,*
>>Prashant Kumar* | *Mob.: +91 8408811225
>>
>>
>>
>>
>>--
>>View this message in context:
>>https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fapache-fl
>>e
>>x-development.2333347.n4.nabble.com%2FFlexJS-findPopupHost-issue-tp63362p
>>6
>>3425.html&data=02%7C01%7C%7Cdbbe7dadabb14873df6408d4cecda439%7Cfa7b1b5a7b
>>3
>>4438794aed2c178decee1%7C0%7C0%7C636360830010202344&sdata=W%2BHgpRypCA%2Bl
>>M
>>iEbOnnk8KsFlm0XJDerhm18F2s%2FZTc%3D&reserved=0
>>Sent from the Apache Flex Development mailing list archive at Nabble.com.
>


Re: [FlexJS] findPopupHost issue

Posted by Peter Ent <pe...@adobe.com.INVALID>.
I'm taking a look at this. Would you mind filing a JIRA on this?

Thanks,
Peter

On 7/19/17, 1:23 PM, "PKumar" <pr...@gmail.com> wrote:

>​Panel , close event not firing on JS side. swf side it is working fine.
>This may  be an issue.​
>
>On Wed, Jul 19, 2017 at 11:00 PM, Prashant Kumar <pr...@gmail.com>
>wrote:
>
>> ​I am having a gird  with one view column. On clicking view link , i
>>want
>> to open a popup to view information. I was unaware  about actual use of
>> findPopupHost so i pass this. I was thinking it will work same as
>> PopupManager works.
>>
>>
>>
>> On Tue, Jul 18, 2017 at 8:02 PM, Alex Harui-2 [via Apache Flex
>> Development] <ml...@n4.nabble.com> wrote:
>>
>>> I guess I should have been more clear.  FlexJS supports multiple
>>> component
>>> sets and runtimes.  An Application class is probably always going to be
>>> the entry point of an application, but there is no guarantee in any
>>> application that the Application class will be a display object or even
>>> the correct display object in the case of a multi-window desktop
>>> application.
>>>
>>> IPopUpHost is an API for a good place to hang popups, but it is only a
>>> coincidence that in the currently supported runtimes and most popular
>>> component sets that the Application is mapped to a display object and
>>> thus
>>> an IPopUpHost.  We should not presume that will always be the case.
>>>
>>> If you are looking for a good place to hang a popup you probably want
>>>it
>>> to popup over some UI component.  So, it is best to start with that
>>>known
>>> IUIBase and find an IPopUpHost that will display the popup over that
>>> IUIBase.  That way, your code will work in a multi-window app someday,
>>> and
>>> other future runtime environments as well.  And that's why
>>>findPopUpHost
>>> takes an IUIBase.  And in other future runtimes, it should be
>>>implemented
>>> to return a useful thing, but that thing may not be the Application
>>> instance.
>>>
>>> So, the recommended practice is to use UIUtils.findPopupHost and pass
>>>it
>>> an IUIBase that you want the popup to float over.
>>>
>>> HTH,
>>> -Alex
>>>
>>> On 7/17/17, 10:48 PM, "Yishay Weiss" <[hidden email]
>>> <http:///user/SendEmail.jtp?type=node&node=63395&i=0>> wrote:
>>>
>>> >Even if the Application instance isn’t an IPopUpHost the method will
>>> just
>>> >return null, so the effect is the same as just doing (appInstance as
>>> >IPopUpHost). I suspect the method is being misused rather than there
>>> >being a problem with the method.
>>> >
>>> >From: Alex Harui<mailto:[hidden email]
>>> <http:///user/SendEmail.jtp?type=node&node=63395&i=1>>
>>> >Sent: Tuesday, July 18, 2017 8:33 AM
>>> >To: [hidden email]
>>><http:///user/SendEmail.jtp?type=node&node=63395&i=2>
>>> <mailto:[hidden email]
>>> <http:///user/SendEmail.jtp?type=node&node=63395&i=3>>
>>> >Subject: Re: [FlexJS] findPopupHost issue
>>> >
>>> >FWIW, it may not be safe to assume that Application will always be an
>>> >IPopUpHost, hence the utility function.
>>> >
>>> >Thanks,
>>> >-Alex
>>> >
>>> >On 7/17/17, 9:59 PM, "piotrz" <[hidden email]
>>> <http:///user/SendEmail.jtp?type=node&node=63395&i=4>> wrote:
>>> >
>>> >>Hi Yishay,
>>> >>
>>> >>That's a good point - Application is itself an IPopupHost. I've asked
>>> him
>>> >>what is the use case for his host popup search.
>>> >>
>>> >>Thanks,
>>> >>Piotr
>>> >>
>>> >>
>>> >>
>>> >>-----
>>> >>Apache Flex PMC
>>> >>[hidden email] <http:///user/SendEmail.jtp?type=node&node=63395&i=5>
>>> >>--
>>> >>View this message in context:
>>> >>https://na01.safelinks.protection.outlook.com/?url=http%
>>> 3A%2F%2Fapache-fl
>>> >>e
>>> 
>>>>>x-development.2333347.n4.nabble.com%2FFlexJS-findPopupHost-issue-tp633
>>>>>62p
>>>
>>> >>6
>>> 
>>>>>3366.html&data=02%7C01%7C%7Cbfd19d2deba646c64df208d4cd9c9798%7Cfa7b1b5
>>>>>a7b
>>>
>>> >>3
>>> 
>>>>>4438794aed2c178decee1%7C0%7C0%7C636359519816386890&sdata=CyeQuoJ0gVVl2
>>>>>UHU
>>>
>>> >>B
>>> >>W%2B6hbyDNw%2FOSFuswfzeLTqUf3c%3D&reserved=0
>>> >>Sent from the Apache Flex Development mailing list archive at
>>> Nabble.com.
>>> >
>>>
>>>
>>>
>>> ------------------------------
>>> If you reply to this email, your message will be added to the
>>>discussion
>>> below:
>>> 
>>>https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fapache-f
>>>lex-development.2333347.n4.nabble.com%2FFlexJS-&data=02%7C01%7C%7Cdbbe7d
>>>adabb14873df6408d4cecda439%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C
>>>636360830010202344&sdata=oGGZq5DF8kfi%2BpWLjJj75rbtkq7hz1hie9A2jQp3s5I%3
>>>D&reserved=0
>>> findPopupHost-issue-tp63362p63395.html
>>> To start a new topic under Apache Flex Development, email
>>> ml+s2333347n1h43@n4.nabble.com
>>> To unsubscribe from Apache Flex Development, click here
>>> 
>>><https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fapache-
>>>flex-development.2333347.n4.nabble.com%2Ftemplate%2FNamlServlet.jtp%3Fma
>>>cro%3Dunsubscribe_by_code%26node%3D1%26code%3DcHJhc2hha3VtYXJAZ21haWwuY2
>>>9tfDF8LTU0MTcyMzE2NA&data=02%7C01%7C%7Cdbbe7dadabb14873df6408d4cecda439%
>>>7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636360830010202344&sdata=aJ
>>>JdBJ4aEConEUVtIajKsLjirK9W8v2aWlFka87hQnY%3D&reserved=0==>
>>> .
>>> NAML
>>> 
>>><https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fapache-
>>>flex-development.2333347.n4.nabble.com%2Ftemplate%2FNamlServlet.jtp%3Fma
>>>cro%3Dmacro_viewer%26id%3Dinstant_html%2521nabble%253Aemail.naml%26base%
>>>3Dnabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleN
>>>amespace-nabble.view.web.template.NodeNamespace%26breadcrumbs%3Dnotify_s
>>>ubscribers%2521nabble%253Aemail.naml-instant_emails%2521nabble%253Aemail
>>>.naml-send_instant_email%2521nabble%253Aemail.naml&data=02%7C01%7C%7Cdbb
>>>e7dadabb14873df6408d4cecda439%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0
>>>%7C636360830010202344&sdata=AOLnAyvDgJXXufwbHxv%2Be8My3Dc%2BKfGrwZU1XVTT
>>>i%2BI%3D&reserved=0>
>>>
>>
>>
>>
>> --
>> *Regards,*
>> Prashant Kumar* | *Mob.: +91 8408811225 <084088%2011225>
>>
>
>
>
>-- 
>*Regards,*
>Prashant Kumar* | *Mob.: +91 8408811225
>
>
>
>
>--
>View this message in context:
>https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fapache-fle
>x-development.2333347.n4.nabble.com%2FFlexJS-findPopupHost-issue-tp63362p6
>3425.html&data=02%7C01%7C%7Cdbbe7dadabb14873df6408d4cecda439%7Cfa7b1b5a7b3
>4438794aed2c178decee1%7C0%7C0%7C636360830010202344&sdata=W%2BHgpRypCA%2BlM
>iEbOnnk8KsFlm0XJDerhm18F2s%2FZTc%3D&reserved=0
>Sent from the Apache Flex Development mailing list archive at Nabble.com.


Re: [FlexJS] findPopupHost issue

Posted by PKumar <pr...@gmail.com>.
​Panel , close event not firing on JS side. swf side it is working fine.
This may  be an issue.​

On Wed, Jul 19, 2017 at 11:00 PM, Prashant Kumar <pr...@gmail.com>
wrote:

> ​I am having a gird  with one view column. On clicking view link , i want
> to open a popup to view information. I was unaware  about actual use of
> findPopupHost so i pass this. I was thinking it will work same as
> PopupManager works.
>
>
>
> On Tue, Jul 18, 2017 at 8:02 PM, Alex Harui-2 [via Apache Flex
> Development] <ml...@n4.nabble.com> wrote:
>
>> I guess I should have been more clear.  FlexJS supports multiple
>> component
>> sets and runtimes.  An Application class is probably always going to be
>> the entry point of an application, but there is no guarantee in any
>> application that the Application class will be a display object or even
>> the correct display object in the case of a multi-window desktop
>> application.
>>
>> IPopUpHost is an API for a good place to hang popups, but it is only a
>> coincidence that in the currently supported runtimes and most popular
>> component sets that the Application is mapped to a display object and
>> thus
>> an IPopUpHost.  We should not presume that will always be the case.
>>
>> If you are looking for a good place to hang a popup you probably want it
>> to popup over some UI component.  So, it is best to start with that known
>> IUIBase and find an IPopUpHost that will display the popup over that
>> IUIBase.  That way, your code will work in a multi-window app someday,
>> and
>> other future runtime environments as well.  And that's why findPopUpHost
>> takes an IUIBase.  And in other future runtimes, it should be implemented
>> to return a useful thing, but that thing may not be the Application
>> instance.
>>
>> So, the recommended practice is to use UIUtils.findPopupHost and pass it
>> an IUIBase that you want the popup to float over.
>>
>> HTH,
>> -Alex
>>
>> On 7/17/17, 10:48 PM, "Yishay Weiss" <[hidden email]
>> <http:///user/SendEmail.jtp?type=node&node=63395&i=0>> wrote:
>>
>> >Even if the Application instance isn’t an IPopUpHost the method will
>> just
>> >return null, so the effect is the same as just doing (appInstance as
>> >IPopUpHost). I suspect the method is being misused rather than there
>> >being a problem with the method.
>> >
>> >From: Alex Harui<mailto:[hidden email]
>> <http:///user/SendEmail.jtp?type=node&node=63395&i=1>>
>> >Sent: Tuesday, July 18, 2017 8:33 AM
>> >To: [hidden email] <http:///user/SendEmail.jtp?type=node&node=63395&i=2>
>> <mailto:[hidden email]
>> <http:///user/SendEmail.jtp?type=node&node=63395&i=3>>
>> >Subject: Re: [FlexJS] findPopupHost issue
>> >
>> >FWIW, it may not be safe to assume that Application will always be an
>> >IPopUpHost, hence the utility function.
>> >
>> >Thanks,
>> >-Alex
>> >
>> >On 7/17/17, 9:59 PM, "piotrz" <[hidden email]
>> <http:///user/SendEmail.jtp?type=node&node=63395&i=4>> wrote:
>> >
>> >>Hi Yishay,
>> >>
>> >>That's a good point - Application is itself an IPopupHost. I've asked
>> him
>> >>what is the use case for his host popup search.
>> >>
>> >>Thanks,
>> >>Piotr
>> >>
>> >>
>> >>
>> >>-----
>> >>Apache Flex PMC
>> >>[hidden email] <http:///user/SendEmail.jtp?type=node&node=63395&i=5>
>> >>--
>> >>View this message in context:
>> >>https://na01.safelinks.protection.outlook.com/?url=http%
>> 3A%2F%2Fapache-fl
>> >>e
>> >>x-development.2333347.n4.nabble.com%2FFlexJS-findPopupHost-issue-tp63362p
>>
>> >>6
>> >>3366.html&data=02%7C01%7C%7Cbfd19d2deba646c64df208d4cd9c9798%7Cfa7b1b5a7b
>>
>> >>3
>> >>4438794aed2c178decee1%7C0%7C0%7C636359519816386890&sdata=CyeQuoJ0gVVl2UHU
>>
>> >>B
>> >>W%2B6hbyDNw%2FOSFuswfzeLTqUf3c%3D&reserved=0
>> >>Sent from the Apache Flex Development mailing list archive at
>> Nabble.com.
>> >
>>
>>
>>
>> ------------------------------
>> If you reply to this email, your message will be added to the discussion
>> below:
>> http://apache-flex-development.2333347.n4.nabble.com/FlexJS-
>> findPopupHost-issue-tp63362p63395.html
>> To start a new topic under Apache Flex Development, email
>> ml+s2333347n1h43@n4.nabble.com
>> To unsubscribe from Apache Flex Development, click here
>> <http://apache-flex-development.2333347.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=1&code=cHJhc2hha3VtYXJAZ21haWwuY29tfDF8LTU0MTcyMzE2NA==>
>> .
>> NAML
>> <http://apache-flex-development.2333347.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>>
>
>
>
> --
> *Regards,*
> Prashant Kumar* | *Mob.: +91 8408811225 <084088%2011225>
>



-- 
*Regards,*
Prashant Kumar* | *Mob.: +91 8408811225




--
View this message in context: http://apache-flex-development.2333347.n4.nabble.com/FlexJS-findPopupHost-issue-tp63362p63425.html
Sent from the Apache Flex Development mailing list archive at Nabble.com.

Re: [FlexJS] findPopupHost issue

Posted by Alex Harui <ah...@adobe.com.INVALID>.
I guess I should have been more clear.  FlexJS supports multiple component
sets and runtimes.  An Application class is probably always going to be
the entry point of an application, but there is no guarantee in any
application that the Application class will be a display object or even
the correct display object in the case of a multi-window desktop
application.

IPopUpHost is an API for a good place to hang popups, but it is only a
coincidence that in the currently supported runtimes and most popular
component sets that the Application is mapped to a display object and thus
an IPopUpHost.  We should not presume that will always be the case.

If you are looking for a good place to hang a popup you probably want it
to popup over some UI component.  So, it is best to start with that known
IUIBase and find an IPopUpHost that will display the popup over that
IUIBase.  That way, your code will work in a multi-window app someday, and
other future runtime environments as well.  And that's why findPopUpHost
takes an IUIBase.  And in other future runtimes, it should be implemented
to return a useful thing, but that thing may not be the Application
instance.

So, the recommended practice is to use UIUtils.findPopupHost and pass it
an IUIBase that you want the popup to float over.

HTH,
-Alex

On 7/17/17, 10:48 PM, "Yishay Weiss" <yi...@hotmail.com> wrote:

>Even if the Application instance isn’t an IPopUpHost the method will just
>return null, so the effect is the same as just doing (appInstance as
>IPopUpHost). I suspect the method is being misused rather than there
>being a problem with the method.
>
>From: Alex Harui<ma...@adobe.com.INVALID>
>Sent: Tuesday, July 18, 2017 8:33 AM
>To: dev@flex.apache.org<ma...@flex.apache.org>
>Subject: Re: [FlexJS] findPopupHost issue
>
>FWIW, it may not be safe to assume that Application will always be an
>IPopUpHost, hence the utility function.
>
>Thanks,
>-Alex
>
>On 7/17/17, 9:59 PM, "piotrz" <pi...@gmail.com> wrote:
>
>>Hi Yishay,
>>
>>That's a good point - Application is itself an IPopupHost. I've asked him
>>what is the use case for his host popup search.
>>
>>Thanks,
>>Piotr
>>
>>
>>
>>-----
>>Apache Flex PMC
>>piotrzarzycki21@gmail.com
>>--
>>View this message in context:
>>https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fapache-fl
>>e
>>x-development.2333347.n4.nabble.com%2FFlexJS-findPopupHost-issue-tp63362p
>>6
>>3366.html&data=02%7C01%7C%7Cbfd19d2deba646c64df208d4cd9c9798%7Cfa7b1b5a7b
>>3
>>4438794aed2c178decee1%7C0%7C0%7C636359519816386890&sdata=CyeQuoJ0gVVl2UHU
>>B
>>W%2B6hbyDNw%2FOSFuswfzeLTqUf3c%3D&reserved=0
>>Sent from the Apache Flex Development mailing list archive at Nabble.com.
>


RE: [FlexJS] findPopupHost issue

Posted by Yishay Weiss <yi...@hotmail.com>.
Even if the Application instance isn’t an IPopUpHost the method will just return null, so the effect is the same as just doing (appInstance as IPopUpHost). I suspect the method is being misused rather than there being a problem with the method.

From: Alex Harui<ma...@adobe.com.INVALID>
Sent: Tuesday, July 18, 2017 8:33 AM
To: dev@flex.apache.org<ma...@flex.apache.org>
Subject: Re: [FlexJS] findPopupHost issue

FWIW, it may not be safe to assume that Application will always be an
IPopUpHost, hence the utility function.

Thanks,
-Alex

On 7/17/17, 9:59 PM, "piotrz" <pi...@gmail.com> wrote:

>Hi Yishay,
>
>That's a good point - Application is itself an IPopupHost. I've asked him
>what is the use case for his host popup search.
>
>Thanks,
>Piotr
>
>
>
>-----
>Apache Flex PMC
>piotrzarzycki21@gmail.com
>--
>View this message in context:
>https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fapache-fle
>x-development.2333347.n4.nabble.com%2FFlexJS-findPopupHost-issue-tp63362p6
>3366.html&data=02%7C01%7C%7Cbfd19d2deba646c64df208d4cd9c9798%7Cfa7b1b5a7b3
>4438794aed2c178decee1%7C0%7C0%7C636359519816386890&sdata=CyeQuoJ0gVVl2UHUB
>W%2B6hbyDNw%2FOSFuswfzeLTqUf3c%3D&reserved=0
>Sent from the Apache Flex Development mailing list archive at Nabble.com.


Re: [FlexJS] findPopupHost issue

Posted by Alex Harui <ah...@adobe.com.INVALID>.
FWIW, it may not be safe to assume that Application will always be an
IPopUpHost, hence the utility function.

Thanks,
-Alex

On 7/17/17, 9:59 PM, "piotrz" <pi...@gmail.com> wrote:

>Hi Yishay,
>
>That's a good point - Application is itself an IPopupHost. I've asked him
>what is the use case for his host popup search.
>
>Thanks, 
>Piotr
>
>
>
>-----
>Apache Flex PMC
>piotrzarzycki21@gmail.com
>--
>View this message in context:
>https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fapache-fle
>x-development.2333347.n4.nabble.com%2FFlexJS-findPopupHost-issue-tp63362p6
>3366.html&data=02%7C01%7C%7Cbfd19d2deba646c64df208d4cd9c9798%7Cfa7b1b5a7b3
>4438794aed2c178decee1%7C0%7C0%7C636359519816386890&sdata=CyeQuoJ0gVVl2UHUB
>W%2B6hbyDNw%2FOSFuswfzeLTqUf3c%3D&reserved=0
>Sent from the Apache Flex Development mailing list archive at Nabble.com.


RE: [FlexJS] findPopupHost issue

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

That's a good point - Application is itself an IPopupHost. I've asked him
what is the use case for his host popup search.

Thanks, 
Piotr



-----
Apache Flex PMC
piotrzarzycki21@gmail.com
--
View this message in context: http://apache-flex-development.2333347.n4.nabble.com/FlexJS-findPopupHost-issue-tp63362p63366.html
Sent from the Apache Flex Development mailing list archive at Nabble.com.

RE: [FlexJS] findPopupHost issue

Posted by Yishay Weiss <yi...@hotmail.com>.
I think there’s confusion over what a popup host is. A popup host is where you would add an IPopUp. UIUtils.findPopUpHost(myComp as IUIBase) finds the closest ancestor for myComp to which a popup can be added. These lines from ComboBoxView demonstrate the usage:

                           var popupHost:IPopUpHost = UIUtils.findPopUpHost(_strand as IUIBase);
                           popupHost.addElement(list);

Regarding Prashant’s issue, an application is usually in itself an IPopUpHost so there’s no need to use that function on an app.

From: piotrz<ma...@gmail.com>
Sent: Tuesday, July 18, 2017 7:31 AM
To: dev@flex.apache.org<ma...@flex.apache.org>
Subject: [FlexJS] findPopupHost issue

Hi Team,

Prashant on users list raised an issue with UIUtils.findPopUpHost(this as
IUIBase) [1]. I did quick look into that and I think we should have in
findPopUpHost(start:IPopupHost) instead findPopUpHost(start:IUIBase) or Am I
miss something ?

[1]
http://apache-flex-users.2333346.n4.nabble.com/FlexJS-findPopUpHost-Issue-td15474.html

Thanks,
Piotr



-----
Apache Flex PMC
piotrzarzycki21@gmail.com
--
View this message in context: http://apache-flex-development.2333347.n4.nabble.com/FlexJS-findPopupHost-issue-tp63362.html
Sent from the Apache Flex Development mailing list archive at Nabble.com.