'un-style' clipboard text...

J. Landman Gay jacque at hyperactivesw.com
Tue Mar 2 12:21:05 EST 2004


Oh wait -- I was wrong, and I see what you mean now, Richard. Chipp is 
doing the paste/replace operation all at once.

In that case, he can still do it in one line, like this:

  put the clipboardData["text"] into the selection

There, I think that's it.


On 3/2/04 11:12 AM, J. Landman Gay wrote:

> On 3/2/04 10:23 AM, Richard Gaskin wrote:
>>> This does too:
>>>
>>>   set the textstyle of the selection to "plain"
>>>
>>> It is both shorter and retains the selection and the scroll. No need 
>>> to save and re-select.
>>
>>
>>
>> Since this is happening in a paste operation, wouldn't you need to 
>> first get the offset to the beginning of the selection, count the 
>> length of the clipboard contents, and set the selection accordingly 
>> before running that line?
>>
> 
> Chipp said he was selecting text before pasting, and the paste was meant 
> to replace the selection. So, he can do it all in one line.
> 
> I didn't address how he is capturing the paste operation -- but I think 
> he's already got that part, since he had a handler called "pasteIt" that 
> dealt with the text after it was already inserted.
> 


-- 
Jacqueline Landman Gay         |     jacque at hyperactivesw.com
HyperActive Software           |     http://www.hyperactivesw.com


More information about the use-livecode mailing list