Programming multi line selections
Eric Chatonet
eric.chatonet at sosmartsoftware.com
Wed Jul 6 17:05:49 EDT 2005
Hi Rob,
When you select a line in a repeat loop, only the last found line
will appear selected :-)
Try to parse the lines by number and set the hilitedLines at the end:
put 0 into LineNo
repeat for each line peptide in card field "audit"
add 1 to LineNo
if char -1 of peptide = "K" then put LineNo & comma after
tHilitedLines
end repeat
delete char -1 of tHilitedLines
set the hilitedLines of field "audit" to tHilitedLines
Le 6 juil. 05 à 22:53, Rob Beynon a écrit :
> I have a small problem that is driving me nuts..
>
> I have a series of lines in a field, and I want to program the
> selection of those lines according to the last character of the
> line...I wrote a button script thus...
>
> on mouseUp
> select empty
> put 0 into LineNo
> repeat for each line peptide in card field "audit"
> add 1 to LineNo
> if char(length(peptide)-1) of peptide = "K" then select line
> LineNo of field "audit"
> end repeat
> end mouseUp
>
>
> I've also tried setting the selected of line lineNo to true
> and setting the hilitedLine to lineNo
Best Regards from Paris,
Eric Chatonet.
----------------------------------------------------------------
So Smart Software
For institutions, companies and associations
Built-to-order applications: management, multimedia, internet, etc.
Windows, Mac OS and Linux... With the French touch
Free plugins and tutorials on my website
----------------------------------------------------------------
Web site http://www.sosmartsoftware.com/
Email eric.chatonet at sosmartsoftware.com/
Phone 33 (0)1 43 31 77 62
Mobile 33 (0)6 20 74 50 86
----------------------------------------------------------------
More information about the use-livecode
mailing list