Listen for an events for Swing objects in a separate class?

Hi all, sorry if this is in the wrong section of the forum but since this is a problem I am having with a Swing based project I thought i'd come here for help. Essentially i have nested panels in separate classes for the sake of clarity and to follow the ideas of OO based development. I have JPanels that have buttons and other components that will trigger events. I wish for these events to effect other panels, in the Hierachy of my program:
MainFrame(MainPanel(LeftPanel, RightPanel, CanvasPanel))
Sorry I couldnt indent to show the hierarchy. Here LeftPanel, RightPanel and CanvasPanel are objects that are created in the MainPanel. For example i want an event to trigger a method in another class e.g. LeftPanel has a button that will call a method in CanvasPanel. I have tried creating an EventListner in the MainPanel that would determine the source and then send off a method to the relevant class, but the only listeners that respond are the ones relevant to the components of class. Can I have events that will be listened to over the complete scope of the program? or is there another way to have a component that can call a method in the class that as an object, it has been created in.
Just as an example LeftPanel has a component to select the paint tool (its a simple drawing program) that will change a color attribute in the CanvasPanel object. Of course I realize i could have one massive Class with everything declared in it, but I'd rather learn if it is possible to do it this way!
Thanks in advance for any help you can offer
Lawrence
Edited by: insertjokehere on Apr 15, 2008 12:24 PM

Thanks for the response, ive added ActionListneres in the class where the component is, and in an external class. The Listeners work inside the class, but not in the external class
import java.awt.event.ActionEvent;
import javax.swing.*;
import java.awt.*;
import java.awt.event.ActionListener;
public class LeftPanel extends JPanel implements ActionListener {  
    /* Constructing JButtons, null until usage of the constructor */
    JButton pencilBut;
    JButton eraserBut;
    JButton textBut;
    JButton copyBut;
    JButton ssincBut;
    JButton ssdecBut;
    ActionListener a = new ActionListener() {
        public void actionPerformed(ActionEvent e) {
            System.out.print("\nNot supported yet.");
    /* The Top Panel contains the title of program */
    public LeftPanel(Dimension d){
        /* Sets up the layout for the Panel */
        BoxLayout blo = new BoxLayout(this,BoxLayout.Y_AXIS);
        this.setLayout(blo);
        /* Sets Up the Appearance of the Panel */
        this.setMinimumSize(d);
        this.setBackground(Color.RED);
        this.setBorder(BorderFactory.createLineBorder(Color.BLACK, 1));
        /* Pencil Tool */
        pencilBut = new JButton("Pencil");
        pencilBut.setAlignmentX(Component.CENTER_ALIGNMENT);
        pencilBut.setActionCommand("pencil");
        pencilBut.addActionListener(a);
        this.add(pencilBut);
        /* Eraser Tool */
        eraserBut = new JButton("Eraser");
        eraserBut.setAlignmentX(Component.CENTER_ALIGNMENT);
        eraserBut.addActionListener(a);
        this.add(eraserBut);
        /* Text Tool */
        textBut = new JButton("Text");
        textBut.setAlignmentX(Component.CENTER_ALIGNMENT);
        textBut.addActionListener(a);
        this.add(textBut);
        /* Copy Previous Page */
        copyBut = new JButton("Copy Page");
        copyBut.setAlignmentX(Component.CENTER_ALIGNMENT);
        copyBut.addActionListener(a);
        this.add(copyBut);
        /* Stroke Size Increase */
        ssincBut = new JButton("Inc");
        ssincBut.setAlignmentX(Component.CENTER_ALIGNMENT);
        ssincBut.addActionListener(a);
        this.add(ssincBut);
        /* Stroke Size Decrease */
        ssdecBut = new JButton("Dec");
        ssdecBut.setAlignmentX(Component.CENTER_ALIGNMENT);
        ssdecBut.addActionListener(a);
        this.add(ssdecBut);
        System.out.print("\nLeftPanel Completed");
    public void actionPerformed(ActionEvent e) {
        System.out.print("\nAction Performed");
    }But this is not picked up in my external class here
import java.awt.event.ActionEvent;
import javax.swing.*;
import java.awt.*;
import java.awt.event.ActionListener;
public class MainPanel extends JPanel implements ActionListener {
    /* Creates a new the main JPanel that is used in the FlipBookFrame to contain all of the elements */
    public MainPanel(){
        /* TopPanel constraints*/
        tpcs.gridx = 1;
        tpcs.gridy = 0;
        tpcs.gridwidth = 1;
        tpcs.gridheight = 1;
        tpcs.fill = GridBagConstraints.BOTH;
        tpcs.weightx = 0.0;
        tpcs.weighty = 1.0;
        /* LeftPanel Constraints*/
        lpcs.gridx = 0;
        lpcs.gridy = 0;
        lpcs.gridwidth = 1;
        lpcs.gridheight = 3;
        lpcs.fill = GridBagConstraints.BOTH;
        lpcs.weightx = 1.0;
        lpcs.weighty = 1.0;
        /* CentrePanel Constraints*/
        cpcs.gridx = 1;
        cpcs.gridy = 1;
        cpcs.gridwidth = 1;
        cpcs.gridheight = 1;
        cpcs.fill = GridBagConstraints.NONE;
        cpcs.weightx = 0.0;
        cpcs.weighty = 0.0;
        /* RightPanel Constraints*/
        rpcs.gridx = 2;
        rpcs.gridy = 0;
        rpcs.gridwidth = 1;
        rpcs.gridheight = 3;
        rpcs.fill = GridBagConstraints.BOTH;
        rpcs.weightx = 1.0;
        rpcs.weighty = 1.0;
        /* BottomPanel Constraints*/
        bpcs.gridx = 1;
        bpcs.gridy = 2;
        bpcs.gridwidth = 1;
        bpcs.gridheight = 1;
        bpcs.fill = GridBagConstraints.BOTH;
        bpcs.weightx = 0.0;
        bpcs.weighty = 1.0;   
        this.setLayout(gblo);   //Sets the Layout of the panel to a GridBagLayout
        this.add(tp, tpcs); //Adds the TopPanel to the MainPanel using the TopPanel layout
        this.add(lp, lpcs); //Adds the LeftPanel to the MainPanel using the LeftPanel layout
        this.add(cp, cpcs); //Adds the CanvasPanel to the MainPanel using the CanvasPanel layout
        this.add(rp, rpcs); //Adds the RightPanel to the MainPanel using the RightPanel layout
        this.add(bp, bpcs); //Adds the BottomPanel to the MainPanel using the BottomPanel layout
        gblo.layoutContainer(this); //Lays Out the Container
    public PanelSizes getPanelSizes(){
        return ps;
    public void actionPerformed(ActionEvent e) {
        System.out.print("\nExternal Class finds event!");
        /*String command = e.getActionCommand();
        if (command.equals("pencil")){
            System.out.print("\nYESSSSSSSSSSSSSSSSSSSSS!");
    /* Create of objects using the PanelSizes funtions for defining the */
    PanelSizes ps = new PanelSizes();   //Creates a new PanelSizes object for sizing the panel
    CanvasPanel cp = new CanvasPanel(ps.getCentrePanelDimension()); //Creates a new Canvas Panel
    TopPanel tp = new TopPanel(ps.getHorizontalPanelDimension()); //Creates the TopPanel
    BottomPanel bp = new BottomPanel(ps.getHorizontalPanelDimension()); //Creates the BottomPanel
    LeftPanel lp = new LeftPanel(ps.getVerticalPanelDimension()); //Creates the LeftPanel
    RightPanel rp = new RightPanel(ps.getVerticalPanelDimension());   //Creates the RightPanel
    /* I have chosen to create individual constraints for each panel to allow for adding of all
     components a the end of the constructor. This will use slightly more memory but gives clarity
     in the code */
    GridBagConstraints cpcs = new GridBagConstraints();
    GridBagConstraints tpcs = new GridBagConstraints();
    GridBagConstraints bpcs = new GridBagConstraints();
    GridBagConstraints lpcs = new GridBagConstraints();   
    GridBagConstraints rpcs = new GridBagConstraints();
    GridBagLayout gblo = new GridBagLayout();
}Any help will be greatly appreciated :-)

Similar Messages

  • Is there a way to get an alarm for my events for the iCal on the iPhone 4?

    Is there a way to get an alarm for my events for the iCal on the iPhone 4?

    Greetings,
    See page 113 of the iPhone 4 user manual: http://manuals.info.apple.com/en_US/iphone_user_guide.pdf
    When you add an event to the Calendar.app of the iPhone 4 there is an "Alert" option which should give you the desired result.
    Cheers.

  • Listening to the event for when App minimizes...

    I have an event listener set to "windowDeactivate" but it is
    firing while the application is still active and being used.
    I only want to trigger a process once the applicationWindow
    is minimized......
    What is the correct event to be listening to ??

    The most straightforward event would be to listen for the
    displayStateChange event from "the" application window and check
    the afterState property to tell whether the window has been
    minimized.
    You might also consider the applicationDeactivate event,
    which is dispatched by the WindowedApplication object when your
    application as a whole loses focus.

  • Flex 4 does not dispatch keyboard events for ENTER key.

    Hello everyone. I think I have a strange problem with Flex 4 Beta (4.0.0.8909). My application has had event listener for keyUp event for a month now and suddenly (two days ago) I've noticed that keyUp event is not dispatched for ENTER (ALT also) key. Anyone know why? By the way, I've tried this with keyDown event, also 4.0.0.8847 version of SDK - still the same: no keyboard events for ENTER (and ALT) key.
    Here is the sample application that has got this issue:
    <s:Application
       xmlns:fx="http://ns.adobe.com/mxml/2009"
       xmlns:s="library://ns.adobe.com/flex/spark"
       xmlns:mx="library://ns.adobe.com/flex/halo"
       minWidth="640" minHeight="480"
       keyUp="application1_keyUpHandler (event)">
       <fx:Script>
          <![CDATA[
             import mx.controls.Alert;
             protected function application1_keyUpHandler (event: KeyboardEvent):void
                Alert.show ("Key up: " + event.keyCode);
          ]]>
       </fx:Script>
       <s:layout>
          <s:BasicLayout/>
       </s:layout>
       <s:TextArea verticalCenter="0" horizontalCenter="0" width="200"/>
    </s:Application>
    If you run this application and try typing anything in a TextArea you will get alerts with key codes. However, if you press ENTER (or ALT), you will get no alert.
    I'm pretty sure the code above is right so that means there is a bug in latest nightly builds of SDK (i would swhitch to an older build if i knew which one does not have this bug).
    Any ideas?

    Flex harUI wrote:
    That's true, but in this case, I think the text editing code is eating ENTER key in order to prevent parents from seeing it and acting on it (like a submit button).  We'll see if we can find a way around that.
    You can get the ENTER key now by listening in capture phase.
    Alex Harui
    Flex SDK Developer
    Adobe Systems Inc.
    Blog: http://blogs.adobe.com/aharui
    The enter key isn't being disposed of by textedit, the attached example code works without error if you a- remove the alert box and b-set the focus to your text area on initialisation. I agree that pressing the enter key then calling a dialog box will result in the enter key being "gobbled up" as  the enter key is overridden by the dialog box code.
    I think the first suggestion should be to anyone don't use dialogboxes for testing code. If for some reason debugging isn't desirable instead of a trace statement a simple label  can be used as a 'fake' trace.
    David
    Message was edited by: David_F57: I worded this wrong, imho there is no need for a work around, the textarea component works as it should. When intercepting 'system' keycodes there is a need to consider the effect of the intercept and code appropriately to that end.

  • Error in work flow wait for change event

    Error in work flow wait for change event of business object bus1014, Actually this business object is triggering for two transaction one is me21n and another is c201 . am trying to create fork with two branches one is create and another if change occurs wait will trigger, bt when i trigger work flow controll is not after fork, it will stop in fork only. and am not getting my workflow container variable getting instantiate, am getting error in wait. please any one get out of me in this

    Hi Sangeetha
    What is LV_MATERIAL? is it a BO container element? or a class element or a just a simple variable?
    Error message is clear, you are trying to evaluate LV_MATERIAL but it does not contain a value.
    This is a custom workflow as it begins with WS9xxxxxxx... what is LV_MATERIAL used for? what are we expecting it to hold? maybe, from event to workflow binding we can pass the value to it.
    Please share the following:
    1) Definition screen shot of LV_MATERIAL
    2) Screen shot of The step where it is first used - from SWDD
    3) Screenshot of Event to Workflow Binding
    4) name of your base Business Object (seen in the triggering events tab of the WF template in PFTC)
    5) What is the corresponding variable for that BO in your workflow container
    6) Screen shot of WF definition from SWDD - please identify the step going in error in that screen shot
    Regards,
    Modak

  • Two events for same workflow

    Hi Friends,
    I needs to develop a workflow. In my workflow i have to send email notification when it is relesed as well as if user will change the PO after finally released  i need to send email notification for change also. 
    i.e : 1. email notification for PO aprroval
          2. after finally approve the PO if they change again i have   to send mail. In future also if they change   released PO i have to send mail again.
    Is this possible in one workflow OR i have to create 2 workflows.
    Thanks,
    NK

    Hi Naresh  ,
    Yes you can do this within the same workflow . Just add an entry in the transaction SWEC for change event of your object .
    Here are the steps :
    Click New Entry.
    Give Change doc object .
    Object type as your  object .
    Event as your event name which you created..
    Select Change radio button .
    Save.

  • User event for array of waveforms with attribute

    I have been transferring data in a Producer/Consumer architecture via User Events.  The data consisted of an array of waveforms. When I added an attribute to the waveforms the code breaks with two errors about Create User Event: User event data type is unnamed or has elements with no names or duplicate names, and Contains unwired or bad terminal.
    From reading the help on user events it is not clear that arrays are even allowed: "user event data type is a cluster of elements or an individual element whose data type and label define the data type and name of the user event."
    From experimentation it seems that arrays of numerics and arrays of wavefroms without attributes work. A single waveform with an attribute can also be used. But an array of the same waveform with attribute leads to a broken run arrow. It also appears that I can put the array of waveforms with attributes inside a cluster and then create the user event.
    Is this a bug, an undocumented corner case, or some "feature" that I do not understand?
    Searching for User Event for Array of Waveforms generates some interesting, but mostly irrelevant results.
    Lynn

    tst wrote:
    Another option would be typecasting, but it looks like you can't typecast a waveform. Variant to Data or Coerce to Type might also work, but I haven't tried.
    I have also done the Flatten To String and Unflatten From String to send data around.  It would be preferable to not need to do that though.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • Item Details - Event for 'Create', 'Close' buttons - possible?

    Hi Friends,
    I am looking for EPCF Events for Item Details iView. I am able to show the record in this iview by selectIdHandler. Now, i want to clear the iView content - the functionality when we click 'Close' button.
    So, does any one of you know any Events to fire Create, Close buttons on Item Details iView?
    Thanks,
    Raags

    Hello Raags,
    Have you discovered how to trigger any of those events? I'm having a similar issue.
    I need when I open the record to have it in Edit mode already, not to click the Edit button in order to get there.
    Let me know if you discovered a solution.
    Best regards,
    Boris

  • Event for preventing a new entry in DBTable

    hi all,
    please suggest me a event in table maintenance to have a check for preventing the entry into the table. i tried event 18 but wen the error msg is displayed it comes out of record entry window which is to be avoided.
    regards
    Madhu

    My friend  it is  not
    18 . it is 05 -> Creating New Entry. 
    so that  you can validate with the User   and  do the validation  and update the table .
    "Below is the code for  it
    Select 05 for an event for “Creating a new entry”.
    This event will be triggered while creating a new entry in SM30 or using the TCODE.
    Form Name: AT_NEWENTRY (Enter key)
    Double Click on the editor.
    form at_newentry.
    Ztab-ZCOUNTRY = ‘India’.
    Ztab-ZCREATEDATE = sy-datum.
    Ztab-ZCREATETIME = sy-uzeit.
    endform.
    Create another event: 02 for “After Save”
    FORM after_save.
    Ztab-mandt = extract+0(3).
    Ztab-ZCOUNTRY = extract+3(3)..
    Ztab-ZCREATEDATE = sy-datum.
    Ztab-ZCREATETIME = sy-uzeit.
    MODIFY ztab.
    ENDFORM. "after_save
    Step 4: Create Transaction Code.
    Go to SE93.
    Transcation code: ZTAB
    Transaction text Test Table Maintenance Events
    Transaction: SM30, Skip first Screen
    Default Values:
    VIEWNAME ZTAB
    UPDATE X
    Reward  points if it is usefull....
    Girish

  • Exceptions for repeating Events aren't handled correctly on iPod!?

    I have a few repeating all day events set up in my calendar in iCal. If I sync them to my iPod they are transfered correctly.
    However, if I move one of them in iCal from say wednesday to tuesday as an exception for this event (for just one week), the event isn't moved on the ipod as well. Instead, after syncing, it shows up on tuesday *as well as* wednesday. In iCal everything is displayed correctly...but on the ipod it is doubled.
    Does anyone know how to fix this?
    Best regards,
    Markus.

    Scott,
    thanks for your hint. unfortunately this didn't change anything at all.
    I still got my repeating events correct on the mac but doubled on the ipod.
    Any other ideas?
    Best regards,
    Markus.

  • ESS Training Event for Employee

    Hello guys
    i need to know if exist any iview for training event for ESS only
    I know is iview exist for MSS but any know if exist for employee
      thanks

    There is no training event iview in WD JAVA or ABAP in new releases, it might be old ITS based ones
    although you have something called Learning Solution which replaces this, This can be implemented thru Business package
    learn more on LSO using help.sap.com

  • Attendance Booking for Training Event (HR) : How to Intervene with Workflow

    <u><b>Scenario:</b></u>
    I use transaction PV00 to book for an event for a person. First time booking gives status - Attendance booked, Second time when i book for the same event for the same person - it gives me a message attendance was updated.
    The booking event is logged as a session to be run through SM35.
    Now through workflow i need to stop the booking based on condition, say....the position has to be manager as an eligibility to book for the particular event.
    I went through transactions SWEHR1, SWEHR2, SWEHR3..What does they actually signify..in relation to my scenario.
    Please anyone suggest me how can i stop booking online directly - by intervening with a workflow.

    There is a BAdI you can use to accomplish this.  With the Learning Solution, it's LSO_CHECK_BOOKING.  I know there's a comparable one for plain TEM but can't remember what it is, offhand.  Can't help you with the workflow.
    Cheers,
    Sharon

  • Why and how to use events in abap objects

    Dear all,
      Please explain me why and how to use events in abap objects with real time example
    regards
    pankaj giri

    Hi Pankaj,
    I will try to explain why to use events... How to use is a different topic.. which others have already answered...
    This is same from your prev. post...
    Events :
    Technically speaking :
    " Events are notifications an object receives from, or transmits to, other objects or applications. Events allow objects to perform actions whenever a specific occurrence takes place. Microsoft Windows is an event-driven operating system, events can come from other objects, applications, or user input such as mouse clicks or key presses. "
    Lets say you have an ALV - An editable one ...
    Lats say - Once you press some button  you want some kind of validation to be done.
    How to do this ?
    Raise an Event - Which is handled by a method and write the validation code.
    Now you might argue, that I can do it in this way : Capture the function code - and call the validate method.
    Yes, in this case it can be done.. But lets say .. you change a field in the ALV and you want the validation to be done as soon as he is done with typing.
    Where is the function code here ? No function code... But there is an event here - The data changed event.
    So you can raise a data changed event that can be handled and will do the validation.
    It is not user friendly that you ask the user to press a button (to get the function code) for validation each time he enters a data.
    The events can be raised by a system, or by a program also. So in this case the data changed event is raised by a system that you can handle.
    Also, Lets say on a particular action you want some code to trigger. (You can take the same example of validation code). In this case the code to trigger is in a separate class. The object of which is not available here at this moment. (This case happens very frequently).
    Advantage with events : Event handlers can be in a separate class also.
    e.g : In the middle of some business logic .. you encounter a error. You want to send this information to the UI (to user - in form of a pop up) and then continue with some processing.
    In many cases - A direct method call to trigger the pop up is not done. Because (in ideal cases) the engine must not interact with UI directly - Because the UI could be some other application - like a windows UI but the error comes from some SAP program.
    So - A event is raised from the engine that is handled in the UI and a pop up is triggered.
    Here -- I would have different classes (lets say for different Operating Systems). And all these classes must register to the event ERROR raised in application.
    And these different classes for different Operation systems will have different code to raise a pop-up.
    Now you can imagine : If you coded a pop-up for Windows (in your application logic) .. it will not work for Mac or Linux. But of you raise a event.. that is handled separately by a different UI classes for Win, Linux or Mac  they will catch this event and process accordingly.
    May be I complicated this explanation .... but I couldn't think of a simpler and concrete example.
    Cheers.
    Varun.

  • Is it possible to use events for objects that do not use swing or awt

    Dear Experts
    I want to know if events are possible with plain java objects. A simple class that is capable of firing an event and another simple class that can receive that event. My question is
    1. If it is possible - then what is the approach that needs to be taken and would appreciate an example.
    2. Is Observer Pattern in java going to help?
    To explain further i am doing [Add,Modify,Delete,Traverse] Data tutorial using swing in Net beans. I have a ButtonState Manager class that enables and disables buttons according to a given situation. For example if add is clicked the modify button becomes Save and another becomes Cancel. The other buttons are disabled. What i want is the ButtonStateManager class to do a little further - i.e. if Save is clicked it should report to DBClass that it has to save the current record which was just added. I am foxed how this can be done or what is the right way. Thanks for reading a long message. Appreciate your help.
    Best regards

    Thanks Kayaman
    i guess i am doing something else maybe it is crazy but i need to work further i guess... i cant post the entire code as it is too big but some snippets
    public class DatabaseApplication extends javax.swing.JFrame {
        ButtonStateManager bsm;
        /** Creates new form DatabaseApplication */
        public DatabaseApplication() {
            initComponents();
            // ButtonStateManager has a HUGE constructor that takes all the buttons as argument!
            bsm = new ButtonStateManager(
                    btnAdd,
                    btnModify,
                    btnDelete,
                    btnQuit,
                    btnMoveNext,
                    btnMovePrevious,
                    btnMoveLast,
                    btnMoveFirst );One of the methods in the ButtonStateManager Class is as follows
      private void modifyButtonState()
            btnAdd.setText("Save");
            btnModify.setEnabled(false);
            btnDelete.setText("Cancel");
            btnQuit.setEnabled(false);
            ...Finally the Crazy way i was trying to do ... using EXCEPTIONS!
      void modifyClicked() throws DBAction
            if(btnModify.getText().equalsIgnoreCase("MODIFY"))
                modifyButtonState();
            else
                throw new DBAction("SaveAddedRecord");
        }And Finally how i was Tackling exceptions....
      private void btnAddActionPerformed(java.awt.event.ActionEvent evt) {                                      
          try {
                bsm.addClicked();
            } catch (Exception e1) {
                processDBAction(e1.getMessage());
        private void processDBAction(String msg)
            if(msg.equalsIgnoreCase("SAVEMODIFIEDRECORD"))
                System.err.println(msg);
                bsm.normalButtonState();
            }Edited by: standman on Mar 30, 2011 4:51 PM

  • Listening for an event outside of the object...

    Hey, I spent a lot of my day trying to figure out how to
    listen for an event outside of an instantiated object of my own.
    I made my own class called
    Link. When my Link class is instantiated, a Loader object
    (var loader:Loader) is added and it loads a user-specified external
    PNG file. I want to track the Event.COMPLETE event OUTSIDE of my
    Link class, like in my FLA's Actionscript.
    So, I tried a few things without any luck, and by these you
    might get the idea of exactly what I'm trying to do:
    var link1:Link = new Link(...);
    link1.loader.addEventListener(Event.COMPLETE, handler);
    That didn't work, so I tried:
    var link1.Link = new Link(...);
    var loader = link1.getChildByName("loader") as Loader;
    loader.addEventListener(Event.COMPLETE, handler);
    ... that didn't work either. :(
    Any ideas?
    If I am taking the completely wrong approach please do let me
    know. If there's ANY way to know WHEN my loader has completed
    loading its image outside of my Link class...
    Thanks!
    ~ Andrew Merskin

    Let your Link class handle the Loader events. When
    Event.COMPLETE fires,
    just redispatch the event or dispatch a custom event.
    Example 1:
    link1.addEventListener("ALLDONELOADING", linkEventHandler);
    function linkEventHandler(event:Event)
    if(event.type == "ALLDONELOADING")
    // do something or nothing at all
    // Inside your link class you are listening for the load
    complete
    function loadCompleteHandler(event:Event)
    dispatchEvent(new Event("ALLDONELOADING")));
    Example 2:
    link1.addEventListener(Event.COMPLETE, linkEventHandler);
    function linkEventHandler(event:Event)
    if(event.type == Event.COMPLETE)
    // do something or nothing at all
    // Inside your link class you are listening for the load
    complete
    function loadCompleteHandler(event:Event)
    dispatchEvent(event);

Maybe you are looking for

  • Pass a value to a dll under labview

    I have to build a dll under cvi and use it under labview. my problem is to pass a value to this dll from labview. But when I use it, labview return an error code and close the software... I can return value from the dll to labwiew but not the contrar

  • Datagrid column in module causing memory leak

    Hi All I'm having trouble with a DataGrid column preventing a module from being release properly. I can't imagine this is the intended behaviour. Using this simple test case, a WindowedApplication and an mx:Module I wonder if anyone else can reproduc

  • How to convert a string to date object?

    I have a string user input for date. I want to convert it to Date object to insert it in database. How to do it?

  • Iphone and Windows Live Gallery error code when trying to edit

    Most of my photo's come from my iPhone 4gs.  Fairly resently i haven't been able to edit photos in Windows Live Gallery.  Especially Rotating pictures.  I get an error code "file location" - Error code: (0x80070057)

  • USB on Cinema LED kaput?

    So I have this great Cinema Display which has worked flawlessly for over a year. Has 3 USB ports on the back. Use one for the keyboard and the other to recharge my iPhone. All was well today until I decide to clean my office and was shifting things a