Please keep the discussion on the flexcoders list. Flex engineers don't
do individual tech support, there are plenty of people on flexcoders
besides me who can help you, and any answers are valuable to other
people on the list learning about Flex.
 
I can't really tell from your description what you're trying to do. For
example, I'm not sure what you mean by an "init Object". What does it
do? And a plain Object doesn't have methods that you can call.
 
Do you mean that you've written a class for storing info extracted from
the XML and that you want to call a method on it from the resultHandler
after the XML is loaded? In that case, you would do something like
 
<Application>
    <script>
        var myXMLInfo:MyXMLInfo;
        function resultHandler(event)
        {
            myXMLInfo = new MyXMLInfo();
            myXMLInfo.parse(event.result);
        }
        function doSomething()
        {
            // use myXMLInfo
        }
    </script>
</Application>
 
In other words, any event handler method can access any instance
variable in the same class, such as myXMLInfo. The info object is then
available to other methods as well.
 
If I guessed wrong, can you post the code for a very simple example
Application that illustrates what you are trying to do?
 
- Gordon

________________________________

From: Thierry Bertossa [mailto:[EMAIL PROTECTED] 
Sent: Friday, March 09, 2007 12:58 AM
To: Gordon Smith
Subject: Re: Init Global Object Best Practice



Thanks Gordon 

 

It's a good practice to do that with Application.application or there is
another solution...

In my case, I have create an Object for XML loading and want to call a
method in my init Object from the Xml loading resultHandler. 

I don't really Understand how to handle Event between different
Object...

If the only choice is with Application.application or if I have missed
something?

Thanks

 

Thierry 


--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.5.446 / Virus Database: 268.18.8/714 - Release Date:
08.03.2007 10:58


Reply via email to