Few seconds of processing & button events

Hi,
i have a 'theory' question -
some feature of my app has a bit long processing time, about a few seconds, in which there's an activity indicator running.
this processing should start after the user pressed some "start process" button.
my question is -
is it good or bad or neither to do this large processing issue from within the button's event method (the one connected to "TouchUpInside" event for example, or there's a better way to use events to signal other parts of the application to do that processing.
the reason i ask this is when i do the processing from within the buttons event method, the button is highlighted and than remains highlighted until all the process is done.it seems that the highlight is there until the button's event method finished.
i hope i explained myself clearly enough.
thanks a lot.

nkobik wrote:
is it good or bad or neither to do this large processing issue from within the button's event method
The problem in this case isn't which method starts the long process. No matter where you run that task, it's going to freeze the UI until you get it out of the main thread. Running the process in the action method makes the problem more noticeable since the button's state can't change until the process completes, but freezing the UI is never acceptable even if some users don't notice it. I.e. even if the app has nothing useful to do until the long process completes, the controls should still respond normally, if only to pop up an alert asking the user to be patient. Generally the user should also have the opportunity to cancel a long process, which isn't going to be possible with a frozen UI.
So it looks like you need to bite the bullet and use some kind of concurrent operation. I think the choice will depend in part on your experience and preference. If you're comfortable with threaded programming, starting a helper thread to run the long process might be the easiest for you. However the SDK supports higher level concurrency management, and if you're not familiar with the NSOperation classes you might want to look over the Concurrency Programming Guide.
Whatever approach you decide on, let us know if you need help with it, and I'm sure someone around here will be able to advise you.
\- Ray

Similar Messages

  • HT2486 the photos that I add to address book will only be there for a few seconds after I close the edit button. Either they go away completely or they a very small portion of the actual photo

    the photos that I add to address book will only be there for a few seconds after I close the edit button. Either they go away completely or they are very small portion of the actual photo

    Frank, thanks for your note.  I wrote "COMPLETED" because I had gone to a lot of effort to get the content of the book precisely as I wanted it. I would fully expect to see my level of effort and care matched by functional competence in Aperture 3 to render the book the way I created it.  Too much to ask?
    And yes, I upgraded the Aperture 2 Library first.  [Not ALL my tens of 000s of pix, because I use Lightroom selectively for photo editing. But Yes to the Aperture 2 Library.]  That step took a number of minutes, but seemed to work fine (no error messages of any kind).
    Then I opened the existing book project in Aperture 3, which followed some "magic-box" process that took a minute or so.  As I said, when that step was done, by all appearances the book was ready to submit for printing - until I examined the photos a little more closely.  You did see the blurry example I included, didn't you? That is what each and every photo looks like.
    Text-box content appears to have been rendered pertectly, for the record (including captions).
    So, ... is this result something you have heard of before?  Do you know of a one-step solution?  Or am I looking at an extended picture-by-picture fix?

  • Some times when I press the home button to read my finger the screen becomes black and it shows the Apple logo, this take a few seconds to get back the screen and this has been happening even 3 or 4 times in a row!   What should I do?

    Some times when I press the home button to read my finger the screen becomes black and it shows the Apple logo, this take a few seconds to get back the screen and this has been happening even 3 or 4 times in a row!
    What should I do?

    Basic troubleshooting from the User's Guide is reset, restart, restore (first from backup then as new).  Try each of these in order until the issue is resolved.

  • I am trying to upgrade EPM 8.9(8.49.23) to EPM 9.1 (8.53.08). During dataconversion step the AE process finished succssfully in few seconds. When i see the log it says "There are no conversions to run for upgrade path PF89 (18028,10003)". Please let me kn

    I am trying to upgrade EPM 8.9(8.49.23) to EPM 9.1 (8.53.08). During dataconversion step the AE process finished succssfully in few seconds. When i see the log it says "There are no conversions to run for upgrade path PF89 (18028,10003)". Please let me know why it didnt do any conversion. Am i missing something?

    yes, that app engine didnt inserted any rows. So now when i tried to drill down i found that there was no data in the "new demo" database on table UPG_DATACONV. That is the reason for all this.
    When i applied required for upgrade patch in demo it said couple of patch already exists so those update i skipped. Now when i check upd877654 has a step which imports the data in this table. my change assistant told that the update is already available in my demo so i skipped. Now i am not sure what to do.
    I tried reimporting the data and running the analyzer again. But worried that there can be any issues due to this.

  • I am having an MacBok Pro 13inch,having an Startup Problem, the time i press the power button after few seconds the apple symbol appears w/a loading sign below it

    i am having an MacBook Pro 13inch  , having an Startup Problem , the time i press the power button after few seconds the apple symbol appears with a loading sign below it and wont go further ahead of it . My data is all in the hard drive .. . I even tried the Internet recovery but no use !!!! but still no respons and the recovery and macintosh hd is now lock! but earlier only the recovery is lock and after both of them is lock.  i can reinstall,... and i didnt try to back up any data bec i dont know how? so please help me to resolve my prroblem.?

    luoie wrote:
    This thing happend,, it say Disk utility stopped repairing "Macintosh HD" disk utility can't repair this disk
    Sorry, possibly you need a new hard drive or try reformating. First
    you can try something like http://www.alsoft.com/diskwarrior/  it has been known to repair disk that DiskUtility could not. YMMV and they don't give it away.
    If Disk Warrior can not repair then you need to Reformate the drive. Make sure you have a back-up in place no matter what.
    http://www.apple.com/support/backup/
    Disk Utility will tell you something about it's SMART status:

  • My mac pro wont start. I push the power button and I get a click sound. A few seconds later another click sound and that it.

    My mac pro wont start. I push the power button and I get a click sound. A few seconds later another click sound and that it. I've tried different power plugs. Going direct into the wall, through a power strip. By iteslf, with other devices plugged in. I removed hard drives, and some RAM, and nothing. Sometimes it would not turn on, and then some minutes later it works. So its was sparatic, but now its been the same situation for three days where it wont turn on.
    I'm guessing power supply, but I wanted to see if anyone had a similar expereince and what the solution was, before I drag this beast to my local Apple store and have them look at it. Its a real pain to get it there and back and I want to be armed with some info for them. I already dragged this to them when it first started to do this, and of course it started up just fine for them. And you know if it works for the Genius then theres nothing wrong with. No matter what you explain to them.
    I figure if anyone had a the same problem and was able to resolve it, I can relate that experience to the Genius even if it start up for them.
    Thanks

    Try a SMC Reset using the extended method:
    Remove the AC power cord.
    Press the power-on button. [This drains the stored charge from the power supply]
    wait a quarter minute.
    Restore the power cord, being certain to JAM it into the socket, as the big block of rubber inhibits proper seating.
    wait a quarter minute
    attempt to power on.
    If no joy, examine the button battery half-hidden behind the graphics card. Remove it to measure the Voltage. A new battery should not cost over US$5, and measures a little over 3 Volts. BR-2032 is used in garage door opener controls and car door locks controls. The geeks at Radio Shack can measure it for you.

  • My iPhone 3G phone button no longer works. If I push it I get a black screen for a few seconds then back to the home screen. Everything else is ok. Any ideas how to fix this?

    The phone button on my iPhone 3G no longer works. Everything else on the iPhone works fine. I can receive incoming calls. I can make calls directly from Contacts. But if I press the phone button I get a blank white screen for a few seconds then it goes back to the home screen. I've tried the hard reset and also restoring orignall settings via iTunes but keep getting the same problem. Does anyone know how to fix this?
    Thank you, Neil.

    Thanks for the advice but I've tried resetting network settings and also the reset by pressing home and sleep buttons until getting the Apple logo. Still have the same problem. To be clear (because I mistakenly typed black instead of blank in the title to this thread): If I press the phone button I get a BLANK WHITE screen for a few seconds then it goes back to the home screen. I doubt it's the SIM card as I can receive calls and make them directly from contacts. What I can't do is view my favourite numbers or missed calls or access my voicemail, i.e. all the things you get to via pressing the phone button.

  • My 4th generation ipod touch is not turning off when i hold the wake button for few seconds the Voice Control Function Starts Automatically.Please help me to get out of this problem.

    My 4th generation ipod touch is not turning off when i hold the wake button for few seconds the Voice Control Function Starts Automatically.Please help me to get out of this problem.

    Sorry i mistakenly made this question. It was alright. No Problem At ALL

  • MY iPhone 4 after  being updated to iOS7 will not download or update any apps. When i press the button on my device to download a new app the loading wheel appears then in a few seconds disappears. I dont get a terms and conditions screen or anything.

    MY iPhone 4 after  being updated to iOS7 will not download or update any apps. When i press the button on my device to download a new app the loading wheel appears then in a few seconds disappears. I dont get a terms and conditions screen or anything.

    Ive tried using wifi and 3G seperately. Ive tried restarting the phone. Ive tried restoring it from a backup but none of these have worked yet.

  • How do I count and display events every few seconds and then convert the counted values into events per minute? (for a heart rate monitor)

    Hi everyone,
    I'm building a heart rate monitor as a final year project with my lab partner using the NI USB-6009 and Labview 2009. We have managed to obtain a signal using a photo transciever, smooth it out and count the events, however the count is incremental.
    We wish to count the number of pulses we obtain for a few seconds (5-10 for example) and then use this value to obtain a pulse rate in beats per minute (e.g. 10 pulses in the first 10 seconds would give an estimated BPM of 60 etc etc).
    Does anybody have ides on how we could implement this? We have tried timed loops, elapsed time VI's and other things but nothing gives us what we need.
    Thanks in advance for any help that is offered.
    Jeshua Graham.

    We are very new to Labview. We are taking a raw signal from our DAQ and then using VIs to filter and then trigger counts on rising edges. I have attached our vi file to this post for you to look at (I hope that is what you mean by code).
    Attachments:
    TCRT-1010DAQ_jeshua1.vi ‏367 KB

  • Can hear audio, but video blacks out every few seconds; picture comes back when we hit the tv's volume button

    We can hear audio, but video blacks out every few seconds; picture comes back when we hit the tv's volume button. Everything seems to be plugged in well. The picture even starts out being sort of dim. And it goes through phases of working fine but then will randomly start blacking out again.  Any ideas?

    Welcome to the Apple Community.
    Have you tried turning the TV off and on again.

  • Classic: will not recharge; apple logo flashes every few seconds then fades away; have tried the 'reboot' advice i.e. move hold switch on and off, hold menu and center button, no success.  have tried this many times and kept connected for several hours.

    I have a classic, several years old.
    It will not recharge; the Apple logo flashes every few seconds then disappears. 
    I have tried the 'reboot' advice i.e. move the Hold switch on and off, hold the Menu and Center buttons, no success. 
    I have tried this many times and kept the ipod connected for several hours.  And I have tried two different cords, one connected to the desktop computer, one connected to electrical outlet.

    Hi enbridge4,
    If your iPod Classic won't charge or turn on, you may find the following articles helpful:
    Apple Support: iPod won't turn on
    http://support.apple.com/kb/ts1383
    Apple Support: iPod's battery doesn't charge
    http://support.apple.com/kb/ta44551
    Regards,
    - Brenden

  • When I delete an ongoing event in my calendar it reappears again after a few seconds. How do I fix this?

    When I delete an ongoing event in my calendar it reappears again after a few seconds. How do I fix this?

    You might consider connecting it to the charger and charging up the battery overnight.
    Please Get the iPod Touch User Manual for iOS 5

  • Whenever i try to play a video on my iphone, it pauses literally every 2 seconds. i will hit the play button, the video will play for a few seconds and then it will pause again. what can i do to fix this?

    videos will play for a few seconds on my iphone then it pauses. i press play and it pauses again. why is it doing this? and this is for all videos: youtube vides, videos off the internet, videos ive downloaded from itunes

    I can understand this with videos you are streaming, i.e. maybe you have a slow data connection.
    Videos on your phone should not do this.  Try a reset by pressing the home and sleep buttons until you see the Apple logo, ignoring the slider. Takes about 5-15 secs of button holding and you won't lose any data or settings.

  • My iPad suddenly started to show crazy colors.  I turned it off and had to use the two button trick to turn it back on.  Now it shows only green stripes for a few seconds and goes back to sleep.

    My iPad suddenly started to show crazy colors.  I turned it off.  It would not reboot until I used the two-button reboot.  Now it shows only green stripes.  only for a few seconds and goes back to sleep.  HELP!

    Standard troubleshooting...
    1. Try a Restart by pressing the sleep/lock button until you see the slider.  Slide to power off.  Restart by pressing the sleep/lock button until you see the Apple logo.
    2. Try a Reset by pressing the home and sleep buttons until you see the Apple logo, ignoring the slider if, it comes up. Takes about 5-15 secs of button holding and you won't lose any data or settings.
    3. Remove all apps from Recently Used list...
    - From any Home Screen, double tap the home button to bring up the Recents List
    - Tap and hold any icon in this list until they wiggle
    - Press the red to delete all apps from this list.
    - Press the home button twice when done.
    4. If still a problem restore with your backup.
    5. If still a problem restore as new, i.e. without your backup. See how it runs with nothing synced to it.
    6. If still a problem, it's likely a hardware issue.

Maybe you are looking for

  • Table Name to take report of Open Sales Order items&its relevant GL Number.

    Hi, I wanted to take a report with Output as Open Sales Order Items and its relevant GL account numbers. is there any T Code in the Standard or atleast the table name. I have already fetched the Open Sales Order Items from T code VA05, but i need the

  • How can I stop home sharing my photos?

    I currently have home sharing turned on and it shares everything to my apple TV: movies, music, podcasts, photos. Problem is, I dont want to share my photos. Im fine with movies and music. Is there anything I can do or is it an "all or nothing" syste

  • Finder not working...what should I do?

    Finder hasn't been working for the past few days; so none of the icons on my desktop show up. I can sometimes open the Trash folder from the Dock, but cannot seem to click on anything. I have tried relaunching Finder and restarting my MacBook, but it

  • What's the 'other' part in my storage and how do I get rid of it?

    A big part of the storage of my iPod Touch 4th Generation is occupied with 'other', it's about 7 GB. What is this and how do I get rid of it?

  • Can't Download Safari $ on Windows Vista

    I click "Download Safari 4" and it goes to a new page that says "Thank You For Downloading Safari 4" but Safari 4 isn't downloaded on my machine.