Re: App modal window and secondary thread

2010-03-20 Thread Chris Hanson
On Mar 20, 2010, at 4:24 AM, Philippe Sismondi wrote: Had I not been compelled to support OS X 10.4 I would have re- written the whole thing to use something better than threads - GCD or NSOperationQueue capabilities are said to be safer, although I have not yet learned them. Let's nip

Re: App modal window and secondary thread

2010-03-20 Thread Philippe Sismondi
Thanks all. Those suggestions help. BTW, I inherited the code that does the offending "while" loop. It came from someone's previous attempt to solve exactly one problem: that the secondary thread might finish before the main thread's modal window was even up. I hope I have solved this by start

Re: App modal window and secondary thread

2010-03-19 Thread Andrew James
m Sent: Fri, March 19, 2010 3:35:40 PM Subject: Re: App modal window and secondary thread On Mar 19, 2010, at 2:31 PM, Philippe Sismondi wrote: > Right - that's exactly my question - I don't know that I have to do this > while loop. Is starting the thread after the window pops u

Re: App modal window and secondary thread

2010-03-19 Thread Jens Alfke
On Mar 19, 2010, at 2:31 PM, Philippe Sismondi wrote: Right - that's exactly my question - I don't know that I have to do this while loop. Is starting the thread after the window pops up enough? Is there anything about *not* waiting for NSApplication to set this window as its modal window

Re: App modal window and secondary thread

2010-03-19 Thread Philippe Sismondi
On 2010-03-19, at 4:56 PM, Jens Alfke wrote: > > On Mar 19, 2010, at 9:30 AM, Philippe Sismondi wrote: > >> while (![NSApp modalWindow]) // probably not thread-safe, but harmless?? >> NSLog(@"polling for modalWindow"); > > That's a bad idea, I think. You're making an assumption about

Re: App modal window and secondary thread

2010-03-19 Thread Jens Alfke
On Mar 19, 2010, at 9:30 AM, Philippe Sismondi wrote: while (![NSApp modalWindow]) // probably not thread-safe, but harmless?? NSLog(@"polling for modalWindow"); That's a bad idea, I think. You're making an assumption about NSApplication's implementation (I can think of severa