Re: What's the difference between [NSOperationQueue currentQueue] and performSelectorOnMainThread (iOS platform)

2013-02-05 Thread Steve Sisak
At 8:13 AM -0800 2/5/13, Glenn L. Austin wrote: I understand the *reasoning* behind performSelector:withObject:afterDelay:, but I've banned that from code I work on. In the OP's case, I think he just needs to perform the selector asynchronously so he doesn't deadlock -- waitUntilDone:NO ought

Re: What's the difference between [NSOperationQueue currentQueue] and performSelectorOnMainThread (iOS platform)

2013-02-05 Thread Glenn L. Austin
On Feb 4, 2013, at 8:58 AM, Kyle Sluder wrote: > On Sun, Feb 3, 2013, at 11:58 PM, 尹佳冀 wrote: >> Thanks Mike seem You are right, and I write like this >> >> [self performSelector:@selector(doTheThing) withObject:nil >> afterDelay:0.5]; >> it can work correctly. > > Magic constants like this ar

Re: What's the difference between [NSOperationQueue currentQueue] and performSelectorOnMainThread (iOS platform)

2013-02-04 Thread Steve Sisak
At 3:58 PM +0800 2/4/13, õöâ¿ôb wrote: Thanks Mike seem You are right, and I write like this [self performSelector:@selector(doTheThing) withObject:nil afterDelay:0.5]; it can work correctly. And thanks for your suggestion I suspect that if you change > >//Case 3 hang up, HUD not s

Re: What's the difference between [NSOperationQueue currentQueue] and performSelectorOnMainThread (iOS platform)

2013-02-04 Thread Kyle Sluder
On Sun, Feb 3, 2013, at 11:58 PM, 尹佳冀 wrote: > Thanks Mike seem You are right, and I write like this > > [self performSelector:@selector(doTheThing) withObject:nil > afterDelay:0.5]; > it can work correctly. Magic constants like this are evil and are a serious indicator of poor programming practi

Re: What's the difference between [NSOperationQueue currentQueue] and performSelectorOnMainThread (iOS platform)

2013-02-04 Thread 尹佳冀
Thanks Mike seem You are right, and I write like this [self performSelector:@selector(doTheThing) withObject:nil afterDelay:0.5]; it can work correctly. And thanks for your suggestion 2013/2/3 Mike Abdullah > > On 3 Feb 2013, at 07:41, 尹佳冀 wrote: > > > Hi All > > > > Does anyone can know what

Re: What's the difference between [NSOperationQueue currentQueue] and performSelectorOnMainThread (iOS platform)

2013-02-03 Thread Mike Abdullah
On 3 Feb 2013, at 07:41, 尹佳冀 wrote: > Hi All > > Does anyone can know what the difference between [NSOperationQueue > currentQueue] and > performSelectorOnMainThread, If I do some work use operation > on [NSOperationQueue mainQueue], the UI will not hang up, but if i > use performSelectorOnMain

What's the difference between [NSOperationQueue currentQueue] and performSelectorOnMainThread (iOS platform)

2013-02-02 Thread 尹佳冀
Hi All Does anyone can know what the difference between [NSOperationQueue currentQueue] and performSelectorOnMainThread, If I do some work use operation on [NSOperationQueue mainQueue], the UI will not hang up, but if i use performSelectorOnMainThread the UI will hang up - (void) doTheThing { /