Hello everyone,
I created an autofill function for a text response as part of an instructional game that one of my students at the University of Georgia is currently making.
I think it is pretty cool and I've not seen any other postings about such a function in any of the forums.
To learn more about it and to get a demo file with code that you are more than welcome to take and adapt, go to my blog entry where I write about it:
http://learninglivecode.blogspot.com/20 ... entry.html
(And, if just one person accesses my blog, you will have increased my readership by 100%.)
Lloyd Rieber
Autofill for Text Entry Responses
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Re: Autofill for Text Entry Responses
Hi.
The next person in will only increase your readership by 50%.
You have made what I always referred to as a binary search, not really an autofill. When I get home tonight I will post a handler I used on a recent project. It handles deletes.
Craig Newman
The next person in will only increase your readership by 50%.
You have made what I always referred to as a binary search, not really an autofill. When I get home tonight I will post a handler I used on a recent project. It handles deletes.
Craig Newman
Re: Autofill for Text Entry Responses
Lloyd,
Your readership increased by 50%.
It strikes me that you don't use the filter command.
kind regards,
Mark
Your readership increased by 50%.
It strikes me that you don't use the filter command.
kind regards,
Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
Re: Autofill for Text Entry Responses
Hi again.
Make a field "outPutField" and another field to enter the text to find. I had this in the entry field script:
"yourList" is a return delimited list of text. You will see that as you type, matches appear, and are winnowed as more chars are entered. Deleting chars reverses the process. This can be modified as needed.
But Mark makes a point. The "filter" command has much power within it.
Craig Newman
Make a field "outPutField" and another field to enter the text to find. I had this in the entry field script:
Code: Select all
on keyDown var
put var after me
if the length of me > 2 then put revFullFind(me,yourList) into fld "outputField"
else put "" into fld "outputField"
end keyDown
on backspacekey
delete the last char of me
send "keydown" to me
end backspacekey
function revFullFind tFind,tData
repeat for each line tLine in tData
if tFind is in tLine then put tLine & return after temp
end repeat
return char 1 to -2 of temp
end revFullFind
But Mark makes a point. The "filter" command has much power within it.
Craig Newman
Re: Autofill for Text Entry Responses
Craig and Mark,
Many thanks for your posts. I did not know about the "filter" command.
And, just adding the on backspacekey code makes my own program now function properly.
@Mark: I took a look at your new book. I'll be buying a copy to review -- it may be perfect for some of the courses I teach here at the University of Georgia.
Lloyd
Many thanks for your posts. I did not know about the "filter" command.
And, just adding the on backspacekey code makes my own program now function properly.
@Mark: I took a look at your new book. I'll be buying a copy to review -- it may be perfect for some of the courses I teach here at the University of Georgia.
Lloyd