Hey all, i've got a situation that I don't think i'm
handling correctly...

situation:

I have a main application that contains a datagrid.  I
create a popup to handle editing and when the edit has
gone through, i want to refresh the main datagrid. 
I'm trying to do this through an event (is that the
right way to do it?).

Code
-------------------------------------

calling the event from the main window:

instwin =
mx.managers.PopUpManager.createPopUp(this,RecWin,false,initObj);
instwin.addEventListener("recAdded", refreshRecs);

On the popup side.. i have all of the editing code...
where i have the form etc, then i submit it for
editing (this all works)... but then when i get done
with the edit/add i run this function that dispatches
the event...

function processUpdate(result:Object):Void   {
  if (result.isError == 'false')  {
     textLabel = "update was Successful";
     dispatchEvent({type:'recAdded'});
    //this.deletePopUp();
  }  else {
     textLabel = result.msg;
  }
}

In the main app, i try to chatch it with this
function..

function refreshRecs(event) {
  
getNewHardware(arrStatusFilter[statusSearch.selectedIndex].VAL,'','','');

}

the getNewHardware is a function that runs the
processing of the new recordset... it works as well (i
use it in another part)  

my best guess is that I'm not catching the event
correctly... anybody know what I'm doing wrong?

Thanks!!

Jon Hirschi


                
__________________________________ 
Do you Yahoo!? 
Yahoo! Small Business - Try our new resources site!
http://smallbusiness.yahoo.com/resources/ 


 
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