mattgallagher / CwlViews

Wrappers around AppKit and UIKit, turning them into declarative, reactive-driven frameworks.
ISC License
168 stars 7 forks source link

App crashes when typing something into the UISearchBar sample #1

Closed 343max closed 5 years ago

343max commented 5 years ago

Simply removing searchText from the multiHandler call in searchBar(_, textDidChange) seems to resolve this issue, but this code is wayyyyyy over my head to even understand if this is a acceptable solution. (Although it seems to work)

mattgallagher commented 5 years ago

Hi @343max, thanks for letting me know.

The Binding was defined as (UISearchBar) -> Void but the underlying delegate method is (UISearchBar, String) -> Void so the force-cast that multiHandler does internally (to recover the handler function) was failing.

I've fixed the definition and the crash in f4438772381b054fa68a6cb04b0d226c023297f8