Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Where to store functions
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Where to store functions
Miscellaneous
Thread ID:
00453555
Message ID:
00453555
Views:
149
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.
Next
Reply
Map
View

Click here to load this message in the networking platform