Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Datatoclip with zero records
Message
De
01/04/2006 15:52:31
 
 
À
31/03/2006 14:43:11
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
Information générale
Forum:
Visual FoxPro
Catégorie:
Problèmes
Versions des environnements
Visual FoxPro:
VFP 7 SP1
Divers
Thread ID:
01108844
Message ID:
01109767
Vues:
27
>>I disagree. You only really know you need to code against it because you get an error. It's not like trying to access record 5 in an empty table. You'd know intuitively that would fail. I don't feel that _vfp.datatoclip with an empty table is necessarily the sort of thing you'd code against intuitively.
>>
>>I agree with Peter and Cetin that it's a bug in the documentation.
>
>But then I'd rather see the code fixed, not the documentation. The function could simply return empty string for zero records. Wouldn't that be nice?

You forget that the function also copies the field names. They are line 1 and this line is useful for me. It may also be the case that you haven't noticed that field names are copied too. There is a weird thing happening here. The end of a line presumably only has a carriage return character and misses the linefeed character. Demonstration:
clear
create cursor effe ( effe1 i)
insert into effe values ( 1 )
insert into effe values ( 2 )
go top

_vfp.datatoclip
? _cliptext
?
for n = 1 to len( _cliptext )
	?? substr( _cliptext, n, 1 )
	inkey(.5)
next
I agree that the function needs repairment, not the documentation. It even still exists in 9! Unbelievable that such a bug is still alive.

I have also encountered that no error came, but nonetheless the _cliptext was not altered. Cannot reproduce it at the moment. Need a monkey for that one, I guess. Any monkeys here?
Groet,
Peter de Valença

Constructive frustration is the breeding ground of genius.
If there’s no willingness to moderate for the sake of good debate, then I have no willingness to debate at all.
Let's develop superb standards that will end the holy wars.
"There are three types of people: Alphas and Betas", said the beta decisively.
If you find this message rude or offensive or stupid, please take a step away from the keyboard and try to think calmly about an eventual a possible alternative explanation of my message.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform