Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Where to store functions
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Where to store functions
Divers
Thread ID:
00453555
Message ID:
00453555
Vues:
150
I've got a form with a date field. This date field needs to be converted to an OLE Date, and I've got a nice little conversion program that does that, which I call as a function. However, as soon as I define a function within a form method and try to close the method I get the following message:

"Methods and Events cannot contain nested procedures or class definitions."

So, I made another method with my conversion function...but then I also found that I have a leapyear function within the conversion function....and before adding another method to the form, I began thinking, maybe this isn't a "best practice".

So, what are my options?

1. I can place the function as .prg file in my source folder for the project
or
2. I can define new methods for the form, till the cows come home.

or ???

Since this is a single purpose thing, I'd really like to keep it with the form (maybe even with the field).

any ideas here?

thanks... Larry
-- Larry Keyes
Remember only You can prevent Gray Goo. Never release nanobot assembers without replication limiting code.
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform