Re: Threads, Distributed Objects, and NSUndoManager
Re: Threads, Distributed Objects, and NSUndoManager
- Subject: Re: Threads, Distributed Objects, and NSUndoManager
- From: "John C. Daub" <email@hidden>
- Date: Sat, 16 Oct 2004 20:24:04 -0500
on 10/16/04 5:50 PM, m at email@hidden 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@hidden> <
http://www.hsoi.com/>
"Lemon curry?"
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden