• 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
Re: double forwarding problem
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: double forwarding problem


  • Subject: Re: double forwarding problem
  • From: Jakob Olesen <email@hidden>
  • Date: Sat, 4 Nov 2006 18:18:00 +0100


On 04/11/2006, at 1.07, Ivan Kourtev wrote:

The problem is that methodSignatureForSelector is sent before forwardInvocation so I don't have a chance to simply change the invocation target. At this point, the only thing that comes to mind is to change the implementation of - [B methodSignatureForSelector] to check whether B responds to the selector (as in the example at the end). But then what do I return if I find out that respondsToSelector is YES? I can't return [self methodSignatureForselector:selector] because it will start calling itself recursively.

This is the right thing to do, and you can call [super methodSignatureForselector:selector] to get the original (NSObject) implementation.


Is this kind of double forwarding a bad idea in principle or am I missing some [hopefully more elegant] way to resolve this?

It is a quite complicated thing to do, but certainly possible. You don't say which problem you are trying to solve, so it is difficult to give you advise about better solutions.



_______________________________________________ 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
  • Follow-Ups:
    • Re: double forwarding problem
      • From: Ivan Kourtev <email@hidden>
References: 
 >double forwarding problem (From: Ivan Kourtev <email@hidden>)

  • Prev by Date: Is it possible to figure out if "File Vault" is in use?
  • Next by Date: Re: Oracle Classes using the OCI?
  • Previous by thread: double forwarding problem
  • Next by thread: Re: double forwarding problem
  • Index(es):
    • Date
    • Thread