Hi,
I'm creating an application which uses an NSTokenField. I need autocompletion. I'm using an NSURLRequest to request data from http://stackoverflow.com/filter/tags?_=<timestamp>&limit=6&q=<str_to_autocomplete>&timestamp=<timestamp>
Where <timestamp>
is the current timestamp, an <str_to_autocomplete>
is the string to autocomplete. So, e.g. http://stackoverflow.com/filter/tags?_=1263657227137&q=lol&limit=6&timestamp=1263657227137
The response is in this format:
javascript|23179
jquery|16936
sql-server|11768
ruby-on-rails|8669
best-practices|7037
ruby|6722
(The number is the number of times this tag is used).
I need to give provide the user a list under the NSTokenField with this list of tags, and the user can either select one of the list, or continue typing.
Can anyone help me? Thanks.
Edit: I'm looking at Mac Dev Center now. Should I use this method: tokenField:completionsForSubstring:indexOfToken:indexOfSelectedItem:
?