Re: id type used as token and Distributed Objects
Re: id type used as token and Distributed Objects
- Subject: Re: id type used as token and Distributed Objects
- From: Andrew Kimpton <email@hidden>
- Date: Mon, 1 Oct 2007 14:12:38 -0400
On Sep 30, 2007, at 10:56 PM, I wrote:
I have a protocol :
@protocol RSActivityDisplay
- (id) createActivity;
- (void) endActivity:(id)activityToken;
- (void) setActivity:(id)activityToken infoString:
(NSString*)inInfoString;
@end
And two processes (client and server if you like) where the protocol
is used via Distributed Objects. The (id) value returned by
createActivity is an internal class to the server that I have no
desire to expose.
Well... it was a little late when I wrote this (in my defense). The
solution to this is pretty trivial - instead of returning/using the
(id) type just return/use (size_t) type instead. DO will pass this
unchanged (since it's a base C type). I can just cast the value back
(C Style) to what I know it to truly be, and I'm guaranteed to be 64
bit safe since size_t tracks the pointer size.
Andrew 8-)
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden