Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to Create Sub Methods or Process in Form Methods
Message
From
22/03/2018 16:52:50
 
 
To
21/03/2018 13:50:36
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01658879
Message ID:
01658942
Views:
71
>>>>Hi,
>>>>I have a Form Named "Form1" in which there is a command Button 'Process'.
>>>>Inside the CLICK of Command Button I am executing various methods for my process one by one like
>>>>
>>>>Thisform.pspagecount()
>>>>Thisform.Compress()
>>>>Thisform.ps2PDF()
>>>>Thisform.unmark()
>>>>
>>>>It is fine unless my codes inside these all methods are small and little
>>>>
>>>>However, I need to call several other routines and methods from my Compress(). I mean to say that there are many components of Compress() which I need to call. If I include all routines and Methods in Thisform.Compress(), it is becoming Messy and not properly understandable.
>>>>
>>>>What is the proper solution to the above.
>>>>
>>>>I have several Methods routines etc which I need to call from Inside Compess() and Finally return Back to the original Track
>>>>
>>>>Thanks as Always
>>>>Harsh
>>>
>>>If there are sequences which will be repeated, you can create a new method to do those. Besides that, there's nothing wrong with having a long list of method calls. (I am sure that someone will disagree with me!)
>>
>>
>>Thanks for the Guidance Tore sir and Tamar Madam.
>
>You're welcome. Just a quick recommendation: Use descriptive method names, and don't be afraid to make them long. Remember, intellisense is your best friend! And make some sort of naming convention so that similar methods come after each other. Personally I always start my methods and properties with lower case, so that they come last in PEMEditor.

Thanks Sir.
Harsh
Previous
Reply
Map
View

Click here to load this message in the networking platform