Vending a proxy problems
Vending a proxy problems
- Subject: Vending a proxy problems
- From: Jonathan Wight <email@hidden>
- Date: Thu, 25 Mar 2004 14:44:20 -0500
I have a NSProxy subclass (semi inspired by NSProtocolChecker) that
redirects all messages to a target object. In the proxy's
forwardInvocation: method I perform some logic to test that the method
call is safe to invoke (I'm using the authentication manager to request
rights). In my test tool this works fine, the proxy catches the
message's invocation, performs the test and if the test succeeds
invokes the invocation.
So now I'm trying to use Distributed Objects to vend the protected
object over an NSConnection. Unfortunately there's a problem. The first
message my proxy gets isn't one I sent it, rather it gets a
"replacementObjectForPortCoder:" message. Once that message is received
no other messages get routed through my proxy and further messages are
sent directly to the target object!
As far as I can tell I'm not doing anything dramatically from
NSProtocolChecker so what gives? Anyone managed to do something like
this before?
Jon.
_______________________________________________
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.