How to make DO not do transformations
How to make DO not do transformations
- Subject: How to make DO not do transformations
- From: Mike Laster <email@hidden>
- Date: Tue, 24 Sep 2002 14:27:51 -0400
Is there a clean way to make DO not do any transformations to the
arguments? This is DO between threads, not between
processes or hosts.
If I have a method:
- (void) doSomethingWithObject:(NSObject *)anObject;
The default behavior is for the recevier to get an NSProxy that refers
to anObject.
I can make a protocol and specify 'bycopy' to make the receiver receive
a real object instead of a proxy, but it's still a different
object.
The only way I've found to do it is to alias the argument to an
unsigned long, and then unalias it in the method:
- (void) doSomethingWithAliasedObject:(unsigned long)anAliasedObject
{
NSObject *anObject = (NSObject *)anAliasedObject;
}
and the caller would be calling:
[self doSomethingWithObject:(unsigned long)localObject];
While this works, I figured there has to be a cleaner way to do it.
_______________________________________________
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.