Skip to content
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

Added optional async to Autocomplete Datasource #34

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

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