Creating a Search Field

Gregory Lypny gregory.lypny at videotron.ca
Sun Apr 27 16:59:43 EDT 2008


Jacqueline, for me, if it were only just this list.

And thank you for the variation, André.  I'll put it up beside what  
I've got and perhaps nab the best of both.

	Gregory

	Montreal


On Sun, Apr 27, 2008, at 1:00 PM, Jacqueline replied:

>
> Gregory Lypny wrote:
>> Thank you Jacqueline,
>>
>> How embarrassing.  I just read the fine print at the bottom of the
>> keyDown entry in the Rev dictionary.  No excuse for my oversight.  I
>> think I also found the answer to the Delete key issue there too.
>
> I wish I had a nickle for every time I've embarrassed myself on the  
> list. :)
>
> -- 
> Jacqueline Landman Gay         |     jacque at hyperactivesw.com


And so did André:

> Hello Gregory,
> If I well understand your aim, you could be interested in adapting the
> search device I programmed thanks to very good advices from Éric
> Chatonnet (as always :-)).
> By the way, his tutorial "How to Master Users Data in Entry Boxes"
> might interest you; you can find it on his site :
> http://www.sosmartsoftware.com/
>
>
> I have three fields :
> - one is the list to be searched in (say "bigList") -- this field
> could have its visible property set to false
> - a second is a one line field where the user write what he/she is
> searching for (say "entry")
> - the third is a field where the results of the search appears (say,
> "results")
>
> the script of the  field "entry" is as follow :
>
> local mySubList,
> ---------------------
>
> ON rawkeyUp
>    find empty
>     REPEAT
>       find fld "entry" in fld "bigList" of this cd
>       IF the result is "not found" THEN exit repeat
>       ELSE
>       put value(the foundline) & cr after mySubList
>       END IF
>     END repeat
>     put empty into fld "results"
>     put mySubList into fld "results"
>     select char 2 to -1 of line 1 of fld "results"
>     select after fld "entry"
>     put empty into mySubList
> END rawkeyUp
>
> ON returnInField
> -- here do what you want with the found word
> (I use the found word to find a corresponding card in another stack)
> END returnInField
>
> 	
> HTH
>
> Best regards from Grenoble
> André



More information about the Use-livecode mailing list