rtf Txt

Frank D. Engel, Jr. fde101 at fjrhome.net
Mon Oct 25 09:04:38 EDT 2004


And of course this creates numerous race conditions, whereby if the 
user happens to try accessing the clipboard from another app while this 
is going on, the results of one of the operations (either the operation 
being performed by the handler, or the one being performed by the other 
app) will be incorrect (or at least quite unexpected):

>  put the clipboardData into myVar
-- user pastes into the clipboard from another app here, we now restore 
the wrong data at the end of this code block
>   put URL ("file:" & pathtoRtfText) into txvariable
-- same is true here
>   set the clipboardData["rtf"] to txvariable
>   put the clipboardData["text"] into txvariable
>   set the clipboardData to myVar

>  put the clipboardData into myVar
>   put URL ("file:" & pathtoRtfText) into txvariable
>   set the clipboardData["rtf"] to txvariable
-- user pastes into the clipboard from another app here, the results of 
this code block are now wrong
>   put the clipboardData["text"] into txvariable
>   set the clipboardData to myVar

>  put the clipboardData into myVar
>   put URL ("file:" & pathtoRtfText) into txvariable
>   set the clipboardData["rtf"] to txvariable
-- user copies from the clipboard here, does not get what he expects to
>   put the clipboardData["text"] into txvariable
-- same is true here
>   set the clipboardData to myVar


On Oct 24, 2004, at 6:26 PM, Jeanne A. E. DeVoto wrote:

> At 2:03 PM +0200 10/24/2004, Klaus Major wrote:
>>> Tip:  If the field you're using for converting text is on a card 
>>> that isn't open you'll get a performance boost of about 80% for that 
>>> operation.
>>
>> or simply let the system do the work via the clipboard :-)
>>
>> ...
>> put URL ("File:"&pathtoRtfText) into txvariable
>> set the clipboarddata["rtf"] to txvariable
>> put the clipboarddata["text"] into txvariable
>
> ...but then you have toasted the user's clipboard data, which is less 
> good ;-). So it might be a good idea to save the clipboard in a 
> variable first:
>
>  put the clipboardData into myVar
>   put URL ("file:" & pathtoRtfText) into txvariable
>   set the clipboardData["rtf"] to txvariable
>   put the clipboardData["text"] into txvariable
>   set the clipboardData to myVar
>
> -- 
> jeanne a. e. devoto ~ revolution at jaedworks.com
> http://www.jaedworks.com
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> http://lists.runrev.com/mailman/listinfo/use-revolution
>
>
-----------------------------------------------------------
Frank D. Engel, Jr.  <fde101 at fjrhome.net>

$ ln -s /usr/share/kjvbible /usr/manual
$ true | cat /usr/manual | grep "John 3:16"
John 3:16 For God so loved the world, that he gave his only begotten 
Son, that whosoever believeth in him should not perish, but have 
everlasting life.
$



___________________________________________________________
$0 Web Hosting with up to 120MB web space, 1000 MB Transfer
10 Personalized POP and Web E-mail Accounts, and much more.
Signup at www.doteasy.com



More information about the use-livecode mailing list