How do nested Events work??

Could anyone Explain in Detail how Nested Events Work????
Thanx in advance!!

http://docs.iplanet.com/docs/manuals/uds/50/toolref.pdf
Page 159
You should read the document but there is a snippet from the doc:
Nesting event statements You can nest an event statement in your statement
block either by using another event statement or by invoking a method that
contains an event statement.
A typical example is when you want to open a new window and the Display
method for the window contains an event loop. Another example is using the
start task statement to start a new task and then use the event statement to wait
for the return or exception events.
Code Example 3-13 Nesting event statements
event loop
when <quit_button>.Click do
exit;
when <start_task>.Click do
tsk_desc : TaskDesc;
tsk_desc = start task o.meth() where completion =
event;
event loop
when o.meth_return(x = return) do
when o.meth_exception(e = exception, f = errs);
when <cancel_button>.Click do
tsk_desc.SetCancel();
end event;
when <cancel_button>.Click do
exit;
end event;
If more than one event statement is registered for the same event, the event
statement that is currently executing when the event reaches the top of the queue is
the one that handles the event. Once the event has been handled, it is removed
from the queue. Therefore, an event is never handled more than once.
ka

Similar Messages

  • In ALV reports how double click event works?

    in ALV reports how double click event works? Explain in detail.....

    hi,
    last lines is used for clicking
    *& Report  Z_SWAS_FUNCTIONAL
    report  z_swas_functional.
    tables: qmel,viqmel,iloa,afko.
    -- global data declerations--
    data: ok_code like sy-ucomm,
          gt_itab type table of zfunctional,
          t_output type table of zfunctional,
          g_container type scrfname value 'CUSTOM_CONTROL',
          grid1  type ref to cl_gui_alv_grid,
          g_custom_container type ref to cl_gui_custom_container,
          e_row type lvc_s_row,
          e_column type lvc_s_col,
          es_row_no type lvc_s_roid.
    *CLASS DECLARATION
    class z_functional definition.
    public section.
    class-methods : handle_double_click
                    for event double_click of cl_gui_alv_grid
                         importing e_row  e_column.
    endclass.
    *CLASS IMPLEMENTATION
    class z_functional implementation.
    method handle_double_click.
           perform handle_double_click using e_row e_column es_row_no.
    endmethod.
    endclass.
    *CODE FOR SELECTION SCREEN
    selection-screen begin of block 84433  with frame title text-t01.
    parameters : n_number like viqmel-qmnum,
                    n_type like qmel-qmart,
                    f_loca like iloa-tplnr,
                    name like qmel-qmnam.
    selection-screen end of block 84433.
                        screen validation event                          *
    at selection-screen on n_number.
      select single *
        from viqmel
          where qmnum eq n_number.
    if sy-subrc ne 0.
      MESSAGE 'NOTIFICATION NUMBER DOESNOT EXIST' TYPE 'E'.
    endif.
    select qmart from qmel into qmel where qmart eq N_TYPE.
    endselect.
    if sy-subrc ne 0.
      MESSAGE 'NOTIFICATION TYPE DOES NOT EXIST' TYPE 'E'.
    endif.
    *START OF SELECTION EVENT
    start-of-selection.
        perform fetchdata.
    end-of-selection.
    *Call screen event
    call screen 100.
    *PERFORM DISPLAY.
    *&      Form  FETCHDATA
          text
    -->  p1        text
    <--  p2        text
    form fetchdata .
    *SELECT VIQMEL~QMNUM VIQMEL~QMTXT VIQMEL~QMDAT VIQMEL~LTRMN VIQMEL~PRIOK
          VIQMELBEZDT VIQMELAUFNR VIQMELTPLNR AFKOGLTRP into corresponding fields of table GT_ITAB
             FROM VIQMEL INNER JOIN AFKO ON VIQMELAUFNR = AFKOAUFNR
                   WHERE VIQMELQMNUM IN N_NUMBER and VIQMELQMART IN N_TYPE AND VIQMEL~QMNAM IN NAME.
    call function 'ZSWAS_TEST'
      exporting
        qmnum         = n_number
       qmart         = n_type
       tplnr         = f_loca
       qmnam         = name
      tables
        output        = gt_itab
    if sy-subrc ne 0.
       message e000(z84433_msg_class).
    endif.
    endform.                    " FETCHDATA
    *&      Module  STATUS_0100  OUTPUT
          text
    module status_0100 output.
      set pf-status 'MAIN'.
    SET TITLEBAR 'xxx'.
    *creating custom container and grid instance
    if g_custom_container is initial.
        create object g_custom_container
               exporting container_name = g_container.
        create object grid1
               exporting i_parent = g_custom_container.
        call method grid1->set_table_for_first_display
          exporting
            i_structure_name = 'ZFUNCTIONAL'
          changing
            it_outtab        = gt_itab.
    *set handler events
        set handler z_functional=>handle_double_click for grid1.
      endif.
    endmodule.                 " STATUS_0100  OUTPUT
    *&      Module  USER_COMMAND_0100  INPUT
          text
    module user_command_0100 input.
    case ok_code.
       when 'EXIT'.
        perform exit_program.
    endcase.
      clear ok_code.
    endmodule.                 " USER_COMMAND_0100  INPUT
    *&      Form  EXIT_PROGRAM
          text
    -->  p1        text
    <--  p2        text
    form exit_program .
    leave program.
    endform.                    " EXIT_PROGRAM
    *&      Form  handle_double_click
          text
         -->P_E_ROW  text
         -->P_E_COLUMN  text
         -->P_ES_ROW_NO  text
    form handle_double_click  using   e_row type lvc_s_row
                                      e_column type lvc_s_col
                                      es_row_no type lvc_s_roid.
    data: t_output type  zfunctional.
        read table gt_itab into t_output index e_row-index .
      if sy-subrc = 0 and e_column-fieldname eq 'QMNUM'.
        set parameter id 'K01' field t_output-qmnum.
        call transaction 'ZSMART' and skip first screen .
      endif.
    endform.                    " handle_double_click
    regards,
    swaroop.

  • So how do nested roles work?

    I'm trying to define an admin role that can be assigned to certain users in my directory, while enabling me to define a separate password policy for just this set of users.
    What I want to do is this:
    - create a managed admin role in a specific area of my directory (e.g. ou=roles, o=suffix)
    - add users to this role (they sit in ou=users,o=suffix)
    Now, I'm aware the roles only have scope over the subtree where they are created, so I've created a nested role at the root level (o=suffix) and added the managed admin role (cn=admin role,ou=roles,o=suffix).
    As far as I'm concerned this should give my admin role scope over the whole o=suffix tree?
    Unfortunately when I try to open up access using an ACI it doesn't seem to work. The only way I can get it to work is if I create the managed role at the suffix level (i.e. cn=admin role, o=suffix) and reference that role in the ACI.
    What am I missing here?

    http://docs.iplanet.com/docs/manuals/uds/50/toolref.pdf
    Page 159
    You should read the document but there is a snippet from the doc:
    Nesting event statements You can nest an event statement in your statement
    block either by using another event statement or by invoking a method that
    contains an event statement.
    A typical example is when you want to open a new window and the Display
    method for the window contains an event loop. Another example is using the
    start task statement to start a new task and then use the event statement to wait
    for the return or exception events.
    Code Example 3-13 Nesting event statements
    event loop
    when <quit_button>.Click do
    exit;
    when <start_task>.Click do
    tsk_desc : TaskDesc;
    tsk_desc = start task o.meth() where completion =
    event;
    event loop
    when o.meth_return(x = return) do
    when o.meth_exception(e = exception, f = errs);
    when <cancel_button>.Click do
    tsk_desc.SetCancel();
    end event;
    when <cancel_button>.Click do
    exit;
    end event;
    If more than one event statement is registered for the same event, the event
    statement that is currently executing when the event reaches the top of the queue is
    the one that handles the event. Once the event has been handled, it is removed
    from the queue. Therefore, an event is never handled more than once.
    ka

  • How does the event structure work & ...

    How does the event structure work & and how to modify the case example if you want to change the name of the case? I haven't a look at the manual but nothing about event structure is mentioned.

    I know how it works.. =P

  • How can two users work on iMovie?  My husband is working on a memorial video for a family member who passed, I plan to edit but he had to take his computer to work.  I have the iMovie project on a zip drive.  How do I get it to open in my imovie?

    How can two users work on iMovie?  My husband is working on a memorial video for a family member who passed, I plan to edit but he had to take his computer to work.  I have the iMovie project on a zip drive.  How do I get it to open in my imovie? 

    You will need an external drive that is formatted as MAC OS EXTENDED (journaled).
    Move the Project, Events, and any photos and music to the external drive by following the instructions in this post.
    https://discussions.apple.com/docs/DOC-4141
    Be sure to use CONSOLIDATE MEDIA to get the photos and music. Then plug this drive into your computer and you will be able to edit.

  • How to Disable Event firing while updating a list item using poweshell

    Hi All,
    I am working on a powershell code which updates most of the list items in the entire web application. I am using SystemUpdate($false) to update the items so that 'modified' and 'modified By' and versions are not changed.
    However event receivers gets fired which is now a problem. I want to disable the Event receivers before update and enable it after update. I want powershell code for this. I am using SharePoint 2010.
    Your help would be much appreciated. Thank you in anticipation.
    Regards
    Karthik R.

    hi
    check this thread:
    How to disable event firing outside an event. It contains example on C#, but it is not difficult to convert it to PowerShell.
    Blog - http://sadomovalex.blogspot.com
    Dynamic CAML queries via C# - http://camlex.codeplex.com

  • 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.

  • How does point system works?

    Dear all,
    I am wondering how this point system works? I had 915 points this morning and now end up with 905. Instead of going up, it fluctuates from time to time. Initially, it use to show up next to my name with 915 but then that went down to 514???
    Is it only me or someone else has seen this behaviour?
    I am not points buff but it seems pretty strange that one day infact in the same day the numbers fluctuates like they do in stock exchange.
    Regards
    Jehanzeb

    >
    Amit Gujargoud wrote:
    > I think you misunderstood His words and take it hard. Iu2019m sure he actually
    >  meant in a Cool way. Letu2019s wait until his morning, he will come to you with more cool way
    Nope, in this case, Kartik already has "the hard way" behind him.
    During an investigation into a nest of points gamers in October last year, Kartik was investigated as well for having for having participated in one of the threads. There were many being investigated. Other symptoms matched (we have some strict rules for this) - so the mistake was perhaps understandable - but on the other hand I should perhaps have looked a bit further to see that Kartik's post patterns were different to those of the others (who were not located very far away from Kartik..).
    Anyway... as they faded away into the annual ponits total of those who are being transported into the world where the A.G. calendar is used ( Anno Guestus ) ... Kartik's ID faded away with them.
    Kartik contacted me about it and I took his word for the expanation that he was not involved. I am very glad that I did that, as he has been a big help in the ABAP forums.
    I don't have the exact figures, but last I heard we have deleted more than 50 thousand user ID's for ponits gaming. I am always very carefull when investigating this and there are other people who check it as well before any action is taken.
    To date, to my knowledge, Kartik has been the only mistake we have made. Others have begged for mercy, but that is different. Hence my comment that he should wear the difference like a "battle scar" caused by the "journal entry", until Micheal can possibly fix it.
    As you can see, "we are all guilty of something"   (quote: Inspector Vimes)
    Cheers,
    Julius

  • Events working on one server and not the other

    We have a development and a production server for LC. I have events working on the development server that accept parameters.
    The services were deployed to the production server and the following error occured:
    2010-05-04 09:14:04,203 ERROR [STDERR] May 4, 2010 9:14:04 AM com.adobe.idp.scheduler.callback.ServiceCallbackHandler execute
    SEVERE: Exception thrown while calling back a DSC componentINVALID_CHARACTER_ERR: An invalid or illegal XML character is specified.
    2010-05-04 09:14:04,203 INFO  [org.quartz.core.JobRunShell] Job Asynchronous.SWR.RAAC.RequestSendEmail:12729788401870.18563775243350922 threw a JobExecutionException:
    org.quartz.JobExecutionException: java.lang.Exception: org.w3c.dom.DOMException: INVALID_CHARACTER_ERR: An invalid or illegal XML character is specified.
    [See nested exception: java.lang.Exception: org.w3c.dom.DOMException: INVALID_CHARACTER_ERR: An invalid or illegal XML character is specified. ]
        at com.adobe.idp.scheduler.callback.ServiceCallbackHandler.execute(ServiceCallbackHandler.ja va:102)
        at org.quartz.core.JobRunShell.run(JobRunShell.java:202)
        at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:529)
    Caused by: java.lang.Exception: org.w3c.dom.DOMException: INVALID_CHARACTER_ERR: An invalid or illegal XML character is specified.
        at com.adobe.idp.scheduler.callback.ServiceCallbackHandler.execute(ServiceCallbackHandler.ja va:101)
        ... 2 more
    Caused by: org.w3c.dom.DOMException: INVALID_CHARACTER_ERR: An invalid or illegal XML character is specified.
        at org.apache.xerces.dom.CoreDocumentImpl.createElement(Unknown Source)
        at com.adobe.idp.event.xml.XMLGenerator.createElement(XMLGenerator.java:500)
        at com.adobe.idp.event.xml.XMLGenerator.createEventDataDocument(XMLGenerator.java:293)
        at com.adobe.idp.event.content.EventContent.createEventDataXML(EventContent.java:173)
    I took the xml from the production service and ran it through the development server, it worked fine.
    Any idea as to where to start the troubleshooting?
    Cheers,

    It would seem that when the LCA we created to be pushed to production, the event template XSD did not get rolled up. So when the LCA was deployed, there was no definition for the event.
    What would cause this? Do you have to select another option when creating the LCA? Do you have to re-define the template after the LCA is deployed?
    Further information would be greatly appreciated.

  • DVR with fms3 , how to make it work?

    Hi
    I am trying to look for documentation on how the DVR functionality is working in fms3. It seems that I need to implement som server-side scripting to make DVR even work. In Flash Live Encoder there is an option to Record DVR, but it when I press the button, all I get is:
    Thu Apr 30 2009 13:15:38 : Start DVR command received
    Thu Apr 30 2009 13:15:38 : Requested DVR command has been successfully issued to Primary FMS server for stream ob1stream
    Thu Apr 30 2009 13:15:38 : Primary - Network Status: NetConnection.Call.Failed error Method not found (DVRSetStreamInfo).
    Does anyone know how to make this work?
    Best Regards Niclas

    ok i'm back for a second......so uhhh....class is in session here is a basic example of a video encoder
    use this to stream your video while recording.....what makes it record?and not live? this line here:
      ns.publish("thefilename", "record");
    the second parameter.....to make it stream live without recording it to file you change it to "live"....the first parameter is what you name your file...
    after this you use your client player to connect to the same connection as outlined.....and to play the same file ..ie   stream.play("thefilename");
    package
        import flash.display.*;
        import flash.media.*;
        import flash.net.*;
        import flash.events.*;
        public class SimpleEncoder extends Sprite
            var nc:NetConnection;
            var ns:NetStream;
            var mic:Microphone;
            var video:Video = new Video();
            var camera:Camera;
            public function SimpleEncoder():void
                NetConnection.defaultObjectEncoding = 0;
                nc = new NetConnection;
                nc.addEventListener(NetStatusEvent.NET_STATUS, netStatusHandler);
                nc.connect("rtmp://localhost/video/myvids");
            private function publishLiveStream():void
                ns = new NetStream(nc);
                ns.addEventListener(NetStatusEvent.NET_STATUS, netStatusHandler);
                ns.client = this;
                camera = Camera.getCamera();
                mic = Microphone.getMicrophone();
                if (camera != null){
                    camera.addEventListener(ActivityEvent.ACTIVITY, activityHandler);
                    video = new Video();
                    video.attachCamera(camera);
                    ns.attachCamera(camera);
                if (mic != null) {
                    mic.addEventListener(ActivityEvent.ACTIVITY, activityHandler);
                    ns.attachAudio(mic);
                if (camera != null || mic != null)
                // start publishing
                // triggers NetStream.Publish.Start
                // "thefilename" is the name of the file you use after you connect to stream in client player   stream.play("thefilename");
                ns.publish("thefilename", "record");
                else
                    trace("Please check your camera and microphone");
                addChild(video);
            public function onBWDone():void
            private function netStatusHandler(event:NetStatusEvent):void
                trace(event.info.code);
                switch (event.info.code)
                    case "NetStream.Buffer.Full":
                        break;
                    case "NetStream.Buffer.Empty":
                        break;
                    case "NetConnection.Connect.Success":
                        trace("Congratulations! you're connected");
                        publishLiveStream();
                        break;
                    case "NetConnection.Connect.Failed":
                    case "NetConnection.Connect.Rejected":
                       // trace ("Oops! the connection was rejected");
                        break;
                    case "NetStream.Play.Stop":
                        break;
                    case "NetStream.Play.StreamNotFound":
                        trace("The server could not find the stream you specified");
                        break;
                    case "NetStream.Publish.BadName":
                        break;
                    case "NetStream.Publish.Start":
            private function statusHandler(event:StatusEvent):void {
                trace("statusHandler: " + event);
                trace(mic.activityLevel);
            private function activityHandler(event:ActivityEvent):void
                //trace(mic.activityLevel);
            public function onFault(e:Object)
                //trace(e.info);
                //nc.close();
        }//end class
    }//end package
    thelegendaryghost

  • How to get event when any library object added to indesign doc?

    I want to do some operation when any library object is added to doc. So please tell me how to get event when any library object is added to the doc. better provide some code snippet.

    Daves61,
    I need to clarify what kind of event you're interested in.
    1. When you click once on page/spead widget in the Pages panel and only widget becomes selected. The layout window remains unchanged. OR
    2. When you doubleclick on page/spread widget the selected master spread appears in the layout window.
    In the first case you work with Pages panel.
    Have a look to file PageTransitionsPanelObserver.cpp from SDK. 
    PageTransitionsPanelObserver::LazyUpdate()
    In the second case you work with Layout window.

  • Can you have nested event loops?

    I am trying to use a nested event structure and am have a lot of trouble getting it to work right. On the block diagram I have 5 events that I am looking for. When I hit the baseline button I have an abort button become visible and I want that button to control the vi that I have running in that event, but once the baseline event starts I am not able to push the abort button or any other button for that matter. I started with the user event handler template. Attached you will find a copy of my program, If you decide to run it you need to choose comm port 0 when it asks or else the program will hang. Should I be using a different type of template for this program? This is also a problem when the assay button and save buttons ar
    e pressed.
    THanks
    Attachments:
    labview.zip ‏277 KB

    I opened the code and was missing a DLL and some controls so I was not able to run it. However I still may be able to help.
    Basically I have never had a need for impeded event structures because they are very hard to get right, and in general are not needed. I believe some of the event structure caveats mention this, or the 2 events in a loop are similar.
    Anyways the reason it is dangerous is that they can lock each other. As soon as your VI starts running the structures start watching for value changes. They all share the same event queue so they are all watching the same stack of events.
    So in your code if I hit the Buttons.Save Data button and then I decide to hit it again, or I decide to hit the Buttons.Stop your VI will lock up. If I then hit the S
    aveAssay button it does not matter.
    Here is the reasoning. The queue of events looks like: Save Data, then Stop, and then SaveAssay. The SaveData is handled first so I enter that case. Now before I finish that events code, I must run the impeded event structure due to dataflow. However because I hit Stop next, it is the next thing in the event queue. The impeded event structure is waiting for a SaveAssay or SaveBaseline event, and will not finish until it can process that event.
    However LabVIEW events can not be thrown away so the Stop MUST be handled before the SaveAssay can. So in your case the event structure is waiting to handle the SaveAssay but the Stop must be handled first. However the stop can not be handled until the SaveData finishes, which it can�t.
    Therefore you end up locked. LabVIEW can not finish the handling of one event until another is handled, and data flow won�t allow that.
    Sorry for the novel here. If you have any questions let me know, I real
    ize this is a confusing answer, but the issue is complicated.

  • How to get event.columIndex on dragstart (before the actual drag)

    Hi there,
    I would like to know how to get event.columnIndex (ListEvent) when a drag starts within a datagrid.
    I need the index to get the value from a selected cell in a datagrid.
    It works with the itemClick handler (but then I have to click before dragging) on the datagrid but the DragEvent does not have a columIndex for de underlaying datagrid.
    Please advice and thanks.
    Grtz

    The dragStart event is a subclass of a MouseEvent that can be used in
    mouseEventToItemRenderer

  • How to have calendar work on iPhone and Macbook?

    Anyone knows how to have them work on both devices please tell me. Thank you.

    Page 96 of the user manual:
    Set calendar alerts: In Settings, choose Sounds, then turn Calendar Alerts on.
    If Calendar Alerts is off when an event is about to occur, iPhone displays a message but makes no sound.
    Important: If the Ring/Silent switch is off, calendar alerts won’t sound.

  • How do iMovie files work?

    I want to pair down the photos and videos that I have stored in iPhoto.
    However, I do not want to mess up my iMovie projects or events.  I hope to eliminate the iPhoto files but keep the iMovie projects.
    Can anybody tell me if iPhoto and iMovie use the same photo and video files?  How does the linkage work?
    I tried a test and made a IMovie project and then deleted the event in iPhoto and it did not affect my iMovie project.  However, when I am in iMovie and click on a photo or video and say "reveal in finder" it shows me that the photo or video is stored in iPhoto Library!  This makes me nervious about deleting the iPhoto event file.
    I am running OS X Mavericks.  I am running iPhoto 9.5 and iMovie 10.0

    Control click does not work - no option to find files.  I have no idea what to do.  When I look at the usage of the external drive the space is being used, but I cannot find the files.  I am going to try MacKeeper's Undelete and see if I can make any progress with it. 

Maybe you are looking for