Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4111934
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T22:07:47+00:00 2026-05-20T22:07:47+00:00

I have code in a flex component that I want to listen for an

  • 0

I have code in a flex component that I want to listen for an event, the source of the event is a custom class that’s being run by another class that’s being run by another class etc etc. I was under the impression that an event would pass throughout the whole application, so I was hoping if I dispatched the custom event in the class like so..

    private function finishEvent():void {
        var evt:EventDispatcher = new EventDispatcher;
        var finished:Event = new Event("finishedInterpret");
        evt.dispatchEvent(finished);
    }

then I could just grab it in my component like this:

public function interpret(data:Array):void {
    addEventListener("finishedInterpret", applyInferences);
    db.executeBatch();
}

the event gets fired basically when the executeBatch is finished, and the finishEvent is being called, but I’m the listener isn’t getting anything. I tried setting it to db.addEventListener, but that had now effect.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T22:07:48+00:00Added an answer on May 20, 2026 at 10:07 pm

    The way that events are supposed to happen is that an object dispatches events, and consumers of those events listen for events from that object. Unless you have a global event dispatcher (not typical), there is no application-wide event dispatching.

    I find this to be the best pattern to use: child components dispatch events, and the owner of those children listen for their events. For example:

    child.addEventListener("finishedInterpret", applyInferences);
    

    As is, your code is listening for events from itself.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following Django and Flex code: Django class Author(models.Model): name = models.CharField(max_length=30)
Right now I have an Accordion component in Flex that has two children, I
I have implemented some utility classes in Flex that I want to use in
So I have a module in flex in which I add a custom component.
I have a Flex swf hosted at http://www.a.com/a.swf . I have a flash code
I have code that references a web service, and I'd like the address of
I have code to create another row (div with inputs) on a button click.
I have code that looks like the following, which works fine for displaying the
First, the background: I am creating a Flex application with a component that displays
I am trying to learn Flex and now i have the next code: http://pastebin.com/rZwxF7w1

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.