Re: [flexcoders] Mutliple alert copies

2007-12-05 Thread Dave Glasser
Did you put some tracing code in to prove that that code isn't actually 
executed twice the second time around? Event-driven software can be a tricky 
business.
   
  Maybe you neglected to remove an old event listener from some object that is 
dispatching the event that ultimately executes that code, and it's still 
lurking in memory, receiving that event and showing your Alert.

Richard Rodseth [EMAIL PROTECTED] wrote:
   I have a wizard which ends with the following alert: 

 alert = Alert.show(The message has been sent. Would you like to send 
another?, , Alert.YES | Alert.NO, null, handleClose); 

If the user chooses YES the alert disappears from view, but next time there are 
two of them. Any obvious mistakes?



 


Re: [flexcoders] Mutliple alert copies

2007-12-05 Thread Richard Rodseth
You're right, it was getting shown twice. Thanks. I was re-using the same
HTTPService instance, and I'm not sure why I got two completion events. I'm
now instantiating a new instance of the service.

On Dec 5, 2007 1:08 PM, Dave Glasser [EMAIL PROTECTED] wrote:

   Did you put some tracing code in to prove that that code isn't actually
 executed twice the second time around? Event-driven software can be a tricky
 business.

 Maybe you neglected to remove an old event listener from some object that
 is dispatching the event that ultimately executes that code, and it's still
 lurking in memory, receiving that event and showing your Alert.


 *Richard Rodseth [EMAIL PROTECTED]* wrote:

   I have a wizard which ends with the following alert:

  alert = Alert.show(The message has been sent. Would you like to send
 another?, , Alert.YES | Alert.NO, null, handleClose);

 If the user chooses YES the alert disappears from view, but next time
 there are two of them. Any obvious mistakes?