It's not just RemoteObject -
 
TRACE doesn't even work - which means, the code isn't even executing -
 
Is there any reason, why the code isn't executing properly?
 
Thanks again,
 
Mike


From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Matt Chotin
Sent: Friday, June 17, 2005 12:03 AM
To: [email protected]
Subject: RE: [flexcoders] Code not executing in Popup Window

I don’t see a problem but I know that others have run into issues when the RemoteObject has been contained in a popup.  It seems to work better if it’s hung off the Application or something that’s a little more “permanent” instead.

 

Matt

 


From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Mike Anderson
Sent: Thursday, June 16, 2005 4:37 PM
To: [email protected]
Subject: [flexcoders] Code not executing in Popup Window

 

Hello All,

I have "known to be working" code, contained inside of a Custom Created
TitleWindow component.  The code handles all the RemoteObject
declarations, and populates a List Control, upon the Result Event.

The Popup Window is launched from a Button residing in my Main
Application.

After clicking the launch Button, the Window pops up perfectly and all
the controls are there, but nothing happens.  In fact, the function that
retrieves the data, also sends a trace() message to the debug window -
and nothing even happens when I do that.

It's almost as if the code contained in my custom control, doesn't even
exist.  Is my problem, the way in which I am creating my Popup Window?
There must be something simple I am doing wrong...


Here is the code in my main application that launches the window:
------------------------------------------------------------------------
----
public function launchWindow()
{
      var pop = mx.managers.PopUpManager.createPopUp(this, Categories,
false, null, true);
}
------------------------------------------------------------------------
----


Here is the code, inside my custom component called "Categories.mxml":
------------------------------------------------------------------------
----
<?xml version="1.0" encoding="utf-8"?>
<mx:TitleWindow xmlns:mx="http://www.macromedia.com/2003/mxml"
title="Manage Categories" closeButton="true" click="deletePopUp()"
creationComplete="getCategoriesOnly();">

<mx:RemoteObject id="remoteService" source="services.InfoNexus"
endpoint="http://www.mysite.com/flashgateway.aspx"
showBusyCursor="true">
      <mx:method name="getCategoriesOnly"
result="getCategoriesOnly_Handler(event.result)"
fault="getCategoriesOnly_Fault(event.fault)"/>
</mx:RemoteObject>

      <mx:Script>
            <![CDATA[
           
                  //======= CATEGORIES =======//
                  function getCategoriesOnly()
                  {
                        trace("getCategories just kicked off");
                        remoteService.getCategoriesOnly();
                  }
                 
                  function getCategoriesOnly_Handler(result)
                  {
                        trace("getCategories_Handler just kicked
off");
                        categories_List.dataProvider = result;
                  }
                 
                  function getCategoriesOnly_Fault(result)
                  {
                       
                  }
                 
            ]]>
      </mx:Script>

      <mx:VBox>
            <mx:Label text="Categories:"/>
            <mx:List id="categories_List" width="250" height="200"/>
      </mx:VBox>

      <mx:ControlBar>
            <mx:Button label="Get Categories"
click="getCategoriesOnly()"/>
            <mx:Button label="Delete"/>
      </mx:ControlBar>

</mx:TitleWindow>
------------------------------------------------------------------------
----

Could you all shed some light, as to why this isn't working?

Thanks in advance,

Mike




Yahoo! Groups Links

Reply via email to