Event propagation and inheritance

Hi,
I have a button inheriting from another. In the ancester I have a CLICK event handler registered.I have another CLICK event handler in the descendent button. In the descendent I want to handle the CLICK event combined with the CTRL key. Without the CTRL key I want the the ancester event handler to do it's work. I tried different combinations of StopPropagation(), StopImmediatePropagation priorities, etc...with no satisfactory result. Sometimes both event handlers are triggered, sometimes only the event handler for the descendent is triggered. What would be the way to do this. Thanks in advance.

Thanks Natasha,
I solved my problem by overriding the click event handler in the descendent like:
override protected function clickHandler(event:MouseEvent):void {
     if (event.ctrlKey) {
          ...do the stuff in case of CTRL-key held
     } else {
          // Do ancestor work for normal click         
          super.dispatchEvent(event)
So...no need for stopping propagation of the event

Similar Messages

  • Event propagation

    Hi,
    SAP has standard functionality of event propagation from FU to FB and vice versa.Now if I want to stop event propagation or event cascading functionality from FB to FU do I need to remove any code logic check in the extractor? Can you elaborate in details here.
    Secondly how does preprocessing functionality help in ENM functionality. What specific checks can eb brought about if w ewant to implement this functionality

    Hi Dipak,
    Extract the FU number as TOR_TEC tracking id from TM shown below
    FU EH TRacking ID table
    Tr.Code.Set
    Tracking id
    FU
    123456
    TRQ
    987563
    TO
    458796
    TOR_TEC
    123456
    Define the Tracking id Code Set(TOR_TEC) in Event reporting items under event message profile , configure only to particular internal event code which does not requires event propagation to FB.
    Above configuration supported only when the event posted via EM WebUI,
    you have to apply the same logic in BADI for interface event posting.
    Regards
    Sukumar

  • [svn:fx-trunk] 9215: Event Propagation bug fix

    Revision: 9215
    Author:   [email protected]
    Date:     2009-08-10 17:30:21 -0700 (Mon, 10 Aug 2009)
    Log Message:
    Event Propagation bug fix
    http://bugs.adobe.com/jira/browse/SDK-21044 - Spark Components should use event.preventDefault instead of event.stopPropagation
    Since keyboard are now cancellable, the Spark components should use event.preventDefault() / event.isDefaultPrevented()  instead of event.stopPropagation. I updated ButtonBar, RadioButton, and DropDownList to use preventDefault(). Also cleaned up Slider and Spinner to always assume the event is cancellable.
    QE notes: Add tests with these components inside of scrollable containers
    Doc notes: None
    Bugs: SDK-21044
    Reviewer: Hans
    Tests run: Slider, Spinner, RadioButton, ButtonBar, DropDownList
    Is noteworthy for integration: No
    Ticket Links:
        http://bugs.adobe.com/jira/browse/SDK-21044
        http://bugs.adobe.com/jira/browse/SDK-21044
    Modified Paths:
        flex/sdk/trunk/frameworks/projects/spark/src/spark/components/ButtonBar.as
        flex/sdk/trunk/frameworks/projects/spark/src/spark/components/RadioButton.as
        flex/sdk/trunk/frameworks/projects/spark/src/spark/components/Spinner.as
        flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/DropDownCont roller.as
        flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/Slider.as

    error dateField not selecion date 27/11/2002 ?
    This is bug flex 3 ?
    thanks

  • Stopping Event Propagation

    Hi All,
    Am facing some issue in event propagation.
    I have a Application component with in which I have a link button. The Application has a mouseDown event listening for it and the link button has the click event listening for it.
    I have a requirement where in if i click on the link button i got to show an image and on again clicking on the link button hiding the image. Basically toggling the hide/show of image on click of the link button. This works fine as expected.
    Now I have mouseDown listening on the Application, where in If I click any where else in the Application again the Image show be hidden and only on click of Link button it should be shown.
    But since I have the mouseDown listening on the Application, whenever I click on the Link button the image is showing properly but then after that when I click the link button again to hide the image, then since two events are getting triggered  the Image is never getting hidden. It always shows up.
    THE FIX I NEED is that when i click on the link button, the parent event should be stopped from bubbling and hence only the Link Button's Click should be called and not the Application's mouseDown.. And in else other places, its fine to have the Application's mouseDown event called.
    I Tried event.stopPropagation () and event.stopImme()...but in vain.......... PLS HELP

    "Jimmy Jeeves" <[email protected]> wrote in
    message
    news:g8va3c$ak4$[email protected]..
    > Hi!
    >
    > I want to provide hotkey in my html webpage. (I am using
    >
    http://code.google.com/p/js-hotkeys/)
    > I also have a chat module in Flex. When I am typing some
    text in the flash
    > object, I don't want the hotkeys to be enabled.
    >
    > I tried to stop the propagation from the flash but it's
    not working.
    >
    > From what I know, the html events are propagated from
    the child to the
    > parents. So if I stop the event from my flash object it
    has to be ok,
    > right?
    >
    > See my example. If I display an Alert from the callback,
    it is displayed,
    > so
    > it works. Why the event is still propagated?
    >
    > Thanks
    >
    > public function reportKeyDown(event:KeyboardEvent):void
    > event.preventDefault();
    > event.stopPropagation();
    > }
    >
    > this.addEventListener(KeyboardEvent.KEY_DOWN,
    reportKeyDown);
    >
    I don't think you can preventDefault on key events. You could
    probably use
    ExternalInterface to tell the web page not to listen for the
    hot keys for a
    while, though.
    HTH;
    Amy

  • Event propagation API

    Hi,
    I recently started using Flex and read through the, very extensive and well written documentation. I read about the event propagation mechanism and was rather stunned that only Objects that have a parent-child relationship take part in event propagation. At first I couldn't believe it but trying to connect to objects that were at very different parts of the display list showed, that the events really do not get delivered! Wouldn't it be better to have a more general mechanism that does not care about the wherabouts of the components? I mean, what if I want to synchronize some model objects that are not even part of the display list with some UI Element they have a relationship with? The target phase doesn't work because its not the model that throws the event (of course!). Or do I miss something here?
    I was expecting a more subject-observer like pattern,  that allows me to connect whatever I want with whatever there is left. So, how do I do that. Do I have to right my own little event dispatching library (what would not be so difficult, but I would rather use something that has already proven its liability)? Can anybody recommend me a good API for that or tell me that I am dead wrong and missing something important?
    Regards,
    Benni

    Only DisplayObjects support bubble and capture propagation.  In a tree of
    regular Objects, as long as you attach a listener to the right object, you
    will be able to get its events.
    Bubble and capture are very dangerous as they break encapsulation.  We only
    use them for situations where the target is unpredictable like in mouse and
    keyboard interaction.  I would probably not use it in a data object tree.
    Maybe if you provide a more explicit example of what you are trying to
    accomplish and what you tried, folks on the forum can help.

  • Upgraded to ios 7.1 battery drain is significant and have lost my calendar events. how do i get my events back and why am i losing so much power now?

    how do i get my calendar events back and why the power drain after upgrading my operating system to 7.1?

    Thought I'd reply to this seen as no one else has, I am also experiencing very similar problems with my 4s and by the looks of it is it's across all handsets. I've never had any battery issues with my iPhone even 7.0.6 was fine, but since updating to 7.1 the battery is ticking down very fast. I fully charged in the morning and left it in my locker all day at work when I got my hands on it it's gone down to 52% just on its own!!
    I really hope they sort this out fast the irony is 7.1 was supposed to help battery life!

  • Training n event management and pd

    Hi gurus,
    my cliient wants to implement training n event mgnmt and pd.client is not specific about the procedures of training and development. he wants to implement as per the best practices of sap. i was only into om , pa and payroll.
    i dont even  have a tinge of idea abt these submodules. i tried searching in forums and other sites to to my dissapointmnt. i am in a big soup now as i need to gather the requirement and do the configurations in a weeks time i.e by next weekend. plzzzzzz help me out with some best practices or some config docs as i dont know even the basics of these. I would appreciate if some body is helping me out with config docs.
    Thanks n advance,
    tulsi

    Hi Tulsi,
    Please go to our help website :
    Appraisals
    http://help.sap.com/saphelp_47x200/helpdata/en/77/bff8ab4a2911d182b80000e829fbfe/frameset.htm
    and you can also use the link:
    https://websmp209.sap-ag.de/bestpractices
    Thanks
    Chetan

  • Training & Event management and Appraisal

    Hi,
    Can anyone tell us that Training & Event management and Appraisal are available standard ESS package?
    Thanks,
    Anumit

    Yes, Training & Event management and Appraisal are available in ITS based ESS business package.
    But latest ESS business package(webdynpro based) do not have training and event management. You may need to deploy Learning solution. Full functionality of Appraisal is available with ehp4 of ESS BP.

  • Is there a way to enter an event time in Calendar as a reminder for me and NOT have Calendar erase it in the info as it reads it into the event start and end times?

    Calendar can recognize and derive event start and end times from the text description entered.  However, when it seizes on a time (start and/or end) and automatically enters it as the start and/or end time, it also (sigh) deletes the time from the text.  I enter the times as reminders for me, how can one prevent them from being deleted by Calendar??

    I am having the same darn problem. I really dislike this auto feature in Calendar.
    Can anyone help us please?

  • HT2513 iCal string of events repeat and end on a given date?

    Is there a way to have any given string of events repeat and end on a given date?
    Example, I have a different training regiment for each day leading up to an event/date and then will have the same training regiment again leading up to another event. I want each day's training regiment to show up as an event per day... but don't want to have to post each days repeat string of training prior to each event... and they don't nessecarily repeat monlthy or regularly... I want to set an end date and all the training fill in from that date backwards. Is this possible??

    Does this work any better? New-jobtrigger requires a datetime object.
    $csv6=Import-Csv D:\Lzero\Coll_Schd\Dependent_List.csv
    foreach($cs in $csv6)
    {$sys=$cs.CI
    [datetime] $schd=$cs.RebootSchedule
    $user="Domain\username"
    $paswd=ConvertTo-SecureString -String "P@ssWord" -AsPlainText -Force
    $Credential=New-Object -TypeName System.Management.Automation.PSCredential -ArgumentList $user,$paswd
    Register-ScheduledJob -Name System_Restart -ScriptBlock {
    Restart-Computer -ComputerName $sys -Force -wait} -Trigger (New-JobTrigger -At $schd -Once) -ScheduledJobOption (New-ScheduledJobOption -RunElevated) -Credential $Credential

  • Allow Non-Administrator accounts to create event sources and write to event logs

    We are setting up BizTalk 2013 in Windows Server 2012 and one of the requirements is to allow the service account to create sources and write in event logs (Application) of the BizTalk servers. We have found what it seems to be a simple solution for this
    without giving service accounts local admin rights.
    Give Full control for the following registry keys to the service accounts or groups to allow creating of event sources and write to event logs:
    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\EventLog
    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\EventLog\Security
    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\EventLog\Application
    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\EventLog\Security
    Note: when changing permissions for EventLog key, the child keys will inherit the permissions by default except Security key which must be done manually.
    Initial tests using a .net test app seems to work as expected. New event sources are being created in the event logs and writing to the event logs after that works perfectly.
    The above method has been deployed in production and this is the most suitable solution for us.

    Hi Keong6806,
    Thanks a lot for posting and sharing here.
    Do you have any other questions regarding this topic? If not I would change the type as 'Discussion' then.
    Best Regards,
    Elaine
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact [email protected]

  • How to remove error from propagation and verify replication is ok?

    Have a one-way schema level streams setup and the target DB is 3-node RAC (named PDAMLPR1). I run a large insert at source DB (35million rows). After committing on source, I made a failure test on the target DB by shutting down the entire database. The streams seems stopped as the heartbeat table sequence (it inserts a row each min) on target is still reflecting last night. We get the error in the dba_propagation:
    ORA-02068: following severe error from PDAMLPR1
    ORA-01033: ORACLE initialization or shutdown in progress
    ORA-06512: at "SYS.DBMS_AQADM_SYS", line 1087
    ORA-06512: at "SYS.DBMS_AQADM_SYS", line 7639
    ORA-06512: at "SYS.DBMS_AQADM", line 631
    ORA-06512: at line 1
    08-FEB-10
    while capture, propagation, and apply are all in enabled status. I restarted capture and propagation at source DB. But still see the error message above. My questions are:
    1. How to delete the error from dba_propagation?
    2. How to verify the streams is still running fine?
    In normal test, during such large insert, the heartbeat table added a row in an hour. Very slow.
    thanks for advice.

    Well, if I can give you my point of view: I think that 35 millions LCR is totally unreasonnable. Did you really post a huge insert of 35 millions then committed that single utterly huge transaction? Don't be surprised it's going to work very very hard for a while!
    With a default setup, Oracle recommends to commit every 1000 LCR (row change).
    There are ways to tune Streams for large transaction but I have not done so personnaly. Look on Metalink, you will find information about that (mostly documents id 335516.1, 365648.1 and 730036.1).
    One more thing: you mentionned about a failure test. Your target database is RAC. Did you read about queue ownership? queue_to_queue propagation? You might have an issue related to that.
    How did you setup your environment? Did you give enough streams_pool_size? You can watch V$STREAMS_POOL_ADVICE to check what Oracle think is good for your workload.
    If you want to skip the transaction, you can remove the table rule or use the IGNORETRANSACTION apply parameter.
    Hope it helps
    Regards,

  • What are the options for integrating the event catalog and event landing pages in our website?

    We'd like to integrate the event catalog and event landing pages into our website but would prefer not to use the standard iframe embed code. Are there other solutions available, like an API or something else?
    Reason for this is that when we tried it with the iframe embed code the event catalog seems to load quite slow in a webpage on our website. Plus it seems we can't change the width and height of the event catalog with the CQ5 editor, or have the event catalog embed dynamically change in size depending on the amount of events in the catalog.

    Keeping everything in one scene is the better way to go.  Scenes are useful for animators who do not use navigation, they just make movies that play frame after frame without stopping.  But for anything that involves navigating the timeline you will have less headaches if you just avoid them and keep everything in the one main timeline.
    There are primarily two approaches to implementing pages in a timeline.  Either spread them out along the timeline and navigate from frame to frame to access them, or create them as movieclips (all in the same frame) and manage their visibility.  The latter approach makes it easier to maintain the status of a one page if navigating to another is necessary.  And you might find it useful to mix these two approaches at times.
    When you have everything on one timeline, you can have a layer dedicated to actionscript that you extend the full length of the timeline, which makes shareable code, such as variables and functions, available to anything along the timeline.  This avoids any need to have duplicate function definitions since you can have the same single function available to multiple pages in the site.  I usually use two actions layers... one for the shared stuff which has all code in frame 1 only, and another for frame specific code such as timeline commands and other action coding that needs to happen at particular frames.

  • First Try with JE BDB - Indexes and Inheritance troubles... (FIXED)

    Hi Mark,
    Mark wrote:
    Hi, I'm a newbie here trying some stuff on JE BDB. And now I'm having
    I am happy to help you with this, but I'll have to ask you to re-post this question to the BDB JE forum, which is...
    Sorry for the mistake. I know now that here is the place to post my doubts.
    I'm really interested in JE BDB product. I think it is fantastic!
    Regarding my first post about "Indexes and Inheritance" on JE BDB, I found out the fix for that and actually, it wasn't about "Indexes and Inheritance" but "*Inheritance and Sequence*" because I have my "@Persistent public abstract class AbstractEntity" with a "@PrimaryKey(sequence = "ID_SEQ") private Long id" property.
    This class is extended by all my business classes (@Entity Employee and @Entity Department) so that my business classes have their PrimaryKey autoincremented by the sequence.
    But, all my business classes have the same Sequence Name: "ID_SEQ" then, when I start running my JE BDB at first time, I start saving 3 new Department objects and the sequence for these department objects star with "#1" and finishes with #3.
    Then I continue saving Employee objects (here was the problem) I thought that my next Sequence number could be #4 but actually it was #101 so when I tried to save my very first Employee, I set the property "managerId=null" since this employee is the Manager, then, when I tried to save my second Employee who is working under the first one (the manager employee), I got the following exception message:
    TryingJEBDBApp DatabaseExcaption: com.sleepycat.je.ForeignConstraintException: (JE 4.0.71) Secondary persist#EntityStoreName#com.dmp.gamblit.persistence.BDB.store.eployee.Employee#*managerId*
    foreign key not allowed: it is not present in the foreign database
    persist#EntityStoreName#com.dmp.gamblit.persistence.BDB.store.eployee.Employee
    The solution:
    I fixed it modifying the managerId value from "4" to "101" and it works now!
    At this moment I'm trying to understand the Sequence mechanism and refining concerns about Cursors manipulation...
    Have you any good material about these topics, perhaps a link where I can find more detailed information on these?
    Thanks in advance Mark, thanks for your attention on this and I will post more doubts in the future for sure ;0)
    Regards,
    Diego

    Hi Diego,
    I fixed it modifying the managerId value from "4" to "101" and it works now!I'm glad you found the problem. It is usually best to get the assigned ID from the entity object after you call put(), and then use that value to fill in related fields in other entities. The primary key field (assigned from the sequence) is set by the put() method.
    At this moment I'm trying to understand the Sequence mechanism and refining concerns about Cursors manipulation...Have you any good material about these topics, perhaps a link where I can find more detailed information on these? >
    To find documentation, start at the first message in the forum, the Welcome message:
    http://forums.oracle.com/forums/ann.jspa?annID=250
    This refers to the main JE doc page, the JE FAQ and a white paper on DPL queries. The FAQ has a section on the DPL, which refers to the javadoc. The DPL javadoc has lots of info on using cursors along with indexes (see EntityIndex, PrimaryIndex, SecondaryIndex). The white paper will be useful to you if you're accustomed to using SQL.
    I don't know of any doc on sequences other than the javadoc:
    http://www.oracle.com/technology/documentation/berkeley-db/je/java/com/sleepycat/persist/model/PrimaryKey.html#sequence()
    This doc will point you to info on configuring the sequence, if that's what you're interested in.
    --mark                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • +, - button and inherited tick box is in disabled mode for account assignme

    In the attribute tab of org structure (PPOMA_BBP), we are not getting +, - button and inherited tick box is in disabled mode for account assignment category (attribute is KNT).
    We want to enter two values for the account assignment category with inherited tick box (ticked).
    Please suggest me how to get the +, - and inherited tick box (ticked) for the account assignment.
    Regards.

    Hi Imam,
    Unde attributes
    You will find one Application Toolbar...
    Overview, Select Attribute, Check Entries,Insert line,Delete line..
    So under All values you will find AcctAssigCat, Exculded, Default, Inheried
    Select the row and click on Insert Line, now you should be able to insert the new acct Assignment category
    rg
    sam

Maybe you are looking for

  • MACPRO and IMAC G5 as second monitor

    I would like to connect my old IMAC G5 to my MACPRO 2009. Please, any ideas ? Is it possible ?

  • To reference three different tables automatically

    I have three tables with different structure. but each of these three tables have one field in common, which is idx. I have a final table in which i have data from all these tables (final). Emp Sal INcome final idx source 1 Emp 1 sal 2 income 2 emp 3

  • Actions are now prompting for "OK" at every step

    My Actions are now prompting for "OK" at every step along the way. Which means I have to press OK 4-5 times for each action. Whereas before it was just a one click process. I have reinstalled Photoshop and it is still happening. I am on PS 7 and on W

  • Install Problems, need assistence ASAP

    Eveyr time i try to install iTunes the same thing happens: it gets to the iTunes+Quicktime load bar and gets up to 4 bars and then freezes. Wha's wrong?

  • Switch off after 20%

    Hi , For the last two days, i m facing this issue,  my iphone4S switch off after battery level goes just below 20%. I need to charge it again to switch ON the mobile. I have upgraded to iOS 6.1.2 two weeks back. Can anyone please help me, your help w