Re: modal windows (again)
Re: modal windows (again)
- Subject: Re: modal windows (again)
- From: Shawn Erickson <email@hidden>
- Date: Tue, 9 Mar 2004 12:39:25 -0800
On Mar 9, 2004, at 11:11 AM, Devon E Bowen wrote:
I don't see another option other than something really
complex like breaking things into threads or daughter processes.
Threads are your friend for this type of thing and not that hard to
implement in reality. I believe your product will be a much better
citizen as a result. No need for daughter processes.
With that said if you use some of the network services of Cocoa and
CoreFoundation they could take care of such thread / event management
for you. Using "NSModalPanelRunLoopMode" in NSFileHandle's
readInBackgroundAndNotifyForModes (etc.) should get the resulting event
to still be processed while app or window modal.
A while back I tried to get
info about doing non-blocking file writes and people thought I was
crazy.
Note it would be fairly trivial to write a
writeDataInBackgroundAndNotify method that spawned a worker thread. Put
it in a category against NSFileHandle and all your file handles benefit
from it in your application.
-Shawn
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.