Threads Question

2010-03-17 Thread Philippe Sismondi
I am hoping to add some functionality to an existing open source app (Skim) that uses threads for fairly simple purposes. (I believe Grand Central Dispatch etc. are not an option - I don't know whether this would be useful anyway as I have not learned about GCD.) I have read the Threading Progr

App modal window and secondary thread

2010-03-19 Thread Philippe Sismondi
This is related to an earlier post of mine, but I think it warrants a new subject. I may be expecting others to sort out my potential race conditions, but I don't think so. The essential point here is that I need to know the relationship between a window becoming "key" and that same window being

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,

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

Question Re Memory Management in Apps

2010-03-09 Thread Philippe Sismondi
I have just finished reading the Memory Management Programming Guide for Cocoa. I am also working my way through the Hillegass book on Cocoa. There is something that is puzzling me that probably involves autorelease pools. Or else I am hopelessly confused in some other way. I have created a tri

Re: Question Re Memory Management in Apps

2010-03-09 Thread Philippe Sismondi
On 2010-03-09, at 2:01 PM, David Duncan wrote: > On Mar 8, 2010, at 7:44 PM, Philippe Sismondi wrote: > >> Here is my AppController's init method, in which instanceObj is set to an >> autoreleased MadeObj: >> > >> In other words, the MadeObj instance