rtf Txt

Frank D. Engel, Jr. fde101 at fjrhome.net
Tue Oct 26 08:46:09 EDT 2004

Perhaps not in normal practice, but put it on a slower machine with a 
heavy CPU load, watch when the script causes a delay while loading 
pages from a disk which is being used simultaneously by other tasks, 
and some other program which makes similar faulty assumptions kicks in 
and makes the clipboard modifications while yours is in the middle of 

These are bad assumptions to make, regardless of system speed.  I guess 
this is my Operating Systems course from college peeking out...   It's 
a bad idea to *ever* use the clipboard in this way if it can at all be 
avoided.  If the program is for internal use and the issues are 
understood, this might be considered an acceptable risk, but it is not 
in any way necessary, so if the program is being built for distribution 
outside of the company, please consider an alternate method to do this, 
such as working through a field.  There is plenty of bad software out 
there now, made worse by these kinds of assumptions.  It's a bad habit 
to get into.

The field is limited to your single thread, but the clipboard is not.

On Oct 25, 2004, at 9:36 PM, Jeanne A. E. DeVoto wrote:

> At 9:04 AM -0400 10/25/2004, Frank D. Engel, Jr. wrote:
>> 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):
> Frank, that script takes all of two milliseconds to run on my 
> machine... and my machine isn't a speed demon. If you assume your 
> users can perform a major switch plus a Copy operation in two 
> milliseconds, you're going to find so-called "race conditions" lurking 
> all over the place.
> You're quite right that under some circumstances - with scripts that 
> take user-perceivable time to run - modifying the clipboard, or 
> assuming that it stays static throughout the handler, could cause a 
> problem. But in neither Klaus's original nor my modification is it 
> actually going to be a problem in practice.
> -- 
> 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