Maybe instead of creating the variable on the fly with

var titleWindow:userScheduleDAC = etc

How about making titleWindow a class variable...

private var titleWindow:userScheduleDAC;

private function openSchedulerAdder():void
{
    titleWindow = userScheduleDAC(PopUpManager.createPopUp(this,
userScheduleDAC, true));
etc
}

All the variables in titleWindow should be recreated when the function
runs.

Also, titleWindow sounds a little close to a built-in name. How about
changing it to myTitleWindow just in case.



--- In [email protected], Eric Dunn <ed...@...> wrote:
>
> Ok, that makes sense and might explain where the original values
come from. I still don't understand why or how they are reverting back
after the updates... 
> 
> Maybe a solution is set the variables outside for the parent and
pop-up ( in a class or singleton) ... 
> 
> Can you think of a workaround to prevent the reverting back? 
> 
> Eric W Dunn 
> Adaption Technologies 
> 281-465-3326 
> ed...@... 
> 
> ----- Original Message ----- 
> From: "valdhor" <valdhorli...@...> 
> To: [email protected] 
> Sent: Wednesday, January 28, 2009 9:56:38 AM GMT -06:00 US/Canada
Central 
> Subject: [flexcoders] Re: Pop-up Window issue 
> 
> 
> 
> 
> 
> 
> I could be wrong about this but as I understand it 
> PopUpManager.removePopUp does not actually remove the popup - all it 
> does is hide it. 
> 
> What I do in my applications is use FlexMDI (Part of FlexLib). Every 
> time I create a window I put a reference to it in an array that is 
> part of Application.application. Then when I need that window I check 
> if it's already in the array and just make it visible. If it is not in 
> the array, I create a new window and place a reference to it in the
array. 
> 
> --- In [email protected] , Eric Dunn <edunn@> wrote: 
> > 
> > Here is the code that opens the Title Window: 
> > 
> > // Pop-up Schedule adder 
> ---------------------------------------------------------- 
> 
> > private function openSchedulerAdder():void 
> > { 
> > var titleWindow:userScheduleDAC = 
> userScheduleDAC(PopUpManager.createPopUp(this, userScheduleDAC, true)); 
> > titleWindow.AUTHKEY = authKey; 
> > titleWindow.businessPartnerID = businessPartnerID; 
> > titleWindow.ccUserID = ccUserID; 
> > titleWindow.usNameList_popup = usNameList2; 
> > titleWindow.RulesAndSchedNamesAc = RulesSchedsAc; 
> > titleWindow.userSuppliedScheduleName = 
> cbxUserScheduleName.selectedLabel; 
> > titleWindow.userSuppliedScheduleName0 = 
> cbxUserScheduleName0.selectedLabel; 
> > PopUpManager.centerPopUp(titleWindow); 
> > } 
> > 
> > Here is the code that is used to close the window ( it is called 
> after a schedule has been added, updated or deleted: 
> > // Pop-up close function that closes window and updates list of 
> schedules on the parent -------------------------------------- 
> > private function titleWindow_close(evt:CloseEvent):void 
> > { 
> > parentApplication.stationFeatures.comMyRules.getUserScheduleList2(); 
> > PopUpManager.removePopUp(this); 
> > } 
> > 
> > Eric W Dunn 
> > Adaption Technologies 
> > 281-465-3326 
> > edunn@ 
> > 
> > ----- Original Message ----- 
> > From: "valdhor" <valdhorlists@> 
> > To: [email protected] 
> > Sent: Monday, January 26, 2009 9:52:14 AM GMT -06:00 US/Canada
Central 
> > Subject: [flexcoders] Re: Pop-up Window issue 
> > 
> > 
> > 
> > 
> > 
> > 
> > At this point, I think we need to see some code. 
> > 
> > --- In [email protected] , Eric Dunn <edunn@> wrote: 
> > > 
> > > I set break points on the method that launches the pop up. The
break 
> > point never hits. 
> > > 
> > > I delete a schedule, pop up closes. I then try to delete another 
> > schedule and the schedule is deleted, I see the confirmation result 
> > (alert) and the window does not close and the breakpoint never stops 
> > the code. 
> > > I am seeing that if I select another schedule, the deletion
function 
> > is still active... meaning, that once I select another schedule,
it is 
> > automatically deleted. Looks like I am not cleaning up, leaving event 
> > listeners active... 
> >
>


Reply via email to