Yes, this helps a lot.  I was trying to extend HTTPService so I could add some properties, but I think I see that I should be adding that kind of information to the “event.call” instance.  Analyzing your response lead me to search the docs for event.call, where I found another good example, plus a link to the “ACT” pattern.

 

I have enough info to keep me busy both practically and theoretically.

 

Thanks a lot.

Tracy

 


From: Matt Chotin [mailto:[EMAIL PROTECTED]
Sent: Thursday, April 29, 2004 1:07 PM
To: '[email protected]'
Subject: RE: [flexcoders] extending HTTPService: result property is read only?

 

The result that's being specified in the tag is the handler for the result event, it is not the result property.  The result property is filled in automatically when the service returns.

 

I'm assuming this is based on trying to solve a problem from your last post which I just answered.  I do not recommend extending HTTPService unless you're really sure it's what you want to do.  Generally the HTTPService is used in conjunction with another class, and that class can be extended.  But unless you're trying to change the behavior of HTTPService and know what you're doing I think extending isn't necessary (especially since I didn't document how it actually works internally).

 

Matt

 

-----Original Message-----
From: nts333rd [mailto:[EMAIL PROTECTED]
Sent: Thursday, April 29, 2004 8:36 AM
To: [EMAIL PROTECTED]
Subject: [flexcoders] extending HTTPService: result property is read only?

 

When using the mx:HTTPService tag as is, I can set a result handler.

When I create my own as class that extends HTTPService, my attempt to
set the result handler returns a compiler error that: "Property
result is read only".  There is currently nothing in my extended
class.

Works:
      <mx:HTTPService id="getConfigCodeData" url=""
                  result="myResultHandler(event.result)" />
Errors:
      <DSHTTP id="getConfigCodeData" url=""
                  result="myResultHandler(event.result)" />

Also, I would like to set the result handler programatically, but
that gives me an error that "String found when function expected".
any hints on this one?

Tracy

 

Reply via email to