In addition of Application.application.method(), you should be able to have in
your Alert
component (or the component that is aware of the Alert box and can detect a
close event),
something like this Application.application.dispatchEvent(new
Event(MyAlertEvent.ALERT_CLOSED)) and in the other c
gt;
To: flexcoders@yahoogroups.com
Sent: Tuesday, October 21, 2008 10:52:11 PM
Subject: [flexcoders] Re: Alert.show - Detect when closed from another mxml
component
Thanks for all the suggestions. I am sure one if not all of them would
work. Just out of curiosity, in Flash, you can set a listen
yes you can do it with the stage, as suggested previously in (2) (generic
solution) but instead of catching it at the component level you can catch it
in the application. If you do not want to do all (2) you can just throw a
new click event from the alertclose function with bubbles, and so on set,
Thanks for all the suggestions. I am sure one if not all of them would
work. Just out of curiosity, in Flash, you can set a listener for the
Stage to receive via capture or bubble, for example, mouseclicks
(Stage.addEventListener(MouseEvent.CLICK,clickHandler)). Is there no
way to do this in Flex w
Forgot to mention that (1) is 'dirty' because you will need to pass a
reference of component B to component A on initialization, so
component A knows about B, something similar to:
[Bindable]
componentBReference:ComponentB ;
...
--- In flexcoders@yahoogroups.com
Hm, I am doing something similar in some item renderers (Have in mind
that there might be an easier / better way i am still learning this):
I can think of two ways
1) (simple and dirty):
Register the callback and in the callback call a function on the other
component that you are interested:
Thanks. That is not exactly what I am asking. I understand how to set
a callback/listener for Alert.show() as you explained. However, is
there another way to detect from another component when the alert has
been closed (i.e. bubbling, etc.)?
--- In flexcoders@yahoogroups.com, "fotis.chatzinikos"
<
Hi, if i understand correctly, the following doesit:
Alert.show("This is the alert text.","",4,null,alertClosed) ;
where alertClosed is an event listener...
Check the asdoc for the alert.show method ;-)
--- In flexcoders@yahoogroups.com, "sleblang" <[EMAIL PROTECTED]> wrote:
>
> I have an Aler
8 matches
Mail list logo