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:49:52
 
 
To
03/03/2023 11:37:10
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
General information
Forum:
Visual FoxPro
Category:
Object Oriented Programming
Miscellaneous
Thread ID:
01686313
Message ID:
01686315
Views:
55
>>
>>_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).

Yes, I'm sure that speed is an issue, since I have got some reports from people who doesn't see any gap.

>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.

I'll try with beer, I haven't got much to lose.
Previous
Reply
Map
View

Click here to load this message in the networking platform