You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@flex.apache.org by Yishay Weiss <yi...@hotmail.com> on 2016/07/02 15:47:41 UTC

Re: [FlexJS] How to use SimpleAlert from a class that's not a IPopUpParent?

So in mx.controls.Alert (regular Flex SDK) they defaulted to
FlexGlobals.topLevelApplication.

Is there an equivalent reference in FlexJS?

Thanks.



--
View this message in context: http://apache-flex-users.2333346.n4.nabble.com/FlexJS-How-to-use-SimpleAlert-from-a-class-that-s-not-a-IPopUpParent-tp12941p12944.html
Sent from the Apache Flex Users mailing list archive at Nabble.com.

Re: [FlexJS] How to use SimpleAlert from a class that's not a IPopUpParent?

Posted by Alex Harui <ah...@adobe.com>.

On 7/2/16, 8:47 AM, "Yishay Weiss" <yi...@hotmail.com> wrote:

>
>So in mx.controls.Alert (regular Flex SDK) they defaulted to
>FlexGlobals.topLevelApplication.
>
>Is there an equivalent reference in FlexJS?

Not yet. IMO, in the regular Flex SDK, it had some drawbacks, especially
for multi-window AIR apps where defaulting to the main window wasn't a
good idea, so the basic set of components does not currently make such
assumptions.  You can create your own Singleton/Global class or maybe we
should have a static on the various Application classes, not sure.  We'll
see what others want to use and eventually include it in FlexJS, but we
are trying to make sure we don't create too many unnecessary
interdependencies.  Some NotSoSimpleAlert or
AlertThatAssumesApplicationMainWindow class can make those assumptions
instead.

HTH,
-Alex