Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
UDF's in a FOR stmt
Message
De
28/02/2000 15:47:00
 
 
À
27/02/2000 19:02:16
David Abraham
David Abraham & Associates, Inc.
New York City, New York, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00338042
Message ID:
00338654
Vues:
12
>Hi Al,
>
>And thanks for taking the time to do the experiment and write me back.
>
>You're right, there may be some sort of justification for that FINAL behavior. But was it your experience (it WAS mine!) that the wait window showed movement from the top of the table to the bottom, then from the bottom to the top, and it displayed twice for records that passed the selection criteria, and it also displayed random movement before it settled on the top record of the browse.
>
>Weird!
>
>David

Our tests were different in some areas... you appear to have used a table with a PK, I used a free table without one. You used VFP6, I used VFP5. The "pattern" of record pointer movement was different, which will ultimately reflect differences in VFP internals. IMO, these internals aren't too important here. Suitable for conversation at a VFP DevCon cocktail party, but that's about it! :-)

One thing I wanted to mention earlier but forgot: if you want to use UDFs in that fashion, it's better to pass parameters, e.g.
BROWSE ALL FOR MyUDF(RECNO())
so that if you inadvertently move the record pointer in MyUDF(), you'll still get the correct results. This is similar in concept to the use of parameters in UDFs called within a SELECT - SQL. However, in that case, passed parameters are about the ONLY things you can rely on.
Regards. Al

"Violence is the last refuge of the incompetent." -- Isaac Asimov
"Never let your sense of morals prevent you from doing what is right." -- Isaac Asimov

Neither a despot, nor a doormat, be

Every app wants to be a database app when it grows up
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform