• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Vending a proxy problems
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.


  • Follow-Ups:
    • Re: Vending a proxy problems
      • From: Ondra Cada <email@hidden>
  • Prev by Date: Re: how to get this type of regex matching happening (using AGRegex)?
  • Next by Date: Re: Undo with a field editor
  • Previous by thread: [Jop Opening] equinux seeks Cocoa Programmer
  • Next by thread: Re: Vending a proxy problems
  • Index(es):
    • Date
    • Thread