Skip navigation.
 
mlRe: Main Thread UI and Detached Thread
FROM : Ken Victor
DATE : Mon Mar 31 22:23:28 2008

At 1:08 PM -0700 3/31/08, <email_removed> wrote:
>Date: Mon, 31 Mar 2008 12:20:41 -0700
>From: Mike <<email_removed>>
>Subject: Re: Main Thread UI and Detached Thread
>To: Apple Cocoa List <<email_removed>>
>Message-ID: <47F13989.<email_removed>>
>Content-Type: text/plain; charset=ISO-8859-1; format=flowed
>
>I have two methods in the main thread that I call from the worker using
>performSelector, etc. The method for updating the progress bar for
>example looks like this:
>
>- (void)setProgressBarValue:(double)value
>{
>    if( progressBar )
>    {
>        [ progressBar setDoubleValue:value ];
>
>        [ progressBar setNeedsDisplay:YES ];
>
>        [ progressBar display ];
>    }
>}



are you calling:
   performSelectorOnMainThread:withObject:waitUntilDone:
(or one of its variants) passing in a selector for setProgressBarValue: ?

could it possibly be that setProgressBarValue: takes a double
argument, yet performSelector... expects an id for the withObject
parameter? thus, you have potential garbage being passed to your
setProgressBarValue method.

ken

Related mailsAuthorDate
mlMain Thread UI and Detached Thread Mike Mar 30, 20:55
mlRe: Main Thread UI and Detached Thread j o a r Mar 31, 18:36
mlRe: Main Thread UI and Detached Thread Hank Heijink (Mail… Mar 31, 18:48
mlRe: Main Thread UI and Detached Thread Mike Mar 31, 20:02
mlRe: Main Thread UI and Detached Thread Mike Mar 31, 20:06
mlRE: Main Thread UI and Detached Thread Andy Klepack Mar 31, 20:10
mlRe: Main Thread UI and Detached Thread j o a r Mar 31, 20:11
mlRe: Main Thread UI and Detached Thread Hank Heijink (Mail… Mar 31, 20:26
mlRe: Main Thread UI and Detached Thread Matt Mashyna Mar 31, 20:30
mlRe: Main Thread UI and Detached Thread Mike Mar 31, 21:15
mlRe: Main Thread UI and Detached Thread Mike Mar 31, 21:20
mlRe: Main Thread UI and Detached Thread Mike Mar 31, 21:25
mlRe: Main Thread UI and Detached Thread Mike Mar 31, 21:28
mlRe: Main Thread UI and Detached Thread j o a r Mar 31, 21:47
mlRe: Main Thread UI and Detached Thread j o a r Mar 31, 22:02
mlRe: Main Thread UI and Detached Thread Ken Victor Mar 31, 22:23
mlRe: Main Thread UI and Detached Thread Mike Apr 4, 09:06
mlRe: Main Thread UI and Detached Thread Mike Apr 4, 09:08
mlRe: Main Thread UI and Detached Thread j o a r Apr 4, 09:24
mlRe: Main Thread UI and Detached Thread Scott Ribe Apr 4, 16:12
mlRe: Main Thread UI and Detached Thread Shawn Erickson Apr 4, 22:29