Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
VFP bug, and how to fix it
Message
From
03/03/2023 11:37:10
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
 
To
03/03/2023 11:06:14
General information
Forum:
Visual FoxPro
Category:
Object Oriented Programming
Miscellaneous
Thread ID:
01686313
Message ID:
01686314
Views:
73
>
>_cliptext=''
>For lnX = 1 to 10
>*  Wait Window '' timeout 0.001
>  _cliptext = _cliptext + Transform(lnX) + Chr(13)+Chr(10)
>Endfor
>Wait Window _cliptext
>
>
>Run it several times, and you will notice that sometimes the list of numbers isn't complete, and sometimes it is.
>
>Now remove the comment (*) and run it again. Now you will get the correct result every time!
>
>Conclusion: VFP needs some time to "settle" when you move data to and from the clipboard. A very small delay won't be noticeable, but it will fix the problem!

It's between fox and windowses. IIRC, all clipboard manipulation is done internally via system calls - which then make the clipboard available to other apps. My guess is that some of the calls get lost because they're called in rapid succession.

I tried your code in fox under linux+wine, and it gave the correct result each time, even without the delay. I guess that whoever wrote wine isn't taking shortcuts that may exist in windows, and substitutes the API calls with linux API calls (wine is no emulator, it's a simulator, ie. all system calls are replaced with wrappers around linux code).

Now about that hair problem... I'm not sure if beer works as a fertilizer, or maybe I was applying it in the wrong place.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform