Thankx...that helps...but alas, only gets me to the next error. The
FaultEvent shows:

e = mx.rpc.events.FaultEvent (@10c90d81)
    bubbles = false
    cancelable = true
    currentTarget = mx.rpc.http.HTTPService (@11452901)
    eventPhase = 2
    fault = mx.rpc.Fault (@116c3bf1)
    message = mx.messaging.messages.ErrorMessage (@10b3dd41)
    messageId = "81FB93A6-95D3-5BDA-BE5C-F1E757A03D3C"
    target = mx.rpc.http.HTTPService (@11452901)
    token = mx.rpc.AsyncToken (@10c5ffa1)
    type = "fault"

Wonder why there's not descriptive text with this.

I wonder if it has anything to do with the path to my xmlfile. The class in
question is several folders deep -- the xml is one level from the app's
root. Prepending the '/' to the front of the path _should point back to
root, shouldn't it?

myRequest.url = "/xml/modules.xml";

thankx again!
--steve...


On 9/10/07, Scott - FastLane <[EMAIL PROTECTED]> wrote:
>
>    ahhh yes.... my apologies.  I meant ResultEvent.RESULT.  Here is a code
> snippet from a class in my app that does this very thing.  In this case I
> have written AppService to extend HTTPService so I can add on some app
> specific stuff that pertains to all of my services.
>
>       public function AppService(url:String, timeout:int)
>       {
>          super(url);
>          this.resultFormat="e4x";
>          this.requestTimeout = timeout;
>          this.addEventListener(FaultEvent.FAULT, handleFault);
>          this.addEventListener(ResultEvent.RESULT, handleResult);
>          this.url = url;
>
>       }
>
> hth
> Scott
>
> Steve Hueners wrote:
>
>
>
> Gives:
>    1119: Access of possibly undefined property RESULT through a reference
> with static type Class.
>
> am importing:
>     import mx.rpc.events.ResultEvent;
>     import mx.rpc.http.HTTPService;
>     import mx.rpc.events.FaultEvent;
>
>     import mx.collections.XMLListCollection;
>
>
>
>
>  On 9/10/07, Scott - FastLane < [EMAIL PROTECTED]> wrote:
> >
> >   Steve -
> >
> > I believe you intend to be adding the listener for the Event.RESULTevent 
> > instead of the
> > Event.COMPLETE.
> >
> > hth
> > Scott
> >
> >
> > Steve Hueners wrote:
> >
> >  All the samples i've come across so far show the mxml route - I'm able
> > to instantiating and fireing the send correctly with:
> >
> > public var myRequest:HTTPService = new HTTPService;
> > public var modules:XMLListCollection;
> >
> > public function MenuItemEnum ( value:String, ordinal:int )
> > {
> > myRequest.url = "/xml/modules.xml";
> > myRequest.resultFormat="e4x"
> >
> > myRequest.addEventListener(Event.COMPLETE, onResult)
> > myRequest.send(); //>>>>>> Is hit.
> > }
> >
> > private function onResult(e:ResultEvent):void
> > {
> > modules = e.result as XMLListCollection;
> >
> > }
> >
> > private function onFault(e:FaultEvent):void
> > {
> > Alert.show(e.fault.message, "Could not load");
> > }
> >
> > But the handlers never fire.
> >
> >
> >
>
>  
>

Reply via email to