Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
VFP bug, and how to fix it
Message
De
03/03/2023 11:37:10
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
 
 
À
03/03/2023 11:06:14
Information générale
Forum:
Visual FoxPro
Catégorie:
Programmation Orientée Object
Divers
Thread ID:
01686313
Message ID:
01686314
Vues:
74
>
>_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.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform