• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Allowing cancel and progress but not updating display
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Allowing cancel and progress but not updating display


  • Subject: Re: Allowing cancel and progress but not updating display
  • From: Andrew Madsen <email@hidden>
  • Date: Sat, 10 Mar 2007 13:37:57 -0700


On Mar 10, 2007, at 9:59 AM, Kevin Hoctor wrote:


All this works well when the stars align. I think the problem is that my UI is updating as the import is happening and I'm getting threading errors. I either need a way to keep my controllers from updating during this process or I need a single thread method that allows me to update the progress panel and allow the user to cancel the process. My experiments with detaching/reattaching bindings programatically have failed (and looked ugly anyway). Is there a modal way to do this?

I do something similar (from a user perspective) in one of my apps. Instead of using a separate thread for the import, I simply put up a window and run it as a modal session. This way, I can make it so the progress panel continues to respond to events during the import process. Check out the docs for the NSApp methods beginModalSessionForWindow: and runModalSession:.


<http://developer.apple.com/documentation/Cocoa/Reference/ ApplicationKit/Classes/NSApplication_Class/Reference/Reference.html#// apple_ref/occ/instm/NSApplication/runModalSession:>
<http://developer.apple.com/documentation/Cocoa/Reference/ ApplicationKit/Classes/NSApplication_Class/Reference/Reference.html#// apple_ref/occ/instm/NSApplication/beginModalSessionForWindow::>


-Andrew Madsen
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Allowing cancel and progress but not updating display
      • From: Kevin Hoctor <email@hidden>
References: 
 >Allowing cancel and progress but not updating display (From: Kevin Hoctor <email@hidden>)

  • Prev by Date: Re: Need help with setNeedsDisplay - Another Update
  • Next by Date: Re: Need help with setNeedsDisplay - Another Update
  • Previous by thread: Allowing cancel and progress but not updating display
  • Next by thread: Re: Allowing cancel and progress but not updating display
  • Index(es):
    • Date
    • Thread