Skip to content

Commit

Permalink
Merge pull request #56 from neilpa/rac4-alpha3
Browse files Browse the repository at this point in the history
Update RAC to 4.0-alpha.3
  • Loading branch information
neilpa committed Oct 25, 2015
2 parents 71263b2 + 268e4f2 commit 6adcc64
Show file tree
Hide file tree
Showing 10 changed files with 17 additions and 18 deletions.
2 changes: 1 addition & 1 deletion Cartfile
Original file line number Diff line number Diff line change
@@ -1 +1 @@
github "ReactiveCocoa/ReactiveCocoa" "v4.0.0-alpha.2"
github "ReactiveCocoa/ReactiveCocoa" "v4.0.0-alpha.3"
4 changes: 2 additions & 2 deletions Cartfile.resolved
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
github "antitypical/Result" "0.6.0-beta.3"
github "ReactiveCocoa/ReactiveCocoa" "v4.0.0-alpha.2"
github "antitypical/Result" "0.6.0-beta.5"
github "ReactiveCocoa/ReactiveCocoa" "v4.0.0-alpha.3"
2 changes: 1 addition & 1 deletion Source/AppKit/NSTextField.swift
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import ReactiveCocoa
import AppKit

extension NSTextField {
/// only changes from UI will be produced here
/// Sends the field's string value whenever it changes.
public var rex_textSignal: SignalProducer<String, NoError> {
return NSNotificationCenter.defaultCenter()
.rac_notifications(NSControlTextDidChangeNotification, object: self)
Expand Down
1 change: 0 additions & 1 deletion Source/Foundation/Association.swift
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@ public func associatedObject<T: AnyObject>(host: AnyObject, key: UnsafePointer<(
if value == nil {
value = initial()
objc_setAssociatedObject(host, key, value, .OBJC_ASSOCIATION_RETAIN)
// objc_setAssociatedObject(host, key, value, objc_AssociationPolicy())
}
return value!
}
2 changes: 1 addition & 1 deletion Source/Foundation/NSData.swift
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ extension NSData {
observer.sendNext(data)
observer.sendCompleted()
} catch {
observer.sendError(error as NSError)
observer.sendFailed(error as NSError)
}
}
}
Expand Down
10 changes: 5 additions & 5 deletions Source/Signal.swift
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ extension SignalType {
if let val = transform(value) {
observer.sendNext(val)
}
}, error: { error in
observer.sendError(error)
}, failed: { error in
observer.sendFailed(error)
}, completed: {
observer.sendCompleted()
}, interrupted: {
Expand All @@ -38,7 +38,7 @@ extension SignalType {
switch event {
case let .Next(value):
observer.sendNext(value)
case .Error:
case .Failed:
observer.action(replacement)
case .Completed:
observer.sendCompleted()
Expand Down Expand Up @@ -80,8 +80,8 @@ extension SignalType where Value: SequenceType {
switch event {
case let .Next(sequence):
sequence.forEach { observer.sendNext($0) }
case let .Error(error):
observer.sendError(error)
case let .Failed(error):
observer.sendFailed(error)
case .Completed:
observer.sendCompleted()
case .Interrupted:
Expand Down
6 changes: 3 additions & 3 deletions Source/SignalProducer.swift
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ extension SignalProducerType {

group!.sendNext(value)

}, error: { error in
observer.sendError(error)
groups.values.forEach { $0.sendError(error) }
}, failed: { error in
observer.sendFailed(error)
groups.values.forEach { $0.sendFailed(error) }

}, completed: { _ in
observer.sendCompleted()
Expand Down
4 changes: 2 additions & 2 deletions Tests/SignalTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ final class SignalTests: XCTestCase {
sink.sendNext(1)
XCTAssertFalse(completed)

sink.sendError(.Default)
sink.sendFailed(.Default)
XCTAssertTrue(completed)
}

Expand All @@ -65,7 +65,7 @@ final class SignalTests: XCTestCase {
sink.sendNext(1)
XCTAssertFalse(interrupted)

sink.sendError(.Default)
sink.sendFailed(.Default)
XCTAssertTrue(interrupted)
}

Expand Down

0 comments on commit 6adcc64

Please sign in to comment.