Canceling Events

Is anybody know how to canceling event ?
the case is like this :
user click the [x] button on the top right of the windows. it will return an close event right? and how do we cancel it ? (cancel the close event)

If you mean like have a pop-up dialog asking if one is sure they want to exit, then you will have to user your own listener. Like for the JFrame, set the default close operation to Do Nothing On Close then add a window listener that will "respond" to a close event where in it's window close method will have the code you write that will give the appropiate dialogs to either continue or cancel.

Similar Messages

  • How do I display cancelled events in iCal?

    In a simple paper calendar, you can easily mark a cancelled event by drawing a big X over it. Why is that impossible with a €1000-computer? I just cannot get it into my head that it can't be done.
    And another thing, in Sweden at least, Sundays and holidays are colored red in printed calendars. That way it is very easy to locate them when you glance at the calendar. Now, my computer has millions of colors - and yet it is evidently impossible to color certain dates to make the calendar more readable.
    I suppose that at least some of the people who designed iCal must have used a paper calendar at one point or another in their life. So why not make a computer calendar program that can make everything a paper calendar can do AND all the things it can't?
    MacBook Intel Core 2 Duo   Mac OS X (10.4.9)  

    Welcome to the discussions, Anders.
    Tell Apple your suggestions at OS X Feedback.
    You can subscribe to a Swedish holidays calendar at http://www.icalworld.com/intl.html - but I don't think it will be coloured!
    AK

  • How to get the cancel event of inlineDocument-style dialog.

    Hi experts,
    My customer has a question about ADF dialog framework.
    When we open new inlineDocument-style dialog from af:commandButtton, how can we get dialog cancel event?
    [Sample code]
    <af:commandButton id="cb2" action="dialog:test"
    windowModalityType="modeless"
    text="dialog:test" windowHeight="500"
    windowWidth="800"
    windowEmbedStyle="inlineDocument"
    useWindow="true"/>
    When we use af:popup, it has popupCanceledlListener attribute so that we can handle the situation where users click close button or Esc button.
    Does dialog have a similar feature?
    We can set a returnListener for dialog, but it doesn't work in case users click close button.
    Regards,
    Atsushi

    is this what you are looking for [url http://www.oracle.com/technetwork/developer-tools/adf/learnmore/77-ok-cancel-support-in-dialog-351871.pdf]Handling the af:dialog Ok and CANCEL buttons
    and [url https://blogs.oracle.com/jdevotnharvest/entry/strategies_for_controlling_the_af]Strategies for controlling the af:popup close event
    Edited by: Mohammad Jabr on Apr 27, 2012 11:34 AM

  • How to get touch cancel event on button

    Hi,
    I want to implement one button like when user clicks this button, it will fire one method and when user cancel the touch from button, it should fire another method using touch cancel event. I think that i need to set two method on buton.
    Anyone knows how to do this?
    Thanks.

    If you're making the connections in IB, just ctrl-click on the button to bring up the floating black connections panel. You should see all of the button's control events when you expand the Events group. You may connect as many of those events as you wish, either to different action methods or to the same action method. You can also make the same connections in the Connections Inspector.
    To make the connections in code, just add as many actions as you want. E.g.:
    [button addTarget:self action:@selector(touchButton) forControlEvents:UIControlEventTouchUpInside];
    [button addTarget:self action:@selector(cancelButton) forControlEvents:UIControlEventTouchCancel];
    You probably don't really want the Touch-Cancel event, which is normally quite rare and has little to do with "Cancel" in the usual UI sense, but the above will work for you regardless of which events you choose (unless you were actually trying to describe a toggle). For a description of all the events see Control Events in the UIControl doc.
    If what you want is an ON for touch down, and OFF for touch up, you can choose those events from the list I referred to.
    If in fact you want a toggle action (first touch ON, second touch OFF), that would be done by connecting the Touch-Up-Inside event to a single action method and branching the code on a BOOL instance var that would alternate between YES or NO.
    Hope that helps!
    - Ray

  • FileReference Select and Cancel Event Not Working in leopard

    FileReference not working in leopard
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="
    http://www.adobe.com/2006/mxml"
    layout="absolute">
    <mx:Script>
    <![CDATA[
    import mx.controls.Alert;
    public function onClick():void{
    var fr:FileReference=new FileReference();
    //fr.addEventListener(
    fr.addEventListener(Event.OPEN,openHandler);
    fr.addEventListener(Event.COMPLETE,completeHandler);
    fr.addEventListener(Event.SELECT,selectHandler);
    fr.addEventListener(Event.CANCEL,cancelHandler);
    fr.addEventListener(DataEvent.UPLOAD_COMPLETE_DATA,uploadCompleteDataHandler);
    fr.addEventListener(HTTPStatusEvent.HTTP_STATUS,httpStatusHandler);
    fr.addEventListener(IOErrorEvent.IO_ERROR,ioErrorHandler);
    fr.addEventListener(ProgressEvent.PROGRESS,progressHandler);
    fr.addEventListener(SecurityErrorEvent.SECURITY_ERROR,securityErrorHandler);
    fr.browse([new FileFilter("images", "*.png;*.jpg;*.gif")]);
    private function cancelHandler(event:Event):void {
    trace("cancelHandler: " + event);
    private function completeHandler(event:Event):void {
    trace("completeHandler: " + event);
    private function
    uploadCompleteDataHandler(event:DataEvent):void {
    trace("uploadCompleteData: " + event);
    private function
    httpStatusHandler(event:HTTPStatusEvent):void {
    trace("httpStatusHandler: " + event);
    private function ioErrorHandler(event:IOErrorEvent):void {
    trace("ioErrorHandler: " + event);
    private function openHandler(event:Event):void {
    trace("openHandler: " + event);
    private function progressHandler(event:ProgressEvent):void {
    var file:FileReference = FileReference(event.target);
    trace("progressHandler name=" + file.name + " bytesLoaded="
    + event.bytesLoaded + " bytesTotal=" + event.bytesTotal);
    private function
    securityErrorHandler(event:SecurityErrorEvent):void {
    trace("securityErrorHandler: " + event);
    private function selectHandler(event:Event):void {
    Alert.show("XD");
    ]]>
    </mx:Script>
    <mx:Button x="205" y="198" label="Button"
    click="onClick()"/>
    </mx:Application>
    Adobe Flex Builder 3 Beta3
    Leopard 10.5.1
    both Safari and firefox doesn't work

    Flash version is 115 debug player

  • Getting the message from a Cancel event Message Box

    Hi there,
    I would like to know if a user select from menu in SAP 8.8 Data-> Cancel.  We get a message box for confirmation Yes/No user wants to cancel the document so that it is status is changed to cancel.  I would like to know how can you get the message and the caption from that message box in order to know the appropriate action to take with respect to the form type.  In purchare order, when you select cancel, the message box has a caption "Purchase Order" and the text of the message box is "Cancelling a document is irreversible. Document status will be changed to "Canceled" and the document will not appear in the Sales/Purchase analysis reports. Do you want to continue?" 
    I want to know how may I  get these two piece of information.  Actually I know there is a button caption property but I must know the message in order to distinguish in code which is 'YES' is clicked. 
    Any help or lead will be greatly appreciated, thanks!

    This seems to be an SDK question so it would be better to post it in the SDK forum as you will get way more answers; alot less of the experts come in to the B1i forum.
    Anyways, I will suggest an answer but I'd ask you close this thread and continue it in the SDK forum if you still have issues.
    The form in question has form type = 0 so my method of achieving this would be:
    1. Catch the Item Pressed event on form with typeEx == 0 and BeforeAction == true.
    2. Check if Form.Title == "Purchase Order".
    3. Now to check the text - first of all, before coding, go to View->System Information. Now go to a PO and select Cancel; hover the mouse over the text on the form, you will see that the three lines of text are actually labels with UIDs 7, 1000001 and 1000002. In your code you can check if the Label with ItemUID == 7 has the text "Cancelling a document is....etc etc"
    4. If it does have that text you now know the user has clicked a button on that form.
    6. If not, they have some other type of message box open
    7. Check which button they clicked: pVal.ItemUID == 1 means it was Yes, pVal.ItemUID == 2 means it was No
    Hope it helps

  • How to Cancel Event processing

    I have integrated a WD-ABAP application in Portal. I want to change the behaviour of Close button (By default it closes the browesr window !!). I am able to catch the FPM_CLOSE event and execute my custom code, but the problem is, after my code gets executed, the standard handler for FPM_CLOSE also gets executed. Is there any way to cancel the processing of standard handler. In debug mode I was able to do it by clearing the mv_event_id. It's a readonly parameter and I cannot do it programmatically.
    Thanks
    Prashant

    Solved it by changing the ev_result parameter to failed after executing my custom handler.
      ev_result = if_fpm_constants=>gc_event_result-failed
    Thanks
    Prashant

  • Ical LION sends cancel event - MAJOR BUG

    My default calender is set to my Office Exchange Server in Ical
    Cal invite arrives via email and automatically sent to my exchange email address (they are using google cal)
         My Ical adds to my "home" calendar (bug 1 since I set the default calendar to my office)
         I Open the event and change cal to Exchange server and click ACCEPT
         Ical sends weird result to sender of the invite saying THEY canceled the meeting
         It either crashes my Ical or leaves it sent in the correct cal but never sends the ACCEPT only the cancel.
    NOT GOOD ENOUGH APPLE.

    I just created a test invitation and sent it from another account (not part of iCal) to myself.  It was sent from a Hotmail account and showed up as an .ics-attachment to an email.  Even after several minutes this event was not picked up by iCal, thus I clicked on the attachment and it opened in iCal. There I clicked on the "Get Info" and it shows the invitation assigned to my MobileMe calendar (not the default), but it also shows the invitees as active fields (i.e., I can change them) and it does not show the organizer at all.  In other words, it makes the event appear as if it originated from my iCal and I was the organizer.
    In my test case, moving the invite to a different calendar (either through the Calendar sub-menu or the Get-Info panel) caused a message pop-up titled "The event will be moved from the calendar on your Mac to the calendar on your “Exchange” account."  --Note: in my earlier post, I did not get this pop-up.  Thus I am concluding that I am not yet completely recreating the same conditions.
    Unless the action is canceled, an email gets sent out cancelling the original event for all participants.
    I will work on recreating the exact event.

  • How do you cancel Events?

    Here's what I am trying to do:
    I have a set of .mxml components comprising various "views"
    for my application. These views are a subclass of a template view.
    Each view has a "goBack" event which is dispatched via an
    outside Event managing utility (I have to do it this way because of
    the project's design specs... I can't just dispatch the event from
    within the component... ALL events, no matter how simple and
    straightforward have to go through the Event managing utility).
    Here's the structure:
    All these view components are inside a viewstack and their
    listener is set to a function on the application level:
    <mx:Application ..>
    __<mx:Script>
    ____private function goBack(e:Event):void {
    ______//a function that manages the ViewStack's selectedChild
    __</mx:Script>
    __<mx:ViewStack>
    ____<CC:MainMenu />
    ____<CC:View1 goBack="goBack(event)" />
    ____<CC:View2 goBack="goBack(event)" />
    etc.
    now, the custom Event utility class does something like this:
    public static fuction handleEvent(ecode:String):void {
     //currentView being whatever the selectedChild of my
    Application's main ViewStack is
      if (ecode ==
    "SOME_DOCUMENTED_CODE_NUMBER12345") {
       currentView.dispatchEvent(new
    Event("goBack"));
    but! on one particular view, I want to intercept the "goBack"
    event and instead of immediately calling the goBack listener on the
    application level, I want to open a confirmation dialog in the
    component. If the user confirms, then I want the application
    listener to fire and proceed as normal.
    The prolem is that no matter what I do, the event listener on
    the Application level always seems to fire before the listener on
    the component. I have tried setting bubbles, and cancelable in
    the constructor, tried making the event a MouseEvent, but to no
    avail. How can I set up my event so that it is detected by the
    component that originates the event and gets cancelled within the
    component.
    I realize there are other ways to do this, but I am forced to
    comply with strict specifications and must keep everything as
    compartmentalized as possible (thus no "confirm" event or if
    statements in the Applications goBack() method).
    If anyone can offer any adivce, I would greatly appreciate
    it.

    Ok, it doesn't say that explicitly in the docs, but here's
    what it does say:
    quote:
    Second, you register that function or class method with a
    display list object by using the addEventListener() method, as the
    following example shows:
    myButton.addEventListener(MouseEvent.CLICK, myEventListener);
    Most Flex controls simplify listener registration by letting
    you specify the listener inside the MXML tag. For example, instead
    of using the addEventListener() method to specify a listener
    function for the Button control's click event, you specify it in
    the click attribute of the <mx:Button> tag:
    <mx:Button id="b1" label="Click Me"
    click="myEventListener()"/>
    This is equivalent to the addEventListener() method in the
    previous code example. However, it is best practice to use the
    addEventListener() method. This method gives you greater control
    over the event by letting you configure the priority and capturing
    settings, and use event constants. In addition, if you use
    addEventListener() to add a listener, you can use
    removeEventListener() to remove the listener when you no longer
    need it. If you add an event listener inline, you cannot call
    removeEventListener() on that listener.
    This is in:
    Flex 2 Developer's Guide > Using Flex Programming
    Languages > Using Events > Using events
    if <mc:Comp myEvent="blah(event)"> is the same as:
    addEventListener("myEvent", blah), then it follows that setting the
    listener in the mxml tag sets up only for capturing.

  • Cancel Event With SDK

    Hello,
    I would like to know if it is possible to cancel an event.
    For example :
    My user want to delete a row in document lines
    I catch those event Ctrl/k and MenuUID = "1293"
    I verify if a user field is empty.
    If it is empty, i allow the user to delete the row.
    If it is not empty, The user is not allow to delete this line so I want to cancel the event.
    Is there someone who have any idea ?
    Thks for your help.
    Laetitia

    This behaves the same for ItemEvents as well as for MenuEvents:
    Setting BubbleEvent to false will stop SBO from processing the event.
    Taken from UI-Help:
    // to stop SAP Business One from processing this event
    // unmark the following statement
    // BubbleEvent = False

  • Cancel-event for web activity possible?

    Hi all,
    is there a possibility, to cancel a web activity until it is in wait mode for a xml
    message from a partner system (like ending events in normal task types)?
    I just found the condition for ending the workitem in the task properties, which should be evaluated through the periodical observation job for workitem ending conditions.
    Cheers
    Jens

    Hi,
    there IS no possibility to terminate a Web Activity through a terminating event. I wrote this in the first statement.
    The Web Activity can only be terminated, if the Workflow Template itself becomes logical deleted. This is the case i.e. for purchase requisitions, if a new releasestrategy triggers a new release workflow.
    The Workflow itself goes on, only if a asynchronous WebActivity answer arrives.
    I've solved this problem by using a very fine steered communication mechanism, which allways reports the actual state with it's partner. Expensive, but it works fine!
    Cheers
    Jens

  • Catching cancel event of inputListOfValues

    How i can get event when user clicks cancel button in inputlostofvalues popup

    For the cancel button click, there is no public event defined. If you have used your own implementation of ListOfValuesModel then the method searchCancelled() is provided as a hook when the cancel button is clicked in the lov popup.
    -Thanks,
    Srinath.

  • Strike-out / struck / cancelled events in iCal?

    Is there any way of marking events as "struck" in iCal?
    This feature exists in DateBk5 on my Palm. When an event is struck, the text appears but is "struck out" (with a line through it). I find it useful for when deleting an event isn't totally appropriate: say I'm not attending the event but I'd still like a record of when it is happening, for example.
    PowerBook G4 15 1.67GHz   Mac OS X (10.4.4)  

    Welcome to the discussions, Anders.
    Tell Apple your suggestions at OS X Feedback.
    You can subscribe to a Swedish holidays calendar at http://www.icalworld.com/intl.html - but I don't think it will be coloured!
    AK

  • Cancelled (detached) events showing on shared calendar - help!

    I can't figure out how to remove cancelled events from showing in iCal on a shared calendar. We use Zimbra for mail, etc. I subscribe to my boss' calendar and it is showing his cancelled (detached) events. They do not show in his iCal on his computer and they don't show in Zimbra. They only show in my iCal. I've looking in every preference I can find....I've tried un-subscribing to the calendar and then re-subscribing. Nothing seems to work. Any ideas??

    Consequently........it only seems to happen with recurring events we migrated from Microsoft Exchange. I cannot replicate it with a new appointment. I would still, however, like to be able to remove ones that are currently here. Since, they are recurring, they do show in the future, as well.

  • Cancel JTree selection event ?

    Hello,
    I have defined a user object in the DefaultMutableTreeNode that holds a flag for disabled nodes - Now I would like to cancel events from the user when this node is being selected, also I would like to make this node appear disabled.
    How should I do this with JTree embedded inside an applet ?
    Thank you,
    Maxim.

    My rough idea is, store your previous selection, when you get selection change event, check if the node is disabled, if so, set the selection back to previous selection. Also, you can implement TreeCellRender interface, make the node's background gray to let user feel it is disabled.

Maybe you are looking for

  • What is the CPU usage of X and cpu temp on your Arch?

    I just installed the new arch 2009 02. Everything seems to be perfectly out of box, I have lxde DE. But I noticed that in idle X is using around 2~3% cpu compared to below 1% in the old Arch I had before. It seems there is a little lag in the desktop

  • Partner (vendor no.) does not exist for partner function LF

    I am trying to trigger outbound i doc from PO messages, and im getting this message, also im just getting this for UB type order and not regular PO NB. Partner 970023 does not exist for partner function LF Message no. VN006 Diagnosis Partner does not

  • Is XCode fast enough on a MacBook Air 11" 4GB RAM

    Hello, in December I will be buying a brand new MacBook Air for school and personal use.  I will also be developing Apps as a developer for iOS using XCODE.  My concern is if a MacBook Air with 64/128 GB Flash Storage and 4GB RAM.  Should I switch to

  • Can I use my Shuffle to ...

    Can I use my Shuffle to transfer music files from a Windows PC to a Mac. The reason is I want to get rid of my PC, the PC does not have iTunes and the files are kept in the My Music folder. Can this be done? I have read that I can and I have read tha

  • Cost centre Restriction according to Plant in ME51N

    Dear All My customer requirement is to restrict the cost centre during PR creation depending upon plant If cost centre is not belongs to particular plant it will give error message eg if plant is X then cost centre must be  between 310000 to 319999 e