Confused about Distributed Objects
Confused about Distributed Objects
- Subject: Confused about Distributed Objects
- From: Ivan Kourtev <email@hidden>
- Date: Wed, 5 Apr 2006 21:03:44 -0400
Hi,
I am a little confused about return values in DO. I am using DO for
inter-thread communication within the same app. I assume that all
thread of the same app share the app's address space, correct?
Let's say I have a class foo like this:
@interface foo : NSObject {
NSString *aName;
}
- (NSString*)aName;
and an instance of foo lives in thread A. From thread B, where I
have a DO proxy for foo, I do something like this:
id *s = [fooProxy aName];
[s retain];
This seems to be all working fine. If I check the class of s it is
NSCFString and not NSDistantObject.
Now, as I understand it from the DO documentation, typically you get
an NSDistantObject back...and this is indeed what I get for fooProxy
in my app above when I set up the connection between the threads.
Did I just get a real NSCFString because the link is between two
threads in the same app?
If fooProxy lived in a diferent app/process, would I have gotten an
NSDistantObject as a result of the assignment id *s = [fooProxy
aName]; ? I know I'll (inevitably) have to try it at some point,
just curious as to whether I am understanding the DO concepts correctly.
Thanks for any insights.
-- ivan
P.S. On a separate note, DO seems like a wonderful technology and has
allowed me to do some really cool stuff with little, tight code (no
hacks). I wish the documentation was a little more abundant and less
incomprehensible. If anyone can recommend a good tutorial that
doesn't just copy random snippets of Apple's docs I'd appreciate it.
Haven't been able to find any.
_______________________________________________
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