Skip to content

Conversation

@kav
Copy link
Contributor

@kav kav commented Aug 6, 2014

Also updated the example and created a manager
to demonstrate the pattern.

ryuheechul and others added 4 commits July 7, 2014 15:31
for ReactiveCocoa rac_textSignal Support
Also updated the example and created a manager
to demonstrate the pattern.
add UIControlEventEditingChanged event
@sibljon
Copy link
Contributor

sibljon commented Aug 6, 2014

Thank you for the contribution, but an exception is raised when scrolling in the example project. The problem is that -[NSString hasPrefix:] is begin passed nil as an argument. Is there a way we can prevent this from happening?

@sibljon
Copy link
Contributor

sibljon commented Aug 6, 2014

Here's the exception I'm seeing:

screen shot 2014-08-06 at 12 36 55 pm

@kav
Copy link
Contributor Author

kav commented Aug 6, 2014

Weird. Can't seem to reproduce. Did you have anything entered or UI focused?
I can guard against the nil but I'd like to dig into why it's happening.

@sibljon
Copy link
Contributor

sibljon commented Aug 6, 2014

It happens to me when I scroll down, the back up, without having entered any text in the text fields.

It seems to be that the [UITextField resignFirstResponder] message is being sent while the text is nil. This is causing stringToLookFor to be nil in [stringToCompare hasPrefix:stringToLookFor].

I think guarding against stringToLookFor being nil is a good call, such that the return completionHandler(@""); line gets called in HTAsyncAutocompleteManager immediately thereafter.

Here's a screenshot that shows the stack trace:
screen shot 2014-08-06 at 1 02 12 pm

@sibljon sibljon mentioned this pull request Aug 6, 2014
kav added 4 commits August 6, 2014 17:03
Also updated the example and created a manager
to demonstrate the pattern.
…o pr_async

Conflicts:
	HTTextFieldAutocompletionExample/HTAutocompleteTextField.m
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.

3 participants