Thank You!
Now I understood  why  my function  don't return a  value.
The server  is delayed and my function has that to inform when was processed it can catch the value.

public function ListBible():String {
       webservice = DataAcess.wsHelper(Common.getDomain("1"));
       var call:Object = webservice.GetBookTitles();
       call.resultHandler = function (event:ResultEvent):Void {
           dispatchEvent(new Event( EventType.COMPLETE));       
       }
}


Now another doubt.

How  I could be passing the value for event "dispatchEvent"?

In my class I created a public variable where I pass the value of the function.

I think that this is not elegant.

Thank You!

ps. Sorry my English.

 


On 11/7/05, Aldo Bucchi < [EMAIL PROTECTED]> wrote:
Sergio,

"call.resultHandler" will be called later once the result comes back
from the server.
it is an *asynchronous* call. this means you cannot return the value
in the first function because it will take some time to be available.
take a look at the docs and you will find plenty of examples on how to
handle this type of situations.



On 11/7/05, Sergio Vasquez <[EMAIL PROTECTED]> wrote:
>
>
>
> Hi All!
>
>
>
> I have a problem with return value in my function inside in my class.
>
>
>
> In my class business I have the following function:
>
>
>
>
>
> public function ListBible():String {
>
>                   webservice = DataAcess.wsHelper(Common.getDomain("1"));
>
>                   var call:Object = webservice.GetBookTitles();
>
>                   call.resultHandler = function (event:ResultEvent):Void {
>
>
>
>                         // I want return the value event.result, but only
> see the value inside this scope.
>
>                   }
>
>             }
>
>
>
>
>
>
>
> Another class call this function.
>
>
>
>
>
> Thank You!
>
>
>
>
>
> Sérgio Vasquez,
>
> Analista e Desenvolvedor de Software Hexa Solution
>
> t: +55 (0xx11) 3129 4040
>
> f: +55 (0xx11) 3129 4040
>
> e: [EMAIL PROTECTED]
>
> p: [EMAIL PROTECTED]
>
> w: www.hexasolution.com.br
>
>
>
>  --
>  Flexcoders Mailing List
>  FAQ:
> http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
>  Search Archives:
> http://www.mail-archive.com/flexcoders%40yahoogroups.com
>
>
>
>  ________________________________
>  YAHOO! GROUPS LINKS
>
>
>  Visit your group "flexcoders" on the web.
>
>  To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
>
>  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
>
>  ________________________________
>


--
::::: Aldo Bucchi :::::
mobile (56) 8 429 8300


--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com




YAHOO! GROUPS LINKS






--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com




SPONSORED LINKS
Web site design development Software design and development Macromedia flex
Software development best practice


YAHOO! GROUPS LINKS




Reply via email to