Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added forwardingTarget method to be used as a fallback #1503

Closed

Conversation

zulkis
Copy link

@zulkis zulkis commented Nov 23, 2017

Used standard forwarding method forwardingTargetForSelector: from NSObject in order to forward unrecognized messages first directly to the original delegate.

Used standard forwarding method forwardingTargetForSelector: from NSObject in order to forward unrecognized messages first directly to the original delegate.
@zulkis
Copy link
Author

zulkis commented Nov 23, 2017

Opened as an output from
pixeldock/RxAppState#11

@zulkis
Copy link
Author

zulkis commented Nov 23, 2017

Interesting that tests are failing with such a changes...

@kzaher
Copy link
Member

kzaher commented Nov 26, 2017

Hi @zulkis ,

we already have forwarding implemented.

-(void)forwardInvocation:(NSInvocation *)anInvocation {
    BOOL isVoid = RX_is_method_signature_void(anInvocation.methodSignature);
    NSArray *arguments = nil;
    if (isVoid) {
        arguments = RX_extract_arguments(anInvocation);
        [self _sentMessage:anInvocation.selector withArguments:arguments];
    }
    
    if (self._forwardToDelegate && [self._forwardToDelegate respondsToSelector:anInvocation.selector]) {
        [anInvocation invokeWithTarget:self._forwardToDelegate];
    }

    if (isVoid) {
        [self _methodInvoked:anInvocation.selector withArguments:arguments];
    }
}

so I'm not sure why did you make that change.

Could you maybe provide a short example that demonstrates what issue are you trying to fix and how does this fix it?

@freak4pc
Copy link
Member

I'm closing this for the time being. I agree with @kzaher this is a bit of a strange addition given we already provide forwarding capabilities. That added with no reply for over 2 years feels like a good time to close this. Thank you!

@freak4pc freak4pc closed this Dec 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants