Threads - Multithreaded app. - How to cancel one and start another?

I've searched through the forums for some direction on this but have been unsuccessful in finding anything I could use yet.
What I am trying to accomplish is the following:
1. I have a multithreaded application
2. User can enter login information and then initiate the login thread by clicking the login button
3. Login button turns into a Cancel button during login attempt
4. If user changes their mind, they can initiate the cancel login thread by clicking the cancel button
How can I stop the login thread and start the cancel thread? Reading through the API (1.3.1), it seems that necessary methods have been depreciated. Could anyone offer me any insight/examples?
Thanks,
KJ

Have a boolean variable in the login thread which is checked at various points through the process and set to true when login starts. When the user clicks cancel, set it to false, then the login thread will end itself next time it checks the boolean.

Similar Messages

  • How do I reset and start another game.

    Hello
    Please can someone help, I have spent several days on this and still can't get it to work.
    The code below is ok, I am playing a bowling game using the keyboard and timer with a text readout of the elapsed time, the bowl moves a set number of pixels on the screen.  whilst in full screen mode I would like to click a start/play button on the screen to start the game and timer again, everything is in frame 1.  Also I would like the game to just accept the keycode 77 and keyboard event (2 events only to move the bowl) and then wait for the start/play button click.
    Thanks
    Mick
    import flash.utils.Timer;
    import flash.events.MouseEvent;
    import flash.events.TimerEvent;
    var totalTime:Number = 0;
    var startTime:Number;
    //stop();
    var bowlTimer:Timer = new Timer(1,6000);
    //startButton.addEventListener(MouseEvent.CLICK, startTimer);
    bowlTimer.addEventListener(TimerEvent.TIMER, moveBowl);
    //bowlTimer.addEventListener(TimerEvent.TIMER_COMPLETE, endTimer);
    /*function startTimer(e:MouseEvent):void
    clockTimer.start();
    trace("Timer started");
    startButton.visible = false;
    function moveBowl(e:TimerEvent):void
    myBowl.x = myBowl.x + 70;
    trace("Timer cycle expired");
    /*function endTimer(e:TimerEvent):void
    trace("Timer finished");
    stage.addEventListener(KeyboardEvent.KEY_DOWN,keyDownHandler);
    var myKeyBoolean = false;
    function keyDownHandler(event:KeyboardEvent)
    if (event.keyCode == 77)
      bowlTimer.start();
      startTime = getTimer();
    else if (myKeyBoolean == false)
      bowlTimer.stop();
      totalTime +=(getTimer()-startTime)/1;
      yourTF.text = Math.round(totalTime).toString();
    }// add yourTF to the stage

    Hello, Thanks for the reply.
    I put the code onto frame 20 and added the gotoAndPlay (1), the code played, I then clicked the button which reset the playhead to frame 1 , however the code didn't play a second time ?
    Any idea why ?
    Thanks for your help.
    Mick
    myButton.addEventListener(MouseEvent.CLICK, fl_ClickToGoToAndPlayFromFrame_2);
    function fl_ClickToGoToAndPlayFromFrame_2(event:MouseEvent):void
    gotoAndPlay(1);
    trace("btn_myButton");

  • How do I copy the same app folder layouts from one device to another? We have a several iphones and ipads.

    how do I copy the same app folder layout from one device to another. We have several apple devices.
    It's a challenge when syncing a device for the first time to go through all the apps and apply them back to the same folders as on your other iphone.
    I've seen suggestions of taking pictures of the correct layout, then manually applying it to the new device. Big time waister.
    What's the work around?
    Thank you

    I'm afraid there is no short workaround. One thing that you could do if you were REALLY desperate is reset your device to factory settings and then restore it from your other device's backup, but that is rather risky and you probably don't want to take your chances just for folder layouts. I would just do it manually.

  • How to cancel one of my skype numbers

    hello,
    I have subscription unlimited Poland and I can have up to 4 skype numbers as the part of that subscription. Currently i have two working numbers - how to cancel one of them?

    I just spoke with Skype support about this very problem, they have NO way of allowing you to temporarily or permanently disable a number except for cancelling the number and waiting for your subscription to run out.
    Sometimes, you wonder if anyone at Skype has their brains turned on. Oh no and reply from Skype support for a post on ‎07-02-2012 about an urgent issue? Very professional. I swear when they encounter a user issue, instead of solving it like usual companies they just turn their heads and look the other way.

  • HT5796 I was on a a different Apple ID and I logged out because they didn't want me on there anymore so I figured out how to make one and now it's not letting me upgrade or download anything. I rebooted my iPhone 5, iOS 7.0.4 multiple times nothing fixed

    I was on a a different Apple ID and I logged out because they didn't want me on there anymore so I figured out how to make one and now it's not letting me upgrade or download anything. I rebooted my iPhone 5, iOS 7.0.4 multiple times nothing fixed my problem.

    I was on a a different Apple ID and I logged out because they didn't want me on there anymore so I figured out how to make one and now it's not letting me upgrade or download anything. I rebooted my iPhone 5, iOS 7.0.4 multiple times nothing fixed my problem.

  • Unable to open firefox - get message that " a copy is already open and only one copy can be open at a time. I have dragged the app to the waste basket and downloaded another firefox app. However same result". I have a IMAC , V.10.6.3.

    Unable to open firefox - get message that " a copy is already open and only one copy can be open at a time. I have dragged the app to the waste basket and downloaded another firefox app. However same result". I have a IMAC , V.10.6.3.
    I get above message when I click on the firefox icon.

    This worked, I used the method described in this link http://forums.mozillazine.org/viewtopic.php?t=365156, and opened the Mozilla profile screen with the terminal on my mac, using the language given in the links. Then I duplicated my original profile to save the bookmarks, etc. Put them in a folder listed Duplicate profile with the date. With the open profile screen, I deleted my original profile, created new profile folder and then a new profile. Note that profile cannot be created in the system library, it must be created on the disc, because the library will not allow writing into it. After I created my new profile folder, I dragged all my old information into it, and it worked. Firefox closed and the error disappeared. You must be VERY careful to make sure Firefox is closed anytime you are doing anything with the profile folders. I think that is what caused my original problem.

  • When I flag an email with my gmail account using Apple's Mail App how do I flag and set a reminder that at a specific to follow

    When I flag an email with my gmail account using Apple's Mail App how do I flag and set a reminder that at a specific to time to follow up with that email ?

    Welcome to the Apple community.
    If you are unable to remember your password, security questions, don’t have access to your rescue address or are unable to reset your password for whatever reason, your only option is to contact Apple ID Support, upon speaking to an operator you should explain that your problem is related to your Apple ID, this way you will not be charged for assistance, even if you don’t have an AppleCare plan.
    The operator will take you through some steps you may have already tried, however they need to be sure they have exhausted all usual approaches before trying to reset your account, so you should try to be helpful and show patience with the procedure.
    The operator will need to verify they are speaking to the account holder and may ask you some questions that only the account holder could know, and you will need to answer them if the process is to proceed.
    Once the operator has verified your identity they will send a message through to your device which contains an alpha numeric code, which you will need to read back to them.
    Once this has been completed they will send an email to your iCloud email address after a period of 24 hours, so you should check that mail is enabled in your devices iCloud settings.
    Upon receipt of the email, use the reset link provided to reset your password, after which you should be able to make the adjustments to iCloud that you wish to do.

  • I bought Photoshop CS6 in 2nd hand market and it was already registered in pre-owner's account how can cancel this and move to my account?

    I bought Photoshop CS6 in 2nd hand market and it was already registered in pre-owner's account how can cancel this and move to my account?

    Hi Syjung,
    The previous owner needs to transfer the license by filling the below form.
    http://helpx.adobe.com/x-productkb/policy-pricing/transfer-product-license/_jcr_content/ma in-pars/procedure_2/proc_par/step_0/step_par/download/file.res/Transfer%20of%20License%20F orm.pdf
    Thanks

  • How to refer one view from another view?

    Hi,
    I have 2 views in my Adobe Flash Builder mobile app. I need to refer the first view in my second view.
    How to refer one view from another view? Or how to create a reference to a view wherever needed?

    I don't need any data from my first view. In a certain flow, I need to make my first view to be invisible.
    for eg., My First view is in portrait mode. I change the device to Landscape. In the landscape mode, I want to show a completely different view (second view).
    In this case, what happens is, I see my first view in Landscape mode for a second. Then the second view appears. When I change to Landscape mode, only the second view should be seen. I need to make my first view to be completely invisible in the OnOrientationChanging event of
    StageOrientationEvent
    As stage object and StageOrientationEvent works at application level, I need to know how to refer my first view object in the application level.
    private function onOrientationChanging(soe:StageOrientationEvent):void
          MyFirstView.Visible = False; ====> don't know how to refer MyFirstView here
    Is my question clear now?

  • How to call one  JSFF into another JSFF

    Hi,
    I am very new to ADf. Could you please tell me how to call one JSFF inside another JSFF. We have a common pop-up written in one JSFF. Is there any best approach to get this pop-up into other JSFF.
    Thanks in Advance.
    Regards
    Narasimha

    If you want to resue the jsff code, make use of bounded task flow with page fragment and then use it as a region.
    For more details you can refer: http://docs.oracle.com/cd/E21764_01/web.1111/b31974/taskflows_regions.htm
    One more:
    http://docs.oracle.com/cd/E18941_01/tutorials/jdtut_11r2_57/jdtut_11r2_57.html

  • How to include one view into another view

    Hi SDN's,
                   Could any please tell me,How to include one view into another view.
    In my requirment.I want to create a 'Z' view for an interface .In that  view i have to take,
    1) Ship-to-email adrr by
                              LIKP-KUNNR -> KNA1-ADRNR
                              KNA1-ADRNR -> ADR6-ADDRESNUMBER.
    2) E-mail addr of person who created the document.i.e
        LIKP-ERNAM -> USR21-BNAME.
        USR21-ADDRESNUMBER ->  ADR6-ADDRESNUMBER 
        USR21-PERSNUMBER -> ADR6-PERSNUMBER.
       In both the case we have to pass ADDRESSNUMBER to ADR6 table.
    If we pass these condition it fails,B'Coz at a time it passes Two ADDRESSNUMBER and a PERSNUMBER.
    So i created two which fetches only the email addr of  person who created the document.and another view fetches Ship-to-email addr.
    Now i want to include the second view into first view . Is it possible?or please
    tell me someother way to get these email addresses in a single view.

    hi
    as per my knowledge, nested views are not possible. However, while creating a new view, selection method will not giv u option to select the already created view(S) except the tables..i think so.
    regards,
    shamim

  • How to call one program from another program

    Hai,
      How to call one program through another program.
    Example.
       I have two programs 1.ZPROG1 2. ZPROG2.
    When i execute ZPROG1 at that time it should call ZPROG2.

    Hi ,
    u can use submit statement to call a program .
    DATA: text       TYPE c LENGTH 10,
          rspar_tab  TYPE TABLE OF rsparams,
          rspar_line LIKE LINE OF rspar_tab,
          range_tab  LIKE RANGE OF text,
          range_line LIKE LINE OF range_tab.
    rspar_line-selname = 'SELCRIT1'.
    rspar_line-kind    = 'S'.
    rspar_line-sign    = 'I'.
    rspar_line-option  = 'EQ'.
    rspar_line-low     = 'ABAP'.
    APPEND rspar_line TO rspar_tab.
    range_line-sign   = 'E'.
    range_line-option = 'EQ'.
    range_line-low    = 'H'.
    APPEND range_line TO range_tab.
    range_line-sign   = 'E'.
    range_line-option = 'EQ'.
    range_line-low    = 'K'.
    APPEND range_line TO range_tab.
    SUBMIT report1 USING SELECTION-SCREEN '1100'
                   WITH SELECTION-TABLE rspar_tab
                   WITH selcrit2 BETWEEN 'H' AND 'K'
                   WITH selcrit2 IN range_tab
                   AND RETURN.
    regards,
    Santosh thorat

  • HT1277 My hard drive crashed and using my back up, it seems my Mac mail is corrupted. How do I delete and start over?

    My hard drive crashed and using my back up, it seems my Mac mail is corrupted. How do I delete and start over?

    If you are a resident of the U.S., have iTunes 10.3 or later, you can re download purchases for free.
    Downloading past purchases from the App Store, iBookstore, and iTunes Store

  • How to copy one request to another request

    Hi all,
    How to copy one request to another new request?
    I have a released workbench request in which it has around 1200 Objects (including data elements, domains, programs and many more), now i need to copy all these objects into a new request.
    I can do this by SE03 (Include Objects in a Transport Request ) transaction, but it is a lengthy process.
    Is there any way to copy directly in one go.
    Plz help...
    Regards,
    Satish Reddy D.

    Hi,
    The thing is like this....
    i have a released request in which we have more than 1200 objects, in that i dont need 10 objects.
    so when i create it as copy of transport request, i just deleted those 10 objects and saved.
    Now, if i transport the new request how many objects will go? 1200 or 1190?
    in the new request i am getting the old request under Comment: Object List Included.
    is it necessary to transport the old request?
    i need to transport only 1190 objects.
    Regards,
    Satish Reddy.
    Edited by: Sathish Reddy on Jan 28, 2010 2:18 PM

  • HT1338 trying to download mountain lion OS, but whenever the net connection is broken it restarts from zero, how to prevent this and start downloading from the point it was disconnected

    trying to download mountain lion OS, but whenever the net connection is broken it restarts from zero, how to prevent this and start downloading from the point it was disconnected

    Disable anti virus software and try turning off the Firewall in System Preferences > Security & Privacy > Firewall.
    Quit then relaunch the App Store. From the menu bar click Store > Sign In
    Then click Store > Check for Unfinished Downloads

Maybe you are looking for