Re: Catching a click during a loop
Re: Catching a click during a loop
- Subject: Re: Catching a click during a loop
- From: Mark Williams <email@hidden>
- Date: Tue, 2 Aug 2005 08:15:35 -0700
I used the one without the modes like you suggested and it worked
perfectly. Thank you!
Mark.
On Aug 1, 2005, at 12:37 PM, Charilaos Skiadas wrote:
On Aug 1, 2005, at 10:18 AM, Mark Williams wrote:
On Jul 31, 2005, at 10:13 PM, Charilaos Skiadas wrote:
On Jul 31, 2005, at 11:24 PM, Mark Williams wrote:
Thanks to every one for the help thus far.
I have run into a new problem with the thread now. First off, I
am able to cancel the process now that it's on a new thread.
That part works. The problem is that while the new thread is
working it updates a textfield in a window pretty regularly with
file information. This information is getting all garbled as if
the text that was there is not being removed even though I do a
setStringValue:@" " between each update. How do I fix this?
Are you using setStringValue on the worker thread? All UI update
should be done in the main thread. If that is the problem, you
have to use NSObject's
Yes, that is what I was doing.
performSelectorOnMainThread:withObject:waitUntilDone:modes:
So it would be something like [textField
performSelectorOnMainThread:@selector(setStringValue:)
withObject:@"File info string" waitUntilDone:YES modes:???
What goes in the modes?
Read the documentation in NSObject. In particular, there is a
version of the meethod without the modes parameter, which is
probably the one you want. Honestly, I have no idea what the modes
are, though according to the doc they are "run loop modes". You can
probably find more about it by reading up about the run loop, if
you really want.
Thank you for the information
Mark.
Haris
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden