Re: How do you close a NSDrawer after a NSThread has finished
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