Searchfield with autocomplete?

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
cu3e
Posts: 46
Joined: Mon May 23, 2011 10:03 am

Searchfield with autocomplete?

Post by cu3e » Thu Jul 11, 2013 9:45 am

Hello, I want to create a searchable presentation app. The app contains 10 slides. I want to use tagwords for some slides.
For example SLIDE 5 has the tagword "processing". When I type into the search field "pro" the autocomplete should Identify or guess
my word and should suggest me "processing" (since there is a slide with that tagword) When I now click on that processing word, the
correct Slide 5 will be shown.

Ist that possible in Livecode?

If yes, is there a trainer I can book so I can learn how to programme it or a freelancer who would programme the basis?

Thank you!

shaosean
Posts: 906
Joined: Thu Nov 04, 2010 7:53 am

Re: Searchfield with autocomplete?

Post by shaosean » Thu Jul 11, 2013 11:20 am

Yes you can do that.. I believe someone had written an auto-complete combo box..

cu3e
Posts: 46
Joined: Mon May 23, 2011 10:03 am

Re: Searchfield with autocomplete?

Post by cu3e » Thu Jul 11, 2013 3:48 pm

awesome! Thank you. Anybody can point me into the right direction?

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7389
Joined: Sat Apr 08, 2006 8:31 pm
Contact:

Re: Searchfield with autocomplete?

Post by jacque » Thu Jul 11, 2013 7:19 pm

In its simplest form, this isn't hard to do.

Create a list of all the keyword tags and store them as a custom property called "cTags" of the field. Then put this script into the text entry field:

Code: Select all

on rawKeyUp pKey
  put me into tString
  if tString <> "" then
    put the cTags of me into tLookups
    filter tLookups with (tString & "*")
    put tLookups into fld "suggestions"
  else
    put "" into fld "suggestions"
  end if
end rawKeyUp
Provide a second field named "suggestions" where the found matches can be displayed. Or you can just put the matches into a variable and do something else with it.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

cu3e
Posts: 46
Joined: Mon May 23, 2011 10:03 am

Re: Searchfield with autocomplete?

Post by cu3e » Fri Jul 12, 2013 8:05 pm

Thank you Jacque. Do you offering freelancer programming?

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7389
Joined: Sat Apr 08, 2006 8:31 pm
Contact:

Re: Searchfield with autocomplete?

Post by jacque » Fri Jul 12, 2013 8:27 pm

I do, but I'm pretty booked up right now. But you can use the email address in my signature to drop me a line and we can talk.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

Post Reply