Why override custom event-and when to override it?

Hi guys..
   I always have a question about override custom event. I am not sure why or what do to inside override function. I searched google but didn't get too many feedbacks.
Also, my projects seem work fine even though I use my custom event without override. Anyone could explain it? I appreciate if someone can light me up.

Yes, it's a good practice to override the clone function of the superclass but you're not really overriding your custom event. Guess I didn't say it well before. Just google something like "Flex override clone function" and you'll be taken to the livedocs, most likely, where you'll find this paragraph
You are required to override the Event.clone() method in your subclass. The clone() method returns a cloned copy of the event object by setting the type property and any new properties in the clone. Typically, you define the clone() method to return an event instance created with the new
operator.
I've not really thought about it before but I assume that's in case you want to extend your class. Anyway, you can pretty blindly just include that override of the clone function and not get into trouble. It's just saying, hey, if something is dealing with this custom event, don't return a copy of the superclass - the Event class - return a copy of this custom event that I've created to extend the Event class to add special functionality.

Similar Messages

  • Custom Event and Custom Expression Deletion in PCW

    Hi Sap Gurus,
    How can i delete the custom event and custom expression created by me in process controlled workflow... I have observed the deletion button grayed out... Is there any other option to delete the custom event and expression.
    Thanks in advance

    Hello Sanjay,
    check below thread:
    BRF - Can not delete expression
    Regards.
    Laurent.

  • What is a customer statement and when do we use it?

    Hi,
    What is a customer statement and when do we use it? An example in terms of business scenario would surely help me.

    Hi,
    In business sense Customer statment is the list of  transactions that were executed over a period of time.
    When ever customer buys the material from the company bill is generated and the same is debited to his account.
    whenever customer pays the amount to the company, the amount will be credited to his account.
    So the Customer statment will have the list of DEBIT and CREDIT entries.
    There will be Reconciliation for every quarter with the customer by the company sales executive and related price, discounts, freight which might be excess or less will be settled

  • Plz someone help I made custom ringtones and when I try to put them in my iPhone 4 it hey appear gray on iTunes and won't go on my phone and I tried syncing it don't help what do I do???!!!

    Plz someone help I made custom ringtones and when I try to put them in my iPhone 4 it hey appear gray on iTunes and won't go on my phone and I tried syncing it don't help what do I do???!!!

    The ringtone file format is m4r.  You can create ringtone from any of your music file in your iTunes Music library.
    Follow steps as follow:
    1. Right mouse click the song in music library you want to create ringtone and choose “Get Info”
    2. Choose “Option” Tab, Check “Start Time” n Stop Time” of the track you want to make into ringtone and put in your start time and end time (Max 40 secs duration), then click OK
    3. Right mouse click the music file again and choose “Create AAC Version”
    4. You will see a copy of song with same name appeared but with 40sec duration only. Now drag the song onto your desktop and you will see the name is now xxxxxx.m4a.
    5. Change the file extension m4a into m4r from the desktop
    6. Delete the 40sec m4a file from the music library (You must do this step or Itune will not accept your new m4r file).
    7. *Important - Now uncheck the start n stop time of the original song so that you can play back full length.
    8. Now, drag the m4r file from desktop to Library
    9. Click onto the Tones under Library, and you find you ringone file.
    Note: Just in case you cannot "Create AAC version" from Step 3, go to top menu, click "Edit", "Preference". Under "general" Tab, click "Import Settings", make sure under Import Using that "AAC Encoder" is selected.
    Once you have ringtones in Tones library, you can sync ringtones over by connecting your phone to PC, select iPhone under Devices on iTunes left Pane, then go to 'Tones' tab and check SYNC TONES as well as the ringtones.  Click the SYNC button on the lower right window.

  • Custom Event and Custom itemRenderer

    I created an MXML component based on <mx:Button/> and
    am using it as a custom itemRenderer in a DataGrid.
    I also created a custom event, and my custom itemRenderer
    dispatches the event. I know the event gets dispatched because I
    see it in the debugger.
    I register an event listener in the parent of the DataGrid,
    but the event handler is not being called.
    If you have any advice, please help.

    In the DeleteItemEvent constructor:
    super(type, bubbles);
    TS

  • Hi there i have ipod touch 2nd gen and i am tryna restore it but i get error 21 with orginal fireware and 1601 with custom fireware and when it connected to itunes and i try to boot it up by restoring it white screen with lines thorugh it

    hi there i ahve ipod touch 2nd gen and i am tryna restore it but get error 21 with orginal fireware and 1601 with custom firewarw and when connected it to itunes and i try to boot it by resotring it white screen with lines through it

    Those errors are covered here:
    http://support.apple.com/kb/TS3694

  • Query regarding creating a Custom Event and Firing.

    I have created a custom event,a custom listener and a custom button.
    But when I click on custom button,my event is not being fired.
    When and how do I need to invoke the fireEvent() ?
    Please can any body tell me if I have overlooked any thing ?
    Thanks,
    // 1 Custom Event
    import java.util.EventObject;
    public class MyActionEvent extends EventObject{
            public MyActionEvent(Object arg0) {
         super(arg0);
    // 2 Custom Listener
    import java.util.EventListener;
    public interface MyActionListener extends EventListener {
          public void myActionPerformed(MyActionEvent myEvent);
    // 3 Custom Button
    public class MyButton extends JButton {
        // Create the listener list
        protected javax.swing.event.EventListenerList listenerList = new javax.swing.event.EventListenerList();
          public MyButton(String str){
         super(str);
         public void addMyActionEventListener(MyActionListener listener) {
             listenerList.add(MyActionListener.class, listener);
        protected void fireMyActionEvent() {
            MyActionEvent evt = new MyActionEvent(this);
            Object[] listeners = listenerList.getListenerList();
           for (int i = 0; i < listeners.length; i = i+2) {
                 if (listeners[i] == MyActionListener.class) {
                      ((MyActionListener) listeners[i+1]).myActionPerformed(evt);
    } // end of class MyButton.
    // 4 Test my Custom Event,Listener and Button
    public class MyButtonDemo extends JPanel {
        protected MyButton b1;
        public MyButtonDemo() {
            b1 = new MyButton("Disable Button");
            b1.setToolTipText("Click this button to disable the middle button.");
            b1.addMyActionEventListener(new MyActionListener() {
         @Override
         public void myActionPerformed(MyActionEvent myEvent) {
         System.out.println("My ActionEvent....");
            add(b1);
        private static void createAndShowGUI() {
            JFrame frame = new JFrame("ButtonDemo");
            frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            MyButtonDemo newContentPane = new MyButtonDemo();
            newContentPane.setOpaque(true);
            frame.setContentPane(newContentPane);
            //Display the window.
            frame.pack();
            frame.setVisible(true);
        public static void main(String[] args) {
            javax.swing.SwingUtilities.invokeLater(new Runnable() {
                public void run() {
                    createAndShowGUI();
    }

    Hi Stan,
    I would like to use my custom action listener rather that using the the normal actionPerformed(ActionEvent e)
    But some how this event is not being fired.
    Any suggestions to fire this?
    b1.addMyActionEventListener(new MyActionListener() {
             @Override
             public void myActionPerformed(MyActionEvent myEvent) {
         System.out.println("My ActionEvent triggered....");
    });

  • Custom Events and Scheduling more than once

    Hi,
    in BO 4.1, I successfully triggered WebI Report instance generation by a "Custom Event" through scheduling.
    Now, we have the requirement that the report should not be triggered only once but always when the event is triggered.
    At first glance, this looks tricky bc. in order that the report "reacts" to the event, the report itself must be scheduled with the event (it gets an instance "pending" that "wait + reacts" to the event). So it looks like we need schedule the report always manually with "event" before it is ready to react to the event specified in the scheduling.
    Is there any user-friendly trick to make the report react upon every fired event without having to "schedule" the report manually with the event?
    (Similar to schedule daily, just that the event is the trigger, note a daytime...)
    Best Regards

    Hi Florian,
    What is the frequency set under Recurrence option for the report instance?
    Can you give an idea like after how much time the event can be triggered?
    For example, if you are expecting the event to change in an hour, you can schedule the recurrence as hourly or you can specify something like 0 hours and 15 minutes or something like that.
    In that case, once the event is fired, your report instance will be ready to trigger after 15 minutes for the next run.
    Would suggest you to sync with the BO administrator as concurrent triggering of large number of instances can give load on Job Servers.
    Hope it will help in some way.
    Regards,
    Yuvraj

  • Custom Events and Listeners between classes

    I've got a project I've been working on for weeks that I'm
    having yet another problem with. I'm trying to learn AS3 which is
    why it's taking so long but that's not important for this post.
    I wanted to create a custom event class so that I could make
    sure the event does not interfere with other "COMPLETE" events that
    are being passed between classes. In other words, I have a few
    things that need to complete prior to a function being called...
    one is some XML being loaded and another is a font loaded. So, I
    thought I would create a custom FontLoaded class that extends Event
    and make the type something like "FontLoadedEvent.LOADED". That way
    I could listen for the XML "Event.COMPLETE" and this font event
    also.
    Please tell me if I'm going down the wrong path here but I
    don't seem to be getting the dispatched event for my new custom
    event. Also, how does one detect if it's being dispatched other
    than if the eventListener is fired? Any other ways to test
    this?

    You can trace the event to see if it dispatched.
    Also, this is not a good case to create a new event. Custom
    events are used to store additional information. MouseEvent exists
    because Event doesn't have localX, localY, etc. properties. Since
    you don't seem to be throwing additional properties, you can use a
    regular event.
    trace(dispatchEvent(new Event("panelFontsLoaded"));
    addEventListener("panelFontsLoaded", onFontsLoaded);
    Static consts are used to help debug typos. The event type is
    just a string, often stored in a const.

  • How to define custom event and how to trigger the defined event

    hi,guys
    hurry issue....................hope get help.
    I am using oracle weblogic 10gr3 portal.and we choiced java portlet.as of now,we got some question about custom Event.hope you can give some idea....
    thank you so much.
    question detail:
    1.for java portlet ,how to define custom event.
    2.how to trigger this event.
    3 about the data,may be sometime need to transit Biz data.
    auctully,I just want to implements between two portlets communicate.
    for example:
    existing portletA,portletB.
    portletA is a list,like:
    A AA <button>
    after I click this buttom,then portletB will be effect,it means they are interact with each other.
    does anybody hit this issue before,if you solved pls share me .
    thank you for you help....

    Hello,
    Please note that everything below applies to JSR168 portlets ONLY- JSR286 portlets and other portlet types handle events a little differently.
    From inside your JSR168 portlet you can send an event during processAction or when receiving another event by using the PortletBackingContext object, such as:
    import javax.portlet.ActionResponse;
    import javax.portlet.ActionRequest;
    import javax.servlet.http.HttpServletRequest;
    import com.bea.netuix.servlets.controls.portlet.backing.PortletBackingContext;
    public void processAction(ActionRequest actionRequest, ActionResponse actionResponse)
    HttpServletRequest httpRequest = (HttpServletRequest) actionRequest.getAttribute("javax.servlet.request");
    PortletBackingContext portletBackingContext = PortletBackingContext.getPortletBackingContext(httpRequest);
    portletBackingContext.fireCustomEvent("customEvent", "This is a custom event");
    To receive an event, in your .portlet file you just need to put in a "handleCustomEvent" tag specifying which method to call when the event is received, such as:
    <?xml version="1.0" encoding="UTF-8"?>
    <portal:root xmlns:netuix="http://www.bea.com/servers/netuix/xsd/controls/netuix/1.0.0"
    xmlns:portal="http://www.bea.com/servers/netuix/xsd/portal/support/1.0.0"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://www.bea.com/servers/netuix/xsd/portal/support/1.0.0 portal-support-1_0_0.xsd">
    <netuix:javaPortlet title="Listening Portlet" definitionLabel="yourPortletName">
    <netuix:handleCustomEvent event="customEvent" eventLabel="customEvent" filterable="true" description="custom event handler">
    <netuix:invokeJavaPortletMethod method="processCustomEvent"/>
    </netuix:handleCustomEvent>
    </netuix:javaPortlet>
    </portal:root>
    Then, in your receiving portlet the method "processCustomEvent" would receive the event, such as:
    public void processCustomEvent(ActionRequest actionRequest, ActionResponse actionResponse, Event event)
    The event payload can be any Serializable object you want, but for forward-compatibility with JSR286 it would be ideal if it had a valid JAXB binding.
    Kevin

  • Console errors "Verification failed with 1 errors" and when Deleting Overrides

    Hi Guys,
    When trying to delete an override for a unix server I was prompted with this error:
    Note:  The following information was gathered when the operation was attempted.  The information may appear cryptic but provides context for the error.  The application will continue to run.
    : Verification failed with 3 errors:
    Error 1:
    Found error in 1|XXXXX.XX.Unix.Management.Pack|1.0.0.0|DisplayString,ElementReference=a27e1d14-8ad4-56fb-da46-0c0994054e92,LanguageID=ENA|| with message:
    Element Info with Identity DisplayString,ElementReference=a27e1d14-8ad4-56fb-da46-0c0994054e92,LanguageID=ENA refers to an invalid sub element Filter.
    Error 2:
    Found error in 1|XXXXX.XX.Unix.Management.Pack|1.0.0.0|DisplayString,ElementReference=ef78d342-5a82-d629-224d-2e476003f6e1,LanguageID=ENA|| with message:
    Element Info with Identity DisplayString,ElementReference=ef78d342-5a82-d629-224d-2e476003f6e1,LanguageID=ENA refers to an invalid sub element Filter.
    Error 3:
    Found error in 1|XXXXX.XX.Unix.Management.Pack|1.0.0.0|DisplayString,ElementReference=06522f67-c195-2dfa-c310-a0134b961fc4,LanguageID=ENA|| with message:
    Element Info with Identity DisplayString,ElementReference=06522f67-c195-2dfa-c310-a0134b961fc4,LanguageID=ENA refers to an invalid sub element Filter.
    : Element Info with Identity DisplayString,ElementReference=a27e1d14-8ad4-56fb-da46-0c0994054e92,LanguageID=ENA refers to an invalid sub element Filter.
    I then exported the MP and manually deleted the Override but when I try to import it I get the same error.
    I have also checked a couple of other unsealed MP and some are also affected.
    I have gone through the MP XML can find no matches for any of the references. Is there a way (powershell or SQL query) where i can identify what these references are or how I should proceed to troubleshoot this issue?
    Cheers,
    Martin
    Blog:
    http://sustaslog.wordpress.com 
    LinkedIn:
    Note: Posts are provided “AS IS” without warranty of any kind, either expressed or implied, including but not limited to the implied warranties of merchantability and/or fitness for a particular purpose.

    Hi Yan,
    That was my understanding about the error also but there are no entries for:
    ef78d342-5a82-d629-224d-2e476003f6e1
    a27e1d14-8ad4-56fb-da46-0c0994054e92
    06522f67-c195-2dfa-c310-a0134b961fc4
    in the management pack at all.
    What also is curious is that the errors refer to "LanguageID=ENA"
    but the only language code present inside the management pack is ENU. 
    The fact that there is no ENA language pack and that there are no references matched leads me to believe
    that this issue is not due to this MP its references in another.
    </LanguagePack>
    <LanguagePack ID="ENU" IsDefault="false">
    <DisplayStrings>
    There are also about 14 reference management packs this MP uses and those MP would also have a handful each which makes it difficult to troubleshoot. 
    Unfortunately deleting the MP isn't an option as there is a significant amount of configuration saved in it.
    Any ideas on how I could identify theses references?
    Cheers,
    Martin
    Blog:
    http://sustaslog.wordpress.com 
    LinkedIn:
    Note: Posts are provided “AS IS” without warranty of any kind, either expressed or implied, including but not limited to the implied warranties of merchantability and/or fitness for a particular purpose.

  • Cannot edit event, add new event and when save the unit says Sorry, we are experiencing technical difficulties. Please wait for a few moments and try again. Er

    When I hit save on the edit block or new event , the following warning is shown:-" Sorry we are experiencing technical difficulties. Please wait for a few moments and try again. Error: 0000". The system locks up and can only be cleared by hitting the reload button

    Hi,
    Unfortunately we had a data base error today and lost some user accounts when we had to go back to our backups. If you have started this thread, your's is one of those. Since we can not recreate your account, please sign-up for a new account here to reply to the forum messages:
    https://support.mozilla.org/users/auth
    You can use the same username and email address as before. We are very sorry for the inconvenience.

  • Firefox keeps closing out hotmail with out warning at all in CA., U.S.A. plus will not close out since 2 weeks ago now ,why is this happening and when will it be fixed? S.A.

    why is firefox not allowing hotmail to be used the last 3 weeks?
    I keep having my service shut down plus will not allow singing out all the way. is there any plans to fix this problem ? how soon will you fix this problem.
    you are way better than internet explored and they are not doing these things so why are you allowing these problems to keep going on?
    thank you for getting this fixed and back to normal A SAP.

    Hi systemBuilder, you are not alone in your frustration. The problem is the plugin model: plugins are allowed to do much more than they can be trusted to do intelligently. Without a change to that, Firefox cannot stop the Flash player from changing window focus.

  • It is widely known that the IOS6 software is available for most Iphones from today, but for some reason this does not seem to be the case, why is this? and when is the new software available?

    September 19th, Today, is widely communicated as being the day that the IOS6 Software for the Iphone 4s will be available to replace IOS5.1.1 BUT, I have been trying to update it all day and it still currently says the software is up to date on IOS5.1.1 ? what is going on, is it out today? if not when will it be available?
    is anyone else having this issue?

    King1979 wrote:
    I hate waiting, here in the UK its late afternoon and I am sick of the phone telling me its up to date on IOS 5.1.1 I am also a techno geek....... have you guys got it yet? should have had it at 1pm today
    Honestly, I have not even bothered to try to get it yet.  I'll do it this coming weekend, when I can do it at my liesure (my iPhone is also my only phone, so I never leap into any update immediately - I like to let the dust settle a bit and see just how it goes - let others be my beta-testers, as it were).

  • Hi i just got my new ipad today and it was on i don't why but its new and when i plug it into my computer at the top of the ipad says not charging how can i make it charge?

    new ipad won't charge but i can download everytthing but the top says not charging and its at 20%

    That is perfectly normal with the new iPad. Your USB port does not supply enough power to charge the iPad. This is copied from Apple's web site about the iPad battery.
    Charging Tips
    The quickest way to charge your iPad is with the included 10W USB Power Adapter. iPad will also charge, although more slowly, when attached to a computer with a high-power USB port (many recent Mac computers) or with an iPhone Power Adapter. When attached to a computer via a standard USB port (most PCs or older Mac computers) iPad will charge, but only when it's in sleep mode. Make sure your computer is on while charging iPad via USB. If iPad is connected to a computer that’s turned off or is in sleep or standby mode, the iPad battery will continue to drain.
    You can read the rest of it here.
    http://www.apple.com/batteries/ipad.html

Maybe you are looking for