-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Maybe delegate was already set in xib
or storyboard
and now it's being overwritten in code.
#675
Comments
Same problem here after upgrades to Cocoapods 1.0.0 and Xcode 7.3.1. |
Hi, guys! I don't think it a problem of Cocoapods Most likely you are using What it does is trying to create data source and subscribe to You just need to remove it from xib or |
@sergdort, you're right. It works setting datasource and delegate with nil in my viewDidLoad! But I still don't understand why this problem start occurring just after mentioned upgrades... Thanks! |
Hi guys, This is an assert that fires when you have a previous data source set to warn you that you might be breaking that originally set data source.
I'm kind of confused how to resolve this issue? This behavior is by design. |
Hi, @kzaher . It seems to me that a lot of people don't understand what is the problem within assert message . I saw some people asked the same question in the slack channel. May be we could somehow improve the message so it would be, more understandable. To kind of explaine why this a problem, because as far as I remember even if you creat |
How about this? assert(proxy.forwardToDelegate() === nil, "This is a feature to warn you that there is already a delegate (or data source) set somewhere previously. The action you are trying to perform will clear that delegate (data source) and that means that some of your features that depend on that delegate (data source) being set will likely stop working.\nIf you are ok with this, try to set delegate (data source) to |
This is just released. I think we can close it now. |
# By Krunoslav Zaher (23) and others # Via Krunoslav Zaher * 'master' of https://github.com/ReactiveX/RxSwift: (72 commits) Improves unit tests. Updates RxDataSources. Changes 2.5 to 2.5.0. Adds 2.5.0 changes to CHANGELOG. Makes `NSTextField` implement `RxTextInput`. Fixes Wikipedia automation tests. Improves delegate proxy messaging. ReactiveX#675 Turns off bitcode for RxTests. ReactiveX#584 Release 2.5 More comprensible `ActivityIndicator` Improve language in comment Use new Swift selector syntax in comment Update comment to use new non-deprecated method Fix argument key in comment Typo in comment 'extensions' with an 's' Improves documentation for `DelegateProxy.observe`. ReactiveX#654 Adds unit test for only setting different text values. Provides explanations for check. Fixes problems with two way binding that was caused by `rx_text` and always setting the text value even when the value was equal, and thus clearing the marked text state. ReactiveX#649 Add missing Next link ...
What if i still need access to |
@Bashta you would just use
|
Am using latest version of |
I have a similar issue, the TableView has no data source before binging. ViewModel Code is here Assertion failed: This is a feature to warn you that there is already a delegate (or data source) set somewhere previously. The action you are trying to perform will clear that delegate (data source) and that means that some of your features that depend on that delegate (data source) being set will likely stop working.
|
@ZZHHAANNGG Make sure the Table View doesn't have a delegate as well, not just a datasource attached. |
@freak4pc I am sure the TableView has no delegate and datasouce. I changed the |
Got to be some weird storyboard magic or UITableViewController defaults - using itself as a datasource and a delegate... |
I've ran into this same issue, I too believe it's a storyboard thing. I've just set |
As far as I understand you can just use a raw UIViewController or etc and dragndrop a tableview into it, which is different from using a UITableViewController which conveniently implements delegates and binds itself to the table for free. In the latter case you will need to explicitly set delegates to nil before using the Rx fun... |
UITableViewController takes over the dataSource in a way that can't be disconnected (AFAIK) via Storyboard - so in that case you'll need to manually set the dataSource to |
I had a similar crash. Long story short: I resolved performing the cleaning before setting the delegate.
Or in a
Hope this little hint can help someone. |
- Search navigator was implemented - Detail navigator was implemented - FIX into featured view controller - FIX results view controller needs to put datasource to nil to work correctly. (ReactiveX/RxSwift#675)
which delegate u set? i add programmatically tableView and now i can't set delegate... |
Thanks, man but the question was from Dec 27, 2016 XD |
ShareTableViewController: 0x7feda58d6330>)
for object ->
<UITableView: 0x7feda5136000; frame = (0 0; 375 667); clipsToBounds = YES; autoresize = W+H; gestureRecognizers = <NSArray: 0x7feda5a0a790>; layer = <CALayer: 0x7feda5a007e0>; contentOffset: {0, 0}; contentSize: {375, 307}>. Maybe delegate was already set in
xibor
storyboard` and now it's being overwritten in code.: file /Users/apple/Documents/luoye/lawyeruser/newLuoye/Pods/RxCocoa/RxCocoa/Common/DelegateProxyType.swift, line 199The text was updated successfully, but these errors were encountered: