Skip to content

Conversation

andersio
Copy link
Member

@andersio andersio commented Nov 7, 2016

Includes #3285.

Test coverage is limited.

This PR adds NSObject.reactive.signal(for:from:), which returns a signal that emits a collection of bridged arguments [Any?] after every invocation of the selector.

It relies on the the NSNumber and NSValue bridging introduced in Swift 3.0.1 to bridge values.

  • NSInvocation & NSMethodSignature wrapper
  • A working prototype
  • Bridge numbers as NSNumber instead of Swift built-in types.
  • Bridge structs and other unsupported arguments as NSValue.
  • Full test coverage on the numeric types and reference types.
  • Ported suitable test cases from ReactiveObjC.

@andersio andersio added this to the 5.0 milestone Nov 7, 2016
@andersio andersio removed this from the 5.0 milestone Nov 7, 2016
@andersio andersio changed the title [WIP] Selector interception with arguments. Selector interception with arguments. Nov 7, 2016
@andersio andersio added this to the 5.0 milestone Nov 7, 2016
@andersio
Copy link
Member Author

andersio commented Nov 7, 2016

Oops, Travis isn't on Swift 3.0.1 yet.

travis-ci/travis-ci#6791

@andersio
Copy link
Member Author

andersio commented Nov 11, 2016

Had thought about emitting tuples. But IMO it doesn't add much in terms of type safety, since we cannot constraint against #selector.

@andersio
Copy link
Member Author

andersio commented Nov 16, 2016

The disabled test cases in fe2f27c would be reenabled when changes in ReactiveCocoa/ReactiveObjC#33 is ported back.

@andersio andersio closed this Nov 18, 2016
@andersio andersio deleted the trigger-arguments branch November 18, 2016 02:47
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.

1 participant