Catch Global Events

Hi,
i have a idea for a program. I want to catch all actions from the users. If the user performed this action with the mouse, i wanna show him a notification with the shortcut of this actions. For example: The user open with the mouse a new tab in Safari the program recognize this and show him a message "Hey you can do this with: Apple + T".
I played around with the
Code: 
addGlobalMonitorForEventsMatchingMask:NSLeftMouseDownMask
but i can't find a connection to the Event that has been performed. Is there anybody with a idea how i can do this with build in classes from Cocoa/Objective-c?  Thank in advance for your help Greetings from Germany  Tobi

Investigate Display.addFilter().
"John Daly" <[email protected]> wrote in message
news:c2800n$fdg$[email protected]..
> How can I catch Global events in SWT. I want to carry out certain
> functionality when the user pressed a certain button on the keyboard.
>

Similar Messages

  • How to catch global transaction timeout event

    Hi all,
    I need to find a way to catch global transaction timeout events. By default, there are only two transaction related events can be caught:
    .SysTransactionHeuristicAbort
    .SysTransactionHeuristicCommit
    Is there a way to add transaction timeout to the list. Thanks in advance.

    Note: This thread was originally posted in the [Java Programming|http://forums.sun.com/forum.jspa?forumID=31] forum, but moved to this forum for closer topic alignment.

  • Catch standard eventing

    Hi experts:
    As you can see in this document:
    /people/thomas.jung3/blog/2005/12/15/portal-eventing-a-solution-for-global-peace-and-harmony
    We can trigger and catch portal events if we send the event from one ABAP WD to another one.
    I want to create a WD Page in the portal composed by standard WD and non Standard ones. So, my question is the next one: Is it posible to catch from a non standard ABAP WD an even triggered by clicking, for example, in a standard one?.
    Thank you all ¡¡!!

    Hi Thomas:
    Thank you for your answer ¡¡!!.
    Now the next question is "How can I Know the standard JAVA WD event iD, and the parameter that this triggered event "published" and that I need to import to my ABAP WD?".
    So, in my WD ABAP, I Just have to use the tipical code:
    DATA LO_API_COMPONENT  TYPE REF TO IF_WD_COMPONENT.
    DATA LO_PORTAL_MANAGER TYPE REF TO IF_WD_PORTAL_INTEGRATION.
    LO_API_COMPONENT = WD_COMP_CONTROLLER->WD_GET_API( ).
    LO_PORTAL_MANAGER = LO_API_COMPONENT->GET_PORTAL_MANAGER( ).
    DATA LO_API_CONTROLLER  TYPE REF TO IF_WD_VIEW_CONTROLLER.
    LO_API_CONTROLLER ?= WD_THIS->WD_GET_API( ).
    CALL METHOD lo_portal_manager->SUBSCRIBE_EVENT
      EXPORTING
        PORTAL_EVENT_NAMESPACE = STANDARD_JAVA_WD_NAMESPACE
        PORTAL_EVENT_NAME      = STANDARD_JAVA_WD_EVENT_ID
        VIEW                   = LO_API_CONTROLLER
        ACTION                 = 'RECEIVE_PORTAL_EVENT'
    Thank you in advance

  • Global event handler for preinitialize

    Is there anyway to add a global event handler on the
    components preinitialize event?
    What I need to do is to be able to enable / disable, and show
    / hide component dynamically based on a access list. My plan was to
    have a global event handler that listens to the preinitialize
    event, at that time, checks if the user has access to the component
    or not. If not, I'll disable / hide the component.
    What I did so far is:
    in my main app.mxml file, I have:
    <mx:Application xmlns:mx="
    http://www.adobe.com/2006/mxml"
    preinitialize="preinit(event)"
    so the preinit() function is invoked on the app's
    preinitialize event.
    Then I have the preinit() function (see attached code below).
    However, it does work as there is no trace message printed.
    I changed to use KeyBoardEvent.KEY_DOWN and that seems
    working when I press any key.
    I also tried to use the app.stage.addEventListener() but the
    stage object is null in the preinitialize event.
    Thanks in advance for your help.

    Thank you for follow up on my question.
    I do know these two properties. But that does not solve the
    problem. Let me explain it with an example.
    That's say, when the user logs in, I loads the access list.
    Then the app displays a panel with some form entries. If I am able
    to register a global event listener for the component
    initialization events, I can check the permission and optionally
    hide some components. Otherwise, I would need to programmatically
    travels my component tree to evaluate each component individually
    to set there visible/includeInLayout properties, which is error
    prone.
    The problem is that the component is visible to one user but
    would be hidden to another, so it can not be set at the design
    time.
    The approach I am using right now is to extend the default
    components to add an event listener. But I'd like to know if it is
    possible to register a global event listener to be notified when
    any component is created. As my first post says, I tried to use the
    systemManager and listen to the PREINITIALIZE event, but that
    didn't get always get invoked.

  • How to catch click event on BAR or a BAR GRAPH???

    Hello
    I want to implemnt following things,
    1. there is Bar Graph containing 10 Bars.
    2. So i want to navigate to 10 diff. pages on click of each bar.
    So how to catch click event on BAR or a BAR GRAPH.????

    Hi,
    You can set Destination URI on a graph. The URL can be specifically associated to a particular data point plotted in the graph.
    Detail for the same is provided in OAF developer guide under 'Charts and Graphs' topic.
    --Sushant                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Catching key events in application

    I have a JFrame with a JDesktop containing lots of JInternalFrame with various of components such as JTextFields etc.
    Now, i want to have a "main" listener that will catch key events no matter which component that has focus. For example pressing CTRL+A should produce something in the application no matter which component that has focus.
    How do I implement this in an easy way?

    It doesnt seem to work to add a KeyListener to the JFrame...
    this.addKeyListener(new KeyAdapter(){
                   public void keyTyped(KeyEvent e){
                        System.out.println("KeyTyped()");
                   public void keyPressed(KeyEvent e){
                        System.out.println("KeyTyped()");
              });Adding that to the JFrame gives nothing to System.out when a JTextArea inside an JInternalFrame has focus.

  • How to catch the event for change dropdown value in alv

    it has a column output by dropdown in alv. the dropdown type cl_salv_wd_uie_dropdown_by_idx.
    now the problem is if change the dropdown value, i want to catch the event to change another column value.
    how can i do it?

    This part contains other ALV initialization code
    *... init ColumnSettings
      DATA:
            lr_column_settings TYPE REF TO if_salv_wd_column_settings.
      lr_column_settings ?= wd_this->r_table.
      DATA:
            lt_columns TYPE salv_wd_t_column_ref.
      lt_columns = lr_column_settings->get_columns( ).
      DATA:
            ls_column     TYPE salv_wd_s_column_ref,
            lr_col_header TYPE REF TO cl_salv_wd_column_header,
            l_tooltip     TYPE string.
      LOOP AT lt_columns INTO ls_column.
        CASE ls_column-id.
          WHEN 'PLANETYPE'.
            DATA:
                  lr_drdn_by_key TYPE REF TO cl_salv_wd_uie_dropdown_by_key.
            CREATE OBJECT lr_drdn_by_key
              EXPORTING
                selected_key_fieldname = ls_column-id.
            lr_drdn_by_key->set_key_visible( abap_true ).
            ls_column-r_column->set_cell_editor( lr_drdn_by_key ).
          WHEN OTHERS.
        ENDCASE.
    ENDLOOP.
      DATA:
            node_info TYPE REF TO if_wd_context_node_info,
            lt_valueset   TYPE STANDARD TABLE OF wdr_context_attr_value,
            l_value       TYPE wdr_context_attr_value.
      node_info = wd_context->get_node_info( ).
      node_info = node_info->get_child_node( 'FLIGHT_INFO' ).
    data : lt_sflight type STANDARD TABLE OF sflight,
           ls_sflight like LINE OF lt_sflight.
    SELECT * from sflight into TABLE lt_sflight.
    LOOP at lt_sflight into ls_sflight.
      l_value-value = ls_sflight-planetype.
      l_value-text  = ls_sflight-planetype.
      INSERT l_value into TABLE lt_valueset.
      ENDLOOP.
      node_info->set_attribute_value_set(
      name = 'PLANETYPE'
      value_set = lt_valueset ).

  • Global Event Listeners for all Views in a ViewNavigatorApplication

    Hello,
    As the subject states, I have a ViewNavigatorApplication and I am trying to set up a "global" event listener for all views. Which I am able to do, however I am having problems...
    In my first view, I assign this listener:
    NativeApplication.nativeApplication.addEventListener(KeyboardEvent.KEY_DOWN, handleKeys);
    And I also have this function:
    public function handleKeys(event:KeyboardEvent):void {
         if (event.keyCode == Keyboard.MENU) {
                        trace("menu pressed");
                        navigator.pushView(MainMenuView);
    This works fine from the first view. But when I switch views, I get an exception on pushView (navigator is null). I think I understand why, so what is the best practice for something like this? How can I get access to the spark component navigator from that function when called from a different view? Or is there a better way to go about this?
    Thank you!

    Try putting the code in the main mxml:
    <?xml version="1.0" encoding="utf-8"?>
    <s:ViewNavigatorApplication xmlns:fx="http://ns.adobe.com/mxml/2009"
        xmlns:s="library://ns.adobe.com/flex/spark"
        xmlns:mx="library://ns.adobe.com/flex/mx"
        firstView="home"
        applicationComplete="init()" >
        <fx:Script>
            <![CDATA[
                private function init():void {
                    this.addEventListener(KeyboardEvent.KEY_DOWN, handleKeys);
                private function handleKeys(event:KeyboardEvent):void {

  • Where can we catch the event which leads to downloading a report to a local

    Hi frnds,
    can u help me out . actaully ,i  have a classical interactive report. it has many headings.Because of the initial headings ,if i try to download that report to a local file ,the column allignments are disturbed.
    So,one way i feel to get the download correctly ,is that ,some how i can catch the event whcih leads to the download of the report ,and based on the occurence of that event ,i can restrict the page headings to appear in the downloaded spreadsheet ,so that the there are no, unwanted columns getting inserted in between .
    Regards
    Rajesh.

    hi,
    you can have selection screen field : "parameters : p_disvar like disvariant-variant."  and at event selection scree you can call the below function and select the variant create for the report.
    "at selection-screen on value-request for p_disvar.
      call function 'REUSE_ALV_VARIANT_F4'
           exporting
                is_variant          = g_variant
              I_TABNAME_HEADER    =
              I_TABNAME_ITEM      =
              IT_DEFAULT_FIELDCAT =
                i_save              = g_variant_save
           importing
                e_exit              = h_exit
                es_variant          = gx_variant
            exceptions
                not_found           = 1
                program_error       = 2
                others              = 3.
      if sy-subrc is initial and h_exit is initial.
        g_variant-variant = gx_variant-variant.
        p_disvar          = gx_variant-variant.
      else.
        message id sy-msgid type 'S'
                     number sy-msgno
                     with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      endif.
    Atul

  • Catching Custom Events in Actionscript

    I have a custom component that opens a new window with a video player in it. I need to pass a bunch of stuff into it, so there's a lot of binding expressions. I need to be able to catch it's complete event (when the video is finished playing). But the event I dispatch isn't working. Here's my custom component class:
    [CODE]
    <?xml version="1.0" encoding="utf-8"?>
    <!-- This is a window component which creates a transparent window with no system chrome (no bars, close, min, max buttons, resize stuff) that contains a single video object to be able to play videos from a folder called "videos" in the root of this application. This screen is spawned from the main MXML WindowedApplication using AS 3. -->
    <s:Window xmlns:fx="http://ns.adobe.com/mxml/2009"
                        xmlns:s="library://ns.adobe.com/flex/spark"
                        xmlns:mx="library://ns.adobe.com/flex/mx"
                        xmlns:customComponents="customComponents.*"
                        systemChrome="none" visible="true" transparent="true" showStatusBar="false" width="400" height="300"
                        >
        <fx:Metadata>
            [Event(name="MOVIE_LOAD", type="flash.events.Event")]
            [Event(name="MOVIE_FINISH", type="flash.events.Event")]
        </fx:Metadata>
        <fx:Declarations>
            <!-- Place non-visual elements (e.g., services, value objects) here -->
        </fx:Declarations>
        <s:layout>
            <s:BasicLayout />
        </s:layout>
        <fx:Script>
            <![CDATA[
                import org.osmf.events.TimeEvent;
                [Bindable]
                public var displayScreenWidth:int = 1024;
                [Bindable]
                public var displayScreenHeight:int = 768;
                [Bindable]
                public var videoName:String;
                // Note that the following two variables are set to true by default because the screen saver goes in first.
                [Bindable]
                public var muteVideo:Boolean=true;
                [Bindable]
                public var loopVideo:Boolean=true;
                // In order to allow it to play, I had to extend the play method for the VideoDisplay to a public function.
                public function play():void
                    videoDisplay.play();
                protected function dispatchMovieLoad(event:Event):void
                    var eventObj:Event = new Event("MOVIE_LOAD");
                    dispatchEvent(eventObj);
                protected function dispatchMovieFinish(event:TimeEvent):void
                    var eventObj:Event = new Event("MOVIE_FINISH");
                    dispatchEvent(eventObj);
            ]]>
        </fx:Script>
        <s:VideoDisplay id="videoDisplay" x="0" y="0" width="{displayScreenWidth}" height="{displayScreenHeight}" source="videos/{videoName}"
                                        autoPlay="true" muted="{muteVideo}" loop="{loopVideo}" complete="dispatchMovieFinish(event)" />
    </s:Window>
    [/CODE]
    When I try to catch the event, I use this code:
    [CODE]
    /* Plays a video, and enables sound and disables looping. It also defines what do to when the video reaches completion. */
    protected function playVideo(vidName:String):void
        videoScreen.addEventListener(Event.MOVIE_FINISH, loadScreenSaver);
        videoScreen.muteVideo = false;
        videoScreen.loopVideo = false;
        videoScreen.videoName = vidName;
        videoScreen.play();
    [/CODE]
    The problem is, i get the error by the addEventListener line that reads:
    Multiple markers at this line:
    -1119: Access of possibly undefined property MOVIE_FINISH through a reference with static type Class.
    -addEventListener
    I don't know how to get around this. When I type "addEventListener(" and hit control+space bar, I see "Event.MOVIE_FINISH" on the list, citing my custom component as the source. Even when I had it called movieFinish in the component, I still saw "MOVIE_FINISH" for my event in the code help. So, I changed the name, but I cannot get rid of the error, and therefore my program won't compile fully. Any ideas?

    The first argument to addEventListener() is just a string.  You can do:
        videoScreen.addEventListener("MOVIE_FINISH", loadScreenSaver);

  • Global Events

    Hi There,
    I just wanted to clear something up in my mind about Forte Global Events.
    By a Forte Global Event I mean an event that is posted in a method of an
    EVSO.
    Presumably there is no internal application logic to such a posting, as to
    what machines it is destined to go to, ie, it is a straight Network
    Broadcast (255.255.255.255)
    1.
    If this is the case, and your phsyical network consists of a number of
    sub-nets, it could potentially be broadcast to all devices on all sub-nets,
    assuming that your router didn't prevent this.
    In order to prevent such broadcasts, presumably, the router would disable
    all broadcasts destined to logical port X, which would be the port that Forte
    communicates via, to all clients and servers.
    Would this port X, be defined as the same port number that is used by the
    NameService (?)
    2.
    If the above is true then presumably it would be considered better to
    some application logic to direct the posting of a global event only to active
    clients, ie, pass to a server cache, anchored objects from the Client, and loop through
    these active clients posting an event to each.
    - Carl

    Event propagation is a favorite subject of mine.
    So I'll join in this discussion.
    My view is Forte Events is one of the coolest features of the
    system. It is something you usually have to pay a lot
    for elsewhere. But hidden in the details of Event propagation
    and reception are deep issues where different vendors and
    different implementation techiques can have enormously big
    impacts on scalability. It turns something that seems rather
    simple and benign (posting Events) into a big differentiating factor.
    What Forte calls Events is called Publish/Subscribe elsewhere.
    I divide Publish/Subscribe into two subclasses: Anonymous and Registered.
    Anonymous Publish/Subscribe is where the publisher never knows
    who is subscribed at any particular moment. The publisher
    publishes blindly, as it were. Examples are Ethernet Multicast,
    Radio, TV, Satellite Downlink, etc. Maybe no one is listening,
    maybe the whole world. It doesn't matter to the publisher.
    Registered Publish/Subscribe is where the publisher does keep
    a list of subcribers and sends an individual message to each.
    Examples are various forms of push technology, magazine and
    periodical publishers, and Forte's event model.
    Yes, Forte implements in its event model a form of Registered
    Publish/Subscribe. They hide the details of the registration
    and deregistration process from the programmer using their
    "Post..." and "Event Loop ... When <event> " language
    constructs and their sophisticated runtime system.
    But everything about the registration is still there under
    the covers. Forte is keeping a list of listeners and sending a
    message to each one.
    So what is the difference between Anonymous and Registered
    publish/subscribe from a performance standpoint? From the
    subscriber's vantage point, not much. You see the same message
    regardless. From the network's point of view (and the publisher's)
    there are big differences, especially if you are running over shared
    media (such as ethernet).
    With Registered Publish/Subscribe the network sees N copies
    of the same message being sent, one to each registered listener.
    For a large number of listeners this traffic can be
    overwhelming and can choke your network.
    From the publishers point of view, there is the enormous cost of creating and sending individual messages to each subscriber.
    You could, if you were really clever about this, decide to
    compute the message (serializing the object graphs and
    all that) just once and then sending the message N times.
    But I don't think Forte runtime is this clever. Nothing
    prevents them from doing this in the future. In fact I
    suspect this is one of the reasons Forte's designers hide
    the fact of the registration process so well that you cannot
    gain access to the list of registered listeners. This will allow
    them in the future to tranparently swap out the costly
    one-message per listener messaging
    model and swap in a more efficient model based on true
    Anonymous Publish/Subscribe without a change to the language.
    Why is Anonymous Publish/Subscribe more efficient? Because
    it uses just a single message broadcast to all destinations.
    Much easier on the publisher (server) and the network.
    Harder on the subscriber (client) since it receives all the
    messages and must filter out the ones it is not interested in.
    To solve the "all clients see everything" problem, you can
    switch to multicast and provide a way to manage the mapping of
    events into different multicast groups. TIBCO and other pub/sub
    messaging vendors do this quite well on Ethernet to avoid flooding
    every workstation with the entire multicast traffic. I'm not
    trying to plug TIBCO here (they are a subsidiary of Reuters,
    the company I work for). Just using them as an example of
    how this can be done differently.
    Footnote: of course, in order to construct the "event" message
    just once and send it N times you have to implement a policy such
    as "receiver makes right" or always sending "network byte order".
    By definition you only generate one message. So it has to be
    readable by clients of any byte order or machine architecture.
    As Carl points out below, there are good reasons for using
    a Registered Publish/Subscribe Model. This occcurs where you
    want to perform something special for each client, such as to
    send a different message or to not send (filter) the message at all.
    These types of decision have to be made on a listener-by-listener
    basis.
    Fred Scholldorf
    [email protected]
    516 434 6230
    Thanks to Dale V. Georg and David Bell for their quick reponses.
    It appears that my assumptions were completely incorrect and that
    when an object registers an event on another object in a remote
    partition that Forte keeps track of this and when that event is posted,
    Forte directs it to only those references.
    With this in mind then, I presume that I am correct in assuming that,
    1.
    Global events are not as network traffic intensive, as I was lead to believe,
    ie, you can actually use them, if the need arises.>
    2.
    it would mean that if you were to want to broadcast a global event
    it would probably be more efficient to let Forte do the posting, and
    not try yourself to build up a list of references to active client partitions
    and post individually to them one at a time. The only time you would want
    to really do this would be if you were to broadcast to a subset of
    the active cilents, using a single event.
    Thanks,
    - Carl------------------------------------------------------------------------
    Any views expressed in this message are those of the individual sender,
    except where the sender specifically states them to be the views of
    Reuters Ltd.

  • AWTEventListener: Catch all events after events are invoked

    Hi,
    i read here about catching all event of my application: http://developer.java.sun.com/developer/qow/archive/19/index.html
    But: Is there a way to invoke my eventDispatched method after the
    current event was calling?
    For example: I need on selecting a Combobox the selected value, not the last
    selection.
    Thanks.
    Regards.

    Thanks for reply!
    I use an ItemListener on my ComboBox, but my problem was that the eventDispatched method was not
    called. I did it like this:
            getToolkit().addAWTEventListener(
             new AWTEventListener() {
                 public void eventDispatched(AWTEvent e) {
                  System.out.println(e);
             AWTEvent.ITEM_EVENT_MASK
            );Is that a problem of JDK1.4.1 ???
    So tried it with a AWTEvent.MOUSE_EVENT_MASK to check a combobox in my application
    is clicked. It works, but i get always the last selection von the combobox.
    74philip: Thanks for your solution, but my "code for the selected event here..."
    should be in the eventDispatched method. I cant change my app for any comboboxes.

  • Interprocess communication with global events and handlers - how?

    Hello. I have a special problem.
    Imagine we have an application running, without using a sap gui.
    This application consists of three objects, interacting with each other.
    The are based on z-classes.
    Now this application runs and runs and runs.
    Suddenly an external device decides to call a rfc-enabled function module.
    As we all know, the external device , which calls the remote enabled function module will open another session for that.
    And the running app is also in another session.
    How could I inform this three running objects, that the rfc module was called???
    Did anyone already encouter this problem and found a solution?
    Global events or whatever???
    Would be very nice,.
    Thanks,

    Hello,
    I did not faced this kind of problem but can suggest to tackle the scenario....
    I would suggest to create a comon function group which call that RFC and other function moudle for status update.
    Use an global data in function group and pass some info when RFC is getting called,,,
    the status FM will only fetch data preiodacily and has to be called from classes...
    I thiknk you would have solution in this way.
    Thanks

  • How to catch click event on a link from an applet

    how to catch click event on a link from an applet

    The applet has to call a mouse listener:
    public class Applet extends Applet
                   implements MouseListener, MouseMotionListener
    The mouse methods must be included, here is the one to catch a click
    public void mouseClicked(MouseEvent e)

  • How to catch an event when the user change values in the project information dialog

    hi,
    i would like to know how to catch an event in my C# code when the user change values in the project information dialog?
    taskChange doesn't catch these changes.
    thanks.
    Thanks, Sharon.

    You need to write save button event handler for project information dialog. Link is having same functionality described. 
    http://blogs.msdn.com/b/husainzgh/archive/2011/08/01/hooking-into-the-project-detail-page-ribbon-save-button-without-overriding-out-of-box-functionality-in-project-web-access-for-project-server-2010.aspx
    http://www.projectserver2010blog.com/2010/01/sharepoint-2010-webpart-client-server.html
    kirtesh

Maybe you are looking for

  • Link between delivery and handling unit split items

    Hi All,   I have an delivery wit 4 different line items. While creating the Packing we created the Handling units for the delivery. In Handling unit one line item is split into 2 boxes. like   handling unit     gross weight             1             

  • I cannot access my app store after upgrading to Mac Os10.8.2

    I have problem accessing to the software update or the app store. This all happen after i upgrade to MAc OS 10.8.2 and certain software upate. Now i cant access the app store. Everytime i click on it, it just bounce for a few second then stop. Anothe

  • PR status incorrect for POs craeted via PUR_ORDER_CREATE_VIA_SD_EVNT functi

    We use the ALE process to create Purchase Orders automaticaly from Sales orders. The standard function module assigned to the Business Object BUS2032 in SWETYPV for ALECREATE is PUR_ORDER_CREATE_VIA_SD_EVNT SAP creates a PR and then converts it into

  • Print Speeds Acrobat 9

    Anyone out there seeing some truly horrible print speeds on Acrobat 9 with OS X 10.6.3? Here is the situation: PDF 163mb in size - 196 pages Go to print, choose multiple pages, choose 6 pages per sheet Change page size to tabloid go to print PIZZA (C

  • Set data to dataTable

    Hello, Right now I have a matrix of Strings in the SessionBean and want to set that data to a dataTable in a jsp page. I know I must set it in value="data" but what format should the data have? Is it Ok to set a matrix? In that case, why isn't it sho