Newbie question (DispatchEvent can't main Application)

Hello world

I am trying to send an event from a component mxml (CompB) to interact with one another mxml component (CompA), and they both live on the Application (addChild) of the hand, but it does not seem to have reached the main Application.

There is no mistakes or tricks...

I think it could be a syntax error.

Any direction would be greatly appreciated!

Here is my code... (condensed to only show what is necessary)

CompB:

" < = xmlns:mx mx:Panel ' http://www.Adobe.com/2006/MXML "

creationComplete = "creationCompleteHandler ()" >

< mx:Script >

<! [CDATA]

private function creationCompleteHandler (): void {}

videoDisplay.addEventListener (VideoEvent.COMPLETE, videoCompleteHandler);

}

public void videoCompleteHandler(event:VideoEvent):void {}

dispatchEvent (new Event ('videoComplete'));

}

[]] >

< / mx:Script >

< / mx:Panel >

------------------------------------------------------------------------------------------ -----

Main application:

" < = xmlns:mx mx:Application ' http://www.Adobe.com/2006/MXML "

Initialize = "init ()" >

< mx:Script >

<! [CDATA]

import com.CompA;

import com.CompB;

private var myFancyCompA:CompA;

private var myFancyCompB:CompB

private function init (): void {}

myFancyCompB.addEventListener ('videoComplete', completeHandler);

addChild (myFancyCompB);

}

public void completeHandler(event:Event):void {}

Alert.Show ("Success!");

myFancyCompB.visible = false;

}

[]] >

< / mx:Script >

< / mx:Application >

When I run the application, and the video ends, no popup alert...

I narrowed down it to the expedition or the listener.

I feel that the event is not that they prepare properly.

Thank you!!

DK

Your event dispatching component sends the event at the top of the hierarchy of the application.  If the parent is the application he will hear it.  If your component is buried a little further down bubbling (set to true) allows him to go up the hierarchy until you reach the next level.  You can stop it bubbling in some points using stopPropogation() or stopImmediatePropogation().

However, can I still add to thid question HarUI, or someone else and ask why bubbles considered bad practice.  I've seen other applications do.  If you want to send an event at two levels, so to speak, you listen to so and re ship at each level.

What is the best practice for this?

Thank you very much.

Tags: Flex

Similar Questions

  • Newbie question on a client-server application architecture

    I did some stuff in Java for awhile now, but I have never drawn in the network part of this one. I followed the tutorial to Oracle and I searched some other resources on the web. I don't have a very specific question, but I would be grateful if someone could help me understand all this. My goal in this learning project is to make a server application that will accept an unspecified number of independent of a client application connections. I think that I get the basics of establishing a ServerSocket on the server, put in place the socket on the client, and then open the entry and outflow on both and start a data transfer.

    Now, I think I'm stuck in a misunderstanding on this transfer. All of the examples I see seem to treat data transfers when the order who speaks on each side is already known, so you send something good after connection and that you set the other side of eligibility receive something after the connection, and everything works fine. If the order is not known, but I can't seem to understand the flow of the application logic.

    Let's say that the server gets 3 connections of 3 customers and save these Socket objects in an ArrayList. Then client B asks something, and the server responds accordingly. Later, the server needs to say something to client B, then it sends information through its support and client B responds accordingly. How should I go about setting up something like that? I think I should put listeners but I can't find examples like these, or do I define the infinite loops for each socket, try to read the data?

    Any help to guide me in the right direction would be much appreciated.

    Think of a very basic chat client-server application. When a client connects, it receives all messages written by other customers. It can also send messages that will go to all other customers. It is very similar to your uncertainty about who will speak in the first place, the server or the client. If users wait a bit after the connection, it is likely, that the server will talk first (because another user sent a message). If the customer/user is fast, he'll talk first ("Hello World" or something like that). There are examples of these applications of simple chat on the web, just google for them. And Yes, this is usually achieved with infinite loops. Every customer will have a such loop, try to read data from the server and the server will have as many endless loops simultaneously assets (think multi-threading) given that the connected clients.

  • Newbie question: I can save the conversation in MP3

    I have e260v1.

    Here's the report card "digital audio standards: MP3, WMA, Audible *, Protected WMA (DRM)" "

    I noticed that when I record a conversation, it is in WMA format.

    The transcription software that I use on the PC like MP3. I can go through a conversion I guess, but it is there by chance a way to get the Sansa to record in MP3?

    Alex

    Edit/PS.  It records in .wav, .wma not.


  • Another newbie question: (how) can I move files into/out VM?

    So, I have my old image of workstation XP running on my new Win8 workstation.

    Let's say I have a file on my new computer and want to copy in my VM world.

    I could send email from one to the other, but is there a more direct way?

    'Share' a directory between the host and the VM without using Windows on a network?

    Or should I turn on the networks of working groups and doing it this way?

    (I see that after you install the player my Win8 Task Manager shows two additional Ethernet, what with that anyway?)

    Thank you

    Josh

    You can configure shared between operating systems using the Industry Standard SMB/CIFS file sharing or the VMware Shared Folders feature.  The latter is easier for those who do not understand the network.  Take a look at the "transfer files and text" in the documentation.

    For other network cards, see the documentation!   Specifically Chapter 7 "Configuring network connections" in the getting started with VMware Player (PDF).

    Also take a look at: Presentation of products types networks hosted (1006480)

  • Newbie question! Header and main envelope now separated! Help, please

    Hello. I'm really, really new to web design. I started with a free template and have made some changes. I've been messing around with the spry menu bars, and I don't think I'll use it right now. Somehow, I accidentally created a space between the header with the navigation bar and the main wrapper. It wasn't like this before. I don't know if it's a CSS or HTML error. Any help would be appreciated! Thank you.

    Here is a link to two images of comparison on my Flickr Acount:

    http://www.Flickr.com/photos/53308815@N00/sets/

    Any help is very appreciated!

    Where did you got this model of? It seems f__ked to sh_t.

    Anyway changing the #wrapper css - margin: 10px 70px automatic;

    TO

    margin: 0px 10px auto;

    #wrapper {width: 1000px;}
    margin: 10px 70px automatic; will focus div on the page.
    text-align: justify;
    text-transform: lowercase;
    line-height: 25px;
    }

    more a comment css is better written as

    / * Center div on the page * /.

    Not

    will focus div on the page.

  • Newbie question: How can I change text/plain text/xml?

    Hi people, I have a Spry region on my soon-to-be home page ( http://snailtales.org/index-teachers.html) who refuses to view the http://snailtales.org/snailtales.rss file

    I have been informed in a previous post that "the RSS file content-type is text/plain. It should be text/xml. IE is picky about such things. Change that and it should work. »

    However, being a newbie / kind of guy 'Design View', I have no idea how to proceed. Anyone got the tip?

    Thank you!

    Thanks SnakEyez02. I finally decided just to change my .rss file to an .xml file, and then all of a sudden my server allowed him very well.

    And thanks a lot for your comments, booth. As a beginner, I rushed directly on the first tool that I found (IE ApDivs) and don't think to check for cool stuff like Mode of disposal. When I finally have the time, I will repeat throughout the site using this... We cannot have people feeling aggrieved against just because they need the size of the text.

  • Newbie Question: Anyone can tell me whether or not these terms all refer to the same thing?

    I hear all these terms mentioned in the environment I work in.  All refer them to the same thing?

    Prodika / Oracle PLM4P / P4P / Agile PLM

    Yes still. The company was called Prodika. It was then acquired by Agile and Agile was acquired by Oracle. So we are in the Agile family of products where the name of Agile PLM, but are part of Oracle where the name Oracle PLM4P.

    P4P is just a nice TLA - acronym of three letters - that people love to use.

    In fact non of these are the official name of the product, which is:

    Oracle Agile PLM for process
    Steve

  • InDesign - newbie question - I can't select several objects...

    Shift + click only selects an object at the same time, it turns off when I select the next object...  By dragging the marquee of the editing table always selects the page frame.  Is there a setting somewhere to be changed?

    And where is hidden the Lasso tool?  It work?

    Thank you!

    Try InDesign Visual Quickstart Guide of Sandee Cohen CC. It is the best guide for beginners to InDesign.

    Or course InDesign CC 2015 Essentials of David Blatner on Lynda.com. 10 day trial for free.

  • My Question is can we Auto launch a CLDC Application, as we Midlet Application using Midlet-Push?

    Hi all

    I have a CLDC Application, I want to auto-launch when I receive a SMS on particular port.

    It's possible with MIdlet, and I am also aware of other enty CLDC laucnhing application.

    My question is can we just application of CLDC lauch when an sms arrives on port...

    Our way that make entry of Jad

    MIDlet-Push-1: sms: / /: 8855, midlet, * or dynamicaly entry in the code.

    I don't want a replacement application to launch my CLDC application.

    Any answer will appreciated.

    Thank you

    Anne Laure

    Check these items.

    http://www.BlackBerry.com/knowledgecenterpublic/livelink.exe/fetch/2000/348583/800451/800563/What_Is...

    SMS to notify the application, look at this article.

    how_to_ http://www.BlackBerry.com/knowledgecenterpublic/livelink.exe/fetch/2000/348583/800451/800563/...

  • Question of the main application class

    Hey people out there!

    A happy Friday to all just a quick question. The class that contains the main Sub public static in the BlackBerry application method, this class should be one that extends UiApplication or can the main method call the class that is responsible for this?

    Thank you!

    Schalk

    You can try something like that.

    class Test
    {
        public static void main(String args[])
        {
            Xyz xyz = new Xyz();
            xyz.enterEventDispatcher();
        }
    }
    ---------------------
    
    class Xyz extends UiApplication
    {
        Xyz()
        {
            pushScreen(new MainScreen());
        }
    }
    
  • Simple Newbie Question - download flex applications

    I'm very new guy, sorry for the stupid question. It is my first adventure in Flex.

    I'm working on a graphic spring flex application and I went to show a worker co on his computer and it wouldn't work. I went to the html file in the bin-debug, it works on my machine, but not hers.

    This also got me questioning what I have to download online when I'm done so that it can work.

    The paths of the library are all absolute links on my machine like that

    C:\Program Files (x 86) \Adobe\Adobe Flash Builder 4\sdks\4.1.0

    Any help is really apprieciated. I did a few tutorials, but none of them actually go to upload files.

    Thank you

    Randy

    Hello

    Your Flex program will work on your computer if you are using Flash Builder because it puts in place a 'special' environment to allow you to test your applications at the local level.  These files are all based on mxml and do not work outside the Flash Builder environment.

    For others to access your application, open the Project menu, and then select 'Export Release Build'.  This will create the code html, swf and other files for people using your app.  The main application will be the same name as your project - something like: myApp.html.  (unless you have changed the default application)

  • MultiTaskFlow liaison: Hi I have a main application and several sub these i added to my resources and using their taskFlows applications in my main application by creating the multitaskFlow binding. My problem is that how can get us currently rendered you

    Hi, I have a main application and many applications these i have added to my resource and using their taskFlows in my main application by creating the multitaskFlow binding. My problem is that how can currently get us renderings taskFlow Id link MultiTaskFlow running through an action created in our main application. Please explain if we can.

    Hello

    Try to remove the af: group in the facet of the toolbar or use this code in your bean.

    UIComponent panelBox is ae.getComponent () .getParent () .getParent ();.

    Kind regards

    Ruben.

  • A LOT of Newbie Questions blackBerry smartphones. (Must be the easy answer!)

    Good, please excuse my ignorance... guys xD

    I just bought two s BlackBerry Curve 8530 from Sprint. I'm pretty tech savvy, but there are some things about this phone, I can just enter in two or three days I got em:

    Deleting photos: Well, then I'm in my media folder, in the images. I selects a photo and press the BlackBerry button and select Delete. Then he said: it is read-only, and when I remove it, the icon is still there. I tried to turn on/off the device, and it's still there. Thought this one myself. I plugged it up to the Desktop Manager and all of a sudden all the photos I had taken appeared. I was also able to delete using the "BlackBerry" button and then "delete". It doesn't give me that read this option.

    Saving images: So, for some reason I can't save more photos. I don't know even how I saved the first 12 photos I have taken... but now it won't save any more. What the hell happened? xD I have a 2GB card in my phone... surely these 12 images didn't fill in this card... Thought this one myself. I plugged it up to the Desktop Manager and all of a sudden all the photos I had taken appeared.

    Buy ringtones: On my old phone LG, I used to buy ringtones RealTone Jukebox... where they had extracted from songs that I could download for a crazyhigh. Where can I buy the real music ringtones for BlackBerry? What I do myself?

    Media moving to my PC?: I went through the music store of Sprint comes with my camera, and two purchased songs. I want to know if I can get these songs out of my BlackBerry smart phone and my PC. Also, if anyone knows what format they are in (if they bought before Sprint music store).

    To buy another memory card: Where the best place to buy one of these mini memory cards? One of my friends like, a 24 a concert... and I currently have a 2 gig (who, I should mention, is more fricken memory I have in the computer I do not write about this time xD) how can I find out if the card is compatible with my camera?

    WTF @ Redlight?: From time to time (we can always do that, I'm not sure), the little red light at the top of my unit starts to blink even if I do not have a weak battery or not new messages. It first happened lastnight when a friend sent me 3 IMs at once. I had to reboot my device and I think that he is stopped. Earlier, it happened again (I had several new messages) and this time whenever my display is on, the light was red only flashes do not. It can always be like this now, but I'm not sure. My camera is in the other room and I'm too lazy to check xD. Why would he do that? How can I get him to stop?

    Turn off the sound of the camera?: My camera makes the shutter of the camera, even when noise silence. Is there a way to stop this?


    Auto keyguard: I have EPIC hand-dial to people purse. In my view, it has a keyboard lock button in the dashboard of BlackBerry (that is the correct term for this?) But I want to get to the place where the keyboard auto-lock after a certain period of time. Is this possible? I saw somewhere about pressing the button mute will lock it... who is the top/center of the unit button?

    Key blackBerry?: Well, don't laugh, I know that I'm retarded. But, the key to the left of the beach towel... than the devil who called? He got the BlackBerry logo on it... is what he called the BlackBerry button? I know, I know, I'm retarded and could probably flip through the manual to figure it out... but still. I might as well ask now xD


    Choose the icons to display on the main screen: When I added an e-mail address, he put an icon on my main desktop, in the row of icons at the bottom of the screen. (where is my background image and all that). Can we choose the icons that we want to display on the main screen? I have really now, my calendar icon that I know that I use. I'd love to move the keyboard lock button here though... is it possible?

    Speaker?: How can I get speaker? xD

    Theme Studio (software, no associated device): Anyone used this? It is quite easy to use? I am tech savvy, but I don't want to just download a ton of programs on my PC that I won't use xD I'm working on the Desktop Manager and it takes forever. I want to make themes, but I'm curious to know how easy to use this program is... graduate to use design or if it would take a graph xD

    Well, then, I think that... Think THAT that's all. I can change this highest position (if we are allowed to edit) to delimit what questions have been answered. I hope someone sees this soon enough, that I don't know how "living" these forums are.

    Thanks for looking, and I warned you... they have been the newbie questions! xD

    -Darky Delacroix

    Welcome to the SkippyTheWonder forums.

    SkippyTheWonder wrote:

    Good, please excuse my ignorance... guys xD

    I just bought two s BlackBerry Curve 8530 from Sprint. I'm pretty tech savvy, but there are some things about this phone, I can just enter in two or three days I got em:

    Deleting photos: Well, then I'm in my media folder, in the images. I selects a photo and press the BlackBerry button and select Delete. Then he said: it is read-only, and when I remove it, the icon is still there. I tried to turn on/off the device, and it's still there. Thought this one myself. I plugged it up to the Desktop Manager and all of a sudden all the photos I had taken appeared. I was also able to delete using the "BlackBerry" button and then "delete". It doesn't give me that read this option.

    Saving images: So, for some reason I can't save more photos. I don't know even how I saved the first 12 photos I have taken... but now it won't save any more. What the hell happened? xD I have a 2GB card in my phone... surely these 12 images didn't fill in this card... Thought this one myself. I plugged it up to the Desktop Manager and all of a sudden all the photos I had taken appeared.

    Buy ringtones: On my old phone LG, I used to buy ringtones RealTone Jukebox... where they had extracted from songs that I could download for a crazyhigh. Where can I buy the real music ringtones for BlackBerry? What I do myself?

    There may be an icon on the home screen of your camera to buy ringtones. Or you can open the browser and go to http://mobile.blackberry.com. There is a link of ringtones that you can click

    Media moving to my PC?: I went through the music store of Sprint comes with my camera, and two purchased songs. I want to know if I can get these songs out of my BlackBerry smart phone and my PC. Also, if anyone knows what format they are in (if they bought before Sprint music store).

    It is recommended to buy a microSD card to store your multimedia files, if you run out of memory on your device.


    Depending on what OS is your BlackBerry tells you what size you can buy a microSD card. You can check under Options | Topic (will appear as v4.xx.xxx). Look at the table on the following link to see what size you can get - http://www.blackberry.com/btsc/KB05461


    On the BlackBerry, go to Options | Media Media Card recommended parameters are:


    Media card support: WE

    Encryption mode: NO

    Mass storage support: WE

    Auto enable mass storage Mode when connected: YES


    Mass storage mode allows your BlackBerry to act as an extra drive when it is connected to your PC. It will appear as an extra drive letter in Windows Explorer. So you can just drag/release the multimedia files on your memory card

    WTF @ Redlight?: From time to time (we can always do that, I'm not sure), the little red light at the top of my unit starts to blink even if I do not have a weak battery or not new messages. It first happened lastnight when a friend sent me 3 IMs at once. I had to reboot my device and I think that he is stopped. Earlier, it happened again (I had several new messages) and this time whenever my display is on, the light was red only flashes do not. It can always be like this now, but I'm not sure. My camera is in the other room and I'm too lazy to check xD. Why would he do that? How can I get him to stop?

    Here is an article that describes the status of the LED

    http://www.BlackBerry.com/BTSC/KB03897

    If you want to disable the LED check this KB article

    http://www.BlackBerry.com/BTSC/KB10721

    Turn off the sound of the camera?: My camera makes the shutter of the camera, even when noise silence. Is there a way to stop this?

    Check out this post

    http://supportforums.BlackBerry.com/T5/BlackBerry-Pearl-BlackBerry-8100/turning-off-the-camera-Shutt...


    Auto keyguard: I have EPIC hand-dial to people purse. In my view, it has a keyboard lock button in the dashboard of BlackBerry (that is the correct term for this?) But I want to get to the place where the keyboard auto-lock after a certain period of time. Is this possible? I saw somewhere about pressing the button mute will lock it... who is the top/center of the unit button?

    Key blackBerry?: Well, don't laugh, I know that I'm retarded. But, the key to the left of the beach towel... than the devil who called? He got the BlackBerry logo on it... is what he called the BlackBerry button? I know, I know, I'm retarded and could probably flip through the manual to figure it out... but still. I might as well ask now xD

    Called the menu button


    Choose the icons to display on the main screen: When I added an e-mail address, he put an icon on my main desktop, in the row of icons at the bottom of the screen. (where is my background image and all that). Can we choose the icons that we want to display on the main screen? I have really now, my calendar icon that I know that I use. I'd love to move the keyboard lock button here though... is it possible?

    If you select an icon, click the menu button and choose move. You can rearrange the icons. The icons in the top 5 on the list will be those along the boittom when not looking at the full home screen.

    Speaker?: How can I get speaker? xD

    Can try to hit the key ' $' as a shortcut to activate speaker. During a call, you can click the menu button and choose the speaker phone option in the menu

    Theme Studio (software, no associated device): Anyone used this? It is quite easy to use? I am tech savvy, but I don't want to just download a ton of programs on my PC that I won't use xD I'm working on the Desktop Manager and it takes forever. I want to make themes, but I'm curious to know how easy to use this program is... graduate to use design or if it would take a graph xD

    Not sure about that sorry.

    Well, then, I think that... Think THAT that's all. I can change this highest position (if we are allowed to edit) to delimit what questions have been answered. I hope someone sees this soon enough, that I don't know how "living" these forums are.

    Thanks for looking, and I warned you... they have been the newbie questions! xD

    -Darky Delacroix

  • Newbie Question: What should I put in for "Hostname" in the DNS Configuration during install ESXi

    Note: I'm not a professional but rather an amateur trying to test the power of virtualization technology. I understand the IP addresses and how to configure my router, Setup static IP address and build my own computer, but I have some limited knowledge when it comes to the configuration of the servers. All I want to do is use this ESXi server locally in my house to run several operating systems on one physical box. I really don't want to have a server on the internet, I think that Comcast doesn't let me run the servers with dynamic IP package I have. In any case, here's my problem:

    I followed with the installation of the link video tutorial ESXi in the intro email vmware sends you after registering. I'm around the 14:30 mark minute now where we are the management network configuration in the configuration menu of DNS.

    The tutorial guys sets its hostname to something he obviously installation but mine appears as "localhost.hsd1.ca.comcast.net". I do not understand what I do when I set up a host name - and as I said above, I don't want to be put in place a server on the comcast network.

    I think I'm a bit confused and don't know what to put in host name. I tried "localhost" and also "localhost.hsd1.ca.comcast.net" but hen t when I chose "network of test management", I got a message of failure for hostname.

    Sorry if it's a super newbie question, but I will not continue to implement virtual machines or what then if this setting is incorrect. I appreciate your time in reading this / to help me. Thank you.

    UPDATE: Ok, so since I'm impatient, I tried just letting the host name to what it was and continues with tutorial and realized that I could simply type the address static IP address from my ESXi server in my web browser from another computer on my home network to get the VI of the esxi Server client , then I typed just 192.168.1.50 which is that I put it was and it was successful! Is there a reason to set a host name then?

    So, my next question becomes: can I run my windows XP 64 OS at the same time as the ESXi Server? Each are installed on different disks in the same physical box, but this computer is one of my main computers that I work on in windows every day so ideally I would have ESXi running but also be able to use the base operating system. Is this possible or am I just dreaming / confused?

    Your welcome hardnesses, I think you can try to re-insalling ESXi with the hostanme you want, or you can connect to the existing installation with an unsupported option and try the same thing.

    Concerning

    Anil

    Save the planet, go for green

    If you have found my reply to be useful, feel free to mark it as useful or Correct.

  • Is it possible to have a common accessible file location for the main application in the sandbox and its extension app plugin

    I'm trying to launch an app on the app store for mac. The bundle of the main application and everything inside it is on sandbox.

    The main application Bundle identifier is com.xxx.core.app . The identifier for the internal Plugin Finder Extension application Bundle is com.xxx.core.app.extensions .

    Now the problem is the extension inner finder is also available in sand and trying to read a file written by the main application.

    The main application writes the file location depending on mac OS X, for example temp/var/folder/jv11743453495593/T/com.xxx.core.app

    But the internal Plugins try to read/var/folder/jv11743453495593/T/com.xxx.core.app/extensions

    Because of the different bundle identifiers, they have different containers.

    Can someone let me know how to limit the same application and its plugins to the same folder location. Does perform a work around for this problem.

    Hello yuktikapahwa,

    See the Sandbox Apple Guide under the ApplicationDirectory group container

    You must create a group that your container can access. I'm not 100% certain that this will work with extensions of Finder, but it seems the most logical place to start.

Maybe you are looking for

  • Password BIOS for Satellite M30X 122

    Hi all! I have a small problem:Unfortunately, there is a BIOS password on my laptop. I bought the phone two months ago and I don't remember that I never put a password. He must have been there since the beginning. Now, I want to remove the password a

  • 32-bit to 64-bit

    I have Windows XP Pro OS.  Have checked and found that I'm running a 32-bit version.  I have the original CD install disc and CD Key.  Is it possible to reinstall a 64-bit version? Or do I have to buy a whole new operating system?

  • New Designjet T520e unable to connect to the wired network

    I have a problem with a brand new Designjet T520e that can not connect to my network cable.  Said! No connection I can see the lights suitable for connectivity to the plug on the printer and on the switch.  Have you tried replacing it with cables and

  • Laptop HP 2000. The disabled system code is 62890998

    Could someone please help. I try to help my uncle difficulty his PC portable hp 2000. The disabled system code is 62890998 does anyone know the password for this? Help, please

  • Can not build waterfalls sample application: can not find the qmake configuration file

    When you try to build a sample application stunts for debugging on the PlayBook, I have some errors in the output. I am running Windows 7 (64 bit) using the QNX Momentics IDE. Here is the result: ------------------------------------------------------