Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Global replacement
Message
From
17/11/2006 22:53:08
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
 
To
17/11/2006 22:21:23
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01170886
Message ID:
01170917
Views:
6
>>>>Check Code Refrences on the Tools menu.
>>>>
>>>>>Is there a utility available that will allow me to globally replace every occurance of a text segment throughout a form's methods?
>>>>>If there isn't, this might be a nice litte addition for the Sedna team to consider.
>>>
>>>Thank you fellows. I'm on it. VFP continues to amaze me with it's depth.
>>>Grady
>>
>>Hey Grady?
>>
>>If you're finding you have lots of common code in various methods you may want to consider breaking that out into a new object. Then you can change things in one place instead of in several.
>
>Nifty idea, Mike. Most of the code is under a button click.
>Thanks
>Grady

Here is just none example where I used a button class:

In forms where sers input lots of data, they didn't want to press Ctrl-S (Save) followed by Ctrl-N, but suggested to add a button after the last TextBox, so that an additional "ENTER" would add the new record.

This button had to do both actions (try to save, and add a new record), something like this (using Visual Extend framework):
if ThisForm.OnSave() && If record is saved successfully
  ThisForm.OnInsert() && Add a new record
endif
Just in case additional validations or other actions, or some correction, are done in the future, it is convenient to have this button as a class, so the above code exists in one single place.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Previous
Reply
Map
View

Click here to load this message in the networking platform