Thanks Bem. It helped a lot.

I was thinking about the second option and that's what I'm going to do.

Thanks again. 

-----Mensagem original-----
De: Ben Elmore [mailto:[EMAIL PROTECTED] 
Enviada em: quinta-feira, 14 de abril de 2005 13:24
Para: [email protected]
Assunto: 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: [email protected]
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: [email protected]
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: [email protected]
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: [email protected]
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 [email protected], "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: [email protected]
> 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



 






-- 
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

<*> 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/
 



Reply via email to