Problems with copy text

Bill Vlahos bvlahos at mac.com
Wed Nov 12 15:54:19 EST 2003


Thanks Klaus. That did it.

I modified the script to be able to do multiple lines.

     put empty into tCopy -- initialize tCopy
     repeat for each item tItem in (the hilitedLines of fld "Directory")
       put line tItem of field "Directory" & return after tCopy
     end repeat
     set clipboarddata["text"] to tCopy


Bill Vlahos

On Nov 12, 2003, at 11:59 AM, Klaus Major wrote:

> Hi Bill,
>
>> I have a list field which I populate with data and search. When a 
>> search entry is found in the field
>> I set the hilitedline of it so that the user sees a line found in 
>> addition to the outlined word.
>>
>> This looks fine but when I try to copy it nothing gets to the 
>> clipboard. If I click on the line
>> and select copy then the correct information goes to the clipboard.
>
> Really?
>
> Here nothing gets copied when i select a line in a listfield and do 
> "copy"...
>
>
> Anyway, you can do the "copy thingie" manually by adding these lines 
> where necessary:
>
> set clipboarddata["text"] to line (the hilitedlines of fld 
> "Directory") of fld "Directory"
>
> You get the picture...
>
>> Here is the find script which is the script of a field:
>>
>> local lineNumberFound
>> on keyDown
>>     find empty -- gets rid of the find box around text and resets 
>> find to the beginning
>>     pass keyDown
>> end keyDown
>> on keyUp
>>   find field "Search Text" in field "Directory"
>>   put the foundLine into lineNumberFound
>>   set the hilitedLine of field "Directory" to word 2 of 
>> lineNumberFound
>
> ## here,
>
>> end keyUp
>> on returnInField
>>   send mouseUp to button "Find Next"
>>   put the foundLine into lineNumberFound
>>   set the hilitedLine of field "Directory" to word 2 of 
>> lineNumberFound
>
> ##here...
>
>> end returnInField
>> on arrowKey theKey
>>   if theKey is "up" then put word 2 of lineNumberFound - 1 into 
>> lineNumberFound
>>   if theKey is "down" then put word 2 of lineNumberFound + 1 into 
>> lineNumberFound
>>   set the hilitedLine of field "Directory" to lineNumberFound -- 
>> actually hilite line
>
> ## and/or here...
> ## Works for me...
>
>>   --  put the "Line " & hilitedLine of field "Directory" into 
>> lineNumberFound -- "Line " is a dummy to get the number as 2nd word
>> end arrowKey
>>
>> Is there something else I need to set in the search to "really" 
>> select the line?
>
> No, should work this way...
>
>> Mac OS 10.3.1 Rev 2.1.2
>
> Dito :-)
>
> Hope this helps and hope i understood you right ;-)
>
>> Bill Vlahos
>
> Regards
>
> Klaus Major
> klaus at major-k.de
> www.major-k.de
>
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> http://lists.runrev.com/mailman/listinfo/use-revolution



More information about the use-livecode mailing list