>can i add methods to a form in runtime?
>
>classes maybe?
>
>thnks
>reply ASAP
>Ariel Pablo Klein
Yes, what you want is a STRATEGY design pattern.
You have to be able to define a standard interface (method names, parameters) for the different processes you want to carry out.
Let's say you decice to call the method DoAction and it needs no parameters for simplicity.
Then you can use code like:
THISFORM.AddObject("oStrategy","CreateACursor")
Then call THISFORM.oStrategy.DoAction()
But if you want it to do something different...
THISFORM.RemoveObject("oStrategy")
THISFORM.AddObject("oStrategy","CreateATable")
Then call THISFORM.oStrategy.DoAction()
The key concept here is the standard interchangeable interface which MUST not be different for each action that is to be carried out.
I recommend you look out Design Patterns by Gamma, Help, Johnsson and Vlissides.
Also the Revolutionary Guide to Visual FoxPro by Phelps and Kramek.
Sorry, don't have ISBNs handy - use
www.amazon.com as a book enquiry system even if you don't buy from them!