Skip navigation.
 
mlRe: Threads, Distributed Objects, and NSUndoManager
FROM : John C. Daub
DATE : Sun Oct 17 03:24:04 2004

on 10/16/04 5:50 PM, m at <email_removed> wrote:

>> My guess is because the data object I'm
>> actually given isn't the real data object but instead an NSProxy
>> version of the object...

>
> I think your guess is right on.


It's interesting that I've been unable to find any documentation
specifically about this topic. But from what documentation I can find and
piece together, I'm pretty sure this is the problem.

> You don't need to use DO, though it is sometimes more convenient. You


Can you elaborate on this?

If I don't need to use DO, then under what circumstances would I want to use
DO? And in terms of convenience, what exactly is it making more convenient
and how so?

> just need to ensure that your threads aren't accessing your data object
> at "at the same time".


Right. And actually this is pretty much the case for me. So I guess I can
get away with removing the use of ThreadWorker and just using a straight
NSThread.

> Here's a strategy: have your main thread allocate the data object and
> pass it to your worker thread (without retaining a reference to it),


Why would I not want to retain a reference to it? And what would happen if I
did?

> then you can just have the worker thread hand it back when it's done
> (perhaps by calling
> performSelectorOnMainThread:withObject:waitUntilDone: on some suitable
> selctor).
>
> something like this (typed in mail, not tested, obviously)


[code snipped]

Ok, I see what you're getting at. I can give that a try.

Thanx. :-)

--
John C. Daub }:-)>=
<mailto:<email_removed>> <http://www.hsoi.com/>
"Lemon curry?"

Related mailsAuthorDate
mlThreads, Distributed Objects, and NSUndoManager John C. Daub Oct 16, 21:40
mlRe: Threads, Distributed Objects, and NSUndoManager m Oct 17, 00:50
mlRe: Threads, Distributed Objects, and NSUndoManager John C. Daub Oct 17, 03:24
mlRe: Threads, Distributed Objects, and NSUndoManager m Oct 17, 03:47
mlRe: Threads, Distributed Objects, and NSUndoManager John C. Daub Oct 17, 04:43