List Words from Textarea

Joe Lewis Wilkins pepetoo at cox.net
Thu Oct 14 00:01:08 CDT 2010


Hi Jim,

Thanks for the info. If this be the case, LC is really screwing around with things that could break MANY applications. I think I'll stay away from LC if this is an example of what is now being done to REV. Who is the crazy loon who decided to do this? VERY un-HyperTalkish!!!!!

Joe Wilkins.

On Oct 13, 2010, at 9:17 PM, Jim Ault wrote:

> Caution with this solution.
> The definition of a 'word' for LiveCode is not what you would normally think.
> 
> Spaces are not the only white space, and punctuation that is attached to the word is included as part of a word.
> 
> On Oct 13, 2010, at 4:30 PM, Jim Lambert wrote:
> 
>> Razvan wrote:
>>> 
>>> How can I list every word from a textarea?
>> 
>> First, welcome Razvan!
>> 
>> In addition to Pierre"s and Richmond's suggestions, here's a few:
>> 
>> function getWordList someText
>> 	replace space with cr in someText
>> 	return someText
>> end getWordList
>> 
>> function getUniqueWordList someText
>> 	repeat for each word w in someText
>> 	if w is not among the lines of uniqueWord then put w & cr after uniqueWords	
>> 	end repeat
>> 	-- AND JUST FOR THE HECK OF IT
>> 	sort uniqueWords
>> 	return uniqueWords
>> end getWordList
>> 
>> Jim Lambert
> 
> Jim Ault
> Las Vegas
> 
> 
> 
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution




More information about the use-livecode mailing list