• 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: How do you close a NSDrawer after a NSThread has finished
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How do you close a NSDrawer after a NSThread has finished


  • Subject: Re: How do you close a NSDrawer after a NSThread has finished
  • From: Mike Abdullah <email@hidden>
  • Date: Sun, 18 Feb 2007 22:03:59 +0000

How about using -performSelectorOnMainThread: to inform the main thread that your secondary thread has finished its copy and let the main thread handle closing the drawer etc.?

Mike.

On 18 Feb 2007, at 20:57, Martin van-Eerde wrote:

From the main thread I want to copy some files, whilst updating a progress bar and several text fields.

The controlling method is called, which opens a drawer (that has the controls I want to use to provide working feedback) sets the text and progress bar to Indeterminate, the creates a Thread to do the copying.

The thread calculates the max value for the progress bar, sets it into determinate mode and then does the file copying using the file manager in a while loop, updating the progress and text fields for each file copied. Once the thread has completed I want the drawer to close automatically.

I have tried passing both self and the reference to the drawer to the thread and calling the close method but the drawer does not close.

I have tried adding the main application as a observer for the thread will exit notification, the notification is received, but again calling close on the drawer does not seem to do anything.

Thanks Martin

_______________________________________________

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:
40mikeabdullah.net


This email sent to email@hidden

_______________________________________________

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


References: 
 >How do you close a NSDrawer after a NSThread has finished (From: Martin van-Eerde <email@hidden>)

  • Prev by Date: How do you close a NSDrawer after a NSThread has finished
  • Next by Date: NSTokenField & Space Bar selection
  • Previous by thread: How do you close a NSDrawer after a NSThread has finished
  • Next by thread: Re: How do you close a NSDrawer after a NSThread has finished
  • Index(es):
    • Date
    • Thread