RE: [flexcoders] Re: Popup only works once
Cairngorm .99 should have the ability to unregister view helpers from the ViewLocator so when this is released you will need to unregister the View in the destruction sequence of the popup. In the mean time there are these options (may be more out there): Alistair released a patch for Cairngorm some months ago to address this; the patch will be part of the forthcoming 0.99 release: The URL on Yahoogroups is: http://groups.yahoo.com/group/flexcoders/message/6148 Here's the gist of the email: public function initialized( view : Object, id : String ) : Void { this.view = view; this.id = id; ViewLocator.getInstance().register( id, this ); view.addEventListener( unload, Delegate.create( this, unregisterView ) ); } private function unregisterView() : Void { ViewLocator.getInstance().unregister( id ); } private var id : String; private var view : Object; Add that to the ViewHelper base-class, and it gives you a method that allows you to unregister the view; the motivation for this was people that were using ViewHelper inside Popup windows; when the popup window was destroyed with deletePopUp() it was deleting the view, but keeping the ViewHelper reference - so we now ask people to explicitly unregister views in popups when they are destroyed. Hope that helps in the interim. Best, Steven -- Steven Webster Technical Director iteration::two This e-mail and any associated attachments transmitted with it may contain confidential information and must not be copied, or disclosed, or used by anyone other than the intended recipient(s). If you are not the intended recipient(s) please destroy this e-mail, and any copies of it, immediately. Please also note that while software systems have been used to try to ensure that this e-mail has been swept for viruses, iteration::two do not accept responsibility for any damage or loss caused in respect of any viruses transmitted by the e-mail. Please ensure your own checks are carried out before any attachments are opened. -- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.308 / Virus Database: 266.9.11 - Release Date: 14/04/2005 Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
RE: [flexcoders] Re: Popup only works once
Missed that email, thanks for the repost. -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Steven Webster Sent: Friday, April 15, 2005 7:27 AM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] Re: Popup only works once Cairngorm .99 should have the ability to unregister view helpers from the ViewLocator so when this is released you will need to unregister the View in the destruction sequence of the popup. In the mean time there are these options (may be more out there): Alistair released a patch for Cairngorm some months ago to address this; the patch will be part of the forthcoming 0.99 release: The URL on Yahoogroups is: http://groups.yahoo.com/group/flexcoders/message/6148 Here's the gist of the email: public function initialized( view : Object, id : String ) : Void { this.view = view; this.id = id; ViewLocator.getInstance().register( id, this ); view.addEventListener( unload, Delegate.create( this, unregisterView ) ); } private function unregisterView() : Void { ViewLocator.getInstance().unregister( id ); } private var id : String; private var view : Object; Add that to the ViewHelper base-class, and it gives you a method that allows you to unregister the view; the motivation for this was people that were using ViewHelper inside Popup windows; when the popup window was destroyed with deletePopUp() it was deleting the view, but keeping the ViewHelper reference - so we now ask people to explicitly unregister views in popups when they are destroyed. Hope that helps in the interim. Best, Steven -- Steven Webster Technical Director iteration::two This e-mail and any associated attachments transmitted with it may contain confidential information and must not be copied, or disclosed, or used by anyone other than the intended recipient(s). If you are not the intended recipient(s) please destroy this e-mail, and any copies of it, immediately. Please also note that while software systems have been used to try to ensure that this e-mail has been swept for viruses, iteration::two do not accept responsibility for any damage or loss caused in respect of any viruses transmitted by the e-mail. Please ensure your own checks are carried out before any attachments are opened. -- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.308 / Virus Database: 266.9.11 - Release Date: 14/04/2005 Yahoo! Groups Links Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
RE: [flexcoders] Re: Popup only works once
Post a simple sample app. Half the time, just the process of doing that reveals the problem. Tracy -Original Message- From: Rafael M. Martinelli [mailto:[EMAIL PROTECTED] Sent: Thursday, April 14, 2005 11:37 AM To: flexcoders@yahoogroups.com Subject: RES: [flexcoders] Re: Popup only works once I'm facing the same problem. Did you find what's wrong? Thanks -Mensagem original- De: cazzaran [mailto:[EMAIL PROTECTED] Enviada em: sexta-feira, 8 de abril de 2005 13:37 Para: flexcoders@yahoogroups.com Assunto: [flexcoders] Re: Popup only works once That didn't seem to change my problem. My popup still refuses to come back once it's been closed once. this.deletePopUp() (or using the doLater) is the right place to be doing this, right? -Josh --- In flexcoders@yahoogroups.com, Tracy Spratt [EMAIL PROTECTED] wrote: Just for fun, try the magic doLater(). doLater(this, deletePopUp) Tracy -Original Message- From: cazzaran [mailto:[EMAIL PROTECTED] Sent: Thursday, April 07, 2005 6:00 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Popup only works once I have an Add Group button in my MXML that calls a method: public function showAddGroupWindow():Void { var popup = PopUpManager.createPopUp(MovieClip(mx.core.Application.application), addGroupWindow, true); popup.centerPopUp(); } In my popup MXML, which is just a simple title window, I have a save and a cancel button. My cancel button calls the method: function cancelButtonPressed() { this.deletePopUp(); } The save button is having the same problem... If I click either button, the popup closes, but the Add Group button wont open another popup. I've verified that it's still calling the showAddGroupWindow() method, but for some reason, nothing pops up anymore. I have a feeling the deletePopUp() isn't fully getting rid of it... where am I going wrong? Yahoo! Groups Links Yahoo! Groups Links -- No virus found in this incoming message. Checked by AVG Anti-Virus. Version: 7.0.308 / Virus Database: 266.9.5 - Release Date: 7/4/2005 -- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.308 / Virus Database: 266.9.10 - Release Date: 14/4/2005 Yahoo! Groups Links Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
RE: [flexcoders] Re: Popup only works once
If you're using the cairngorm currently available, your view helper is not being deregistered. Search the archives for 'cairngorm' and 'deregister'. -Original Message- From: Rafael M. Martinelli [mailto:[EMAIL PROTECTED] Sent: 14 April 2005 05:37 PM To: flexcoders@yahoogroups.com Subject: RES: [flexcoders] Re: Popup only works once I'm facing the same problem. Did you find what's wrong? Thanks -Mensagem original- De: cazzaran [mailto:[EMAIL PROTECTED] Enviada em: sexta-feira, 8 de abril de 2005 13:37 Para: flexcoders@yahoogroups.com Assunto: [flexcoders] Re: Popup only works once That didn't seem to change my problem. My popup still refuses to come back once it's been closed once. this.deletePopUp() (or using the doLater) is the right place to be doing this, right? -Josh --- In flexcoders@yahoogroups.com, Tracy Spratt [EMAIL PROTECTED] wrote: Just for fun, try the magic doLater(). doLater(this, deletePopUp) Tracy -Original Message- From: cazzaran [mailto:[EMAIL PROTECTED] Sent: Thursday, April 07, 2005 6:00 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Popup only works once I have an Add Group button in my MXML that calls a method: public function showAddGroupWindow():Void { var popup = PopUpManager.createPopUp(MovieClip(mx.core.Application.application), addGroupWindow, true); popup.centerPopUp(); } In my popup MXML, which is just a simple title window, I have a save and a cancel button. My cancel button calls the method: function cancelButtonPressed() { this.deletePopUp(); } The save button is having the same problem... If I click either button, the popup closes, but the Add Group button wont open another popup. I've verified that it's still calling the showAddGroupWindow() method, but for some reason, nothing pops up anymore. I have a feeling the deletePopUp() isn't fully getting rid of it... where am I going wrong? Yahoo! Groups Links Yahoo! Groups Links -- No virus found in this incoming message. Checked by AVG Anti-Virus. Version: 7.0.308 / Virus Database: 266.9.5 - Release Date: 7/4/2005 -- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.308 / Virus Database: 266.9.10 - Release Date: 14/4/2005 Yahoo! Groups Links Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
RE: [flexcoders] Re: Popup only works once
Are you guys using the Cairngorm Framework? If so, does your popup window have a viewHelper assigned to it? -Original Message- From: Rafael M. Martinelli [mailto:[EMAIL PROTECTED] Sent: Thursday, April 14, 2005 11:37 AM To: flexcoders@yahoogroups.com Subject: RES: [flexcoders] Re: Popup only works once I'm facing the same problem. Did you find what's wrong? Thanks -Mensagem original- De: cazzaran [mailto:[EMAIL PROTECTED] Enviada em: sexta-feira, 8 de abril de 2005 13:37 Para: flexcoders@yahoogroups.com Assunto: [flexcoders] Re: Popup only works once That didn't seem to change my problem. My popup still refuses to come back once it's been closed once. this.deletePopUp() (or using the doLater) is the right place to be doing this, right? -Josh --- In flexcoders@yahoogroups.com, Tracy Spratt [EMAIL PROTECTED] wrote: Just for fun, try the magic doLater(). doLater(this, deletePopUp) Tracy -Original Message- From: cazzaran [mailto:[EMAIL PROTECTED] Sent: Thursday, April 07, 2005 6:00 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Popup only works once I have an Add Group button in my MXML that calls a method: public function showAddGroupWindow():Void { var popup = PopUpManager.createPopUp(MovieClip(mx.core.Application.application), addGroupWindow, true); popup.centerPopUp(); } In my popup MXML, which is just a simple title window, I have a save and a cancel button. My cancel button calls the method: function cancelButtonPressed() { this.deletePopUp(); } The save button is having the same problem... If I click either button, the popup closes, but the Add Group button wont open another popup. I've verified that it's still calling the showAddGroupWindow() method, but for some reason, nothing pops up anymore. I have a feeling the deletePopUp() isn't fully getting rid of it... where am I going wrong? Yahoo! Groups Links Yahoo! Groups Links -- No virus found in this incoming message. Checked by AVG Anti-Virus. Version: 7.0.308 / Virus Database: 266.9.5 - Release Date: 7/4/2005 -- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.308 / Virus Database: 266.9.10 - Release Date: 14/4/2005 Yahoo! Groups Links Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
RE: [flexcoders] Re: Popup only works once
The issue is that each time the Popup opens, the ViewHelper attempts to register itself to the ViewLocator. The framework has a rule that a ViewHelper must be unique in its 'handle' (done by the ViewLocator checking if the View Name is already registered to it) otherwise it raises and Error. (Code can be seen in the ViewLocator.as file). Cairngorm .99 should have the ability to unregister view helpers from the ViewLocator so when this is released you will need to unregister the View in the destruction sequence of the popup. In the mean time there are these options (may be more out there): 1. Modify the Cairngorm framework by not throwing an error in the View Locator if the Name is already registered to it. (Not saying this is the best option, just saying this is one way to do it) 2. Open up the popup window (child) without a view helper or a view helper that doesn't have a name on it (if you are looking for code abstraction). Have the child raise events that the parent can listen to. When the event is raised have the parent broadcast the event (to the command) and have your Commands talk to the parent to get the necessary information from the child window. I have found there to be value have the child popup simply raise events that the parent (the mxml file that created the popup) is listening for in several situations. Esp in any sort of master/detail relationship (address of a user for example). Hope this helps. Ben -Original Message- From: Rafael M. Martinelli [mailto:[EMAIL PROTECTED] Sent: Thursday, April 14, 2005 12:04 PM To: flexcoders@yahoogroups.com Subject: RES: [flexcoders] Re: Popup only works once Yes, we're ussing the Cairngorm Framework and we're using a viewHelper in the TileWindow. How can I solve this problem? I can't use the viewHelper in this situation? Thanks. -Mensagem original- De: Ben Elmore [mailto:[EMAIL PROTECTED] Enviada em: quinta-feira, 14 de abril de 2005 12:49 Para: flexcoders@yahoogroups.com Assunto: RE: [flexcoders] Re: Popup only works once Are you guys using the Cairngorm Framework? If so, does your popup window have a viewHelper assigned to it? -Original Message- From: Rafael M. Martinelli [mailto:[EMAIL PROTECTED] Sent: Thursday, April 14, 2005 11:37 AM To: flexcoders@yahoogroups.com Subject: RES: [flexcoders] Re: Popup only works once I'm facing the same problem. Did you find what's wrong? Thanks -Mensagem original- De: cazzaran [mailto:[EMAIL PROTECTED] Enviada em: sexta-feira, 8 de abril de 2005 13:37 Para: flexcoders@yahoogroups.com Assunto: [flexcoders] Re: Popup only works once That didn't seem to change my problem. My popup still refuses to come back once it's been closed once. this.deletePopUp() (or using the doLater) is the right place to be doing this, right? -Josh --- In flexcoders@yahoogroups.com, Tracy Spratt [EMAIL PROTECTED] wrote: Just for fun, try the magic doLater(). doLater(this, deletePopUp) Tracy -Original Message- From: cazzaran [mailto:[EMAIL PROTECTED] Sent: Thursday, April 07, 2005 6:00 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Popup only works once I have an Add Group button in my MXML that calls a method: public function showAddGroupWindow():Void { var popup = PopUpManager.createPopUp(MovieClip(mx.core.Application.application), addGroupWindow, true); popup.centerPopUp(); } In my popup MXML, which is just a simple title window, I have a save and a cancel button. My cancel button calls the method: function cancelButtonPressed() { this.deletePopUp(); } The save button is having the same problem... If I click either button, the popup closes, but the Add Group button wont open another popup. I've verified that it's still calling the showAddGroupWindow() method, but for some reason, nothing pops up anymore. I have a feeling the deletePopUp() isn't fully getting rid of it... where am I going wrong? Yahoo! Groups Links Yahoo! Groups Links -- No virus found in this incoming message. Checked by AVG Anti-Virus. Version: 7.0.308 / Virus Database: 266.9.5 - Release Date: 7/4/2005 -- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.308 / Virus Database: 266.9.10 - Release Date: 14/4/2005 Yahoo! Groups Links Yahoo! Groups Links -- No virus found in this incoming message. Checked by AVG Anti-Virus. Version: 7.0.308 / Virus Database: 266.9.10 - Release Date: 14/4/2005 -- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.308 / Virus Database: 266.9.10 - Release Date: 14/4/2005 Yahoo! Groups Links Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
RE: [flexcoders] Re: Popup only works once
I wrote a simple example that does work so we probably need to see more of your code. Any chance you can put together a small testcase? Matt From: cazzaran [mailto:[EMAIL PROTECTED] Sent: Friday, April 08, 2005 9:37 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Popup only works once That didn't seem to change my problem. My popup still refuses to come back once it's been closed once. this.deletePopUp() (or using the doLater) is the right place to be doing this, right? -Josh Yahoo! Groups Links To visit your group on the web, go to:http://groups.yahoo.com/group/flexcoders/ To unsubscribe from this group, send an email to:[EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.