Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
UDF as controlsource in Column
Message
 
À
15/06/1998 02:17:13
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00108111
Message ID:
00111808
Vues:
13
Hi David,

Thanks for sending the form to me. Well... Congratulations!
I was able to nail the problem down. The problem with VFP is that you can define ControlSources of a Grid's Column which call a method with parameters but the limitation is that the parameter should not be a numeric value.

When you pass a numeric value as a parameter, VFP assumes it to be an array for e.g. "thisform.S2Ms[10]". The solution is a rather simple one, pass an empty string as a parameter along with the duration and you are done.

This was an issue either on the UT or Compuserve when VFP 3 was out, and we had spent a lot of time on it then. I realized when I saw your code.


>I've got a UDF called S2MS() sitting in a procedure file which converts seconds (numeric) to a formatted mm:ss string.
>I had a grid in a form and one of the columns had S2MS(Duration) as the control source. It worked just fine.
>I moved this grid to a new form, and now the grid comes up blank (but with grid lines and headings). If I remove the S2MS() function from the column and just put in "Duration" it works normally, but of course my seconds are unformatted.
>Any ideas as to what's happened?
>
>I've had this sort of thing several times with different "calculated" columns and I'd love to know what's going on.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform