I wishes to pass the default values programtically like the way we are able to pass the "field captions" through coding in EDIT. One more parameter through which we can pass such values, and if not passed then it should be handled in the same way as it is handled now by Edit/ Edit extended.Czarny_Pijar wrote:If I can suggest for the contributors the way for solving this problem...
Suppose we've to deal with with my_base.dbf database. In my opinion the easiest way for both programmers/users is:
1) check the existence of defaults/my_base.dbf
2) if exists, read 1st record to get the default values.
How to Pass Pre-defined field values in EDIT
Moderator: Rathinagiri
Re: How to Pass Pre-defined field values in EDIT
- Czarny_Pijar
- Posts: 172
- Joined: Thu Mar 18, 2010 11:31 pm
- Location: 19.2341 E 50.2267 N
Re: How to Pass Pre-defined field values in EDIT
IMHO this is the hard way, because changing the default value will force you to the recompile/reinstall process, instead of change only the value in the database.swapan wrote:I wishes to pass the default values programtically like the way we are able to pass the "field captions" through coding in EDIT.
Re: How to Pass Pre-defined field values in EDIT
Hello,swapan wrote: I wishes to pass the default values programtically like the way we are able to pass the "field captions" through coding in EDIT. One more parameter through which we can pass such values, and if not passed then it should be handled in the same way as it is handled now by Edit/ Edit extended.
I've attached an updated sources and sample of command EDIT with the following changes:
- added new parameter INIT <aInitArray> to i_edit.ch
- added support for init value at adding record to h_edit.prg
- updated sample with using a new parameter (look at screenshot below)
How to usage:
- just copy these three files to corresponding folders per folder's structure of attached archive
- recompile library libedit.a by command source\edit\MakeLib.bat
- start sample by command build demo
I hope that helps
- Attachments
-
- Sample Edit.1 screenshot
- edit-screen.jpg (46.04 KiB) Viewed 2402 times
-
- edit-upd.zip
- Updated sources for EDIT command
- (13.13 KiB) Downloaded 215 times
Last edited by gfilatov on Mon Mar 29, 2010 12:28 pm, edited 1 time in total.
Kind Regards,
Grigory Filatov
"Everything should be made as simple as possible, but no simpler." Albert Einstein
Grigory Filatov
"Everything should be made as simple as possible, but no simpler." Albert Einstein
- Czarny_Pijar
- Posts: 172
- Joined: Thu Mar 18, 2010 11:31 pm
- Location: 19.2341 E 50.2267 N
Re: How to Pass Pre-defined field values in EDIT
Many thanks - dziękuję - Велика подяка за зусиль до цієї справи. 
Though somewhat pity the things are going this way... One objection I've posted befere, yet another:
Suppose you've created the application for many of your clients, and they have the different defaults. Now you should keep the different copy of the program for every of your client... Headache guaranteed.
There's the bright side too: you have to keep contact with your clients and bill them periodically
Though somewhat pity the things are going this way... One objection I've posted befere, yet another:
Suppose you've created the application for many of your clients, and they have the different defaults. Now you should keep the different copy of the program for every of your client... Headache guaranteed.
There's the bright side too: you have to keep contact with your clients and bill them periodically
Re: How to Pass Pre-defined field values in EDIT
If you want to pass some default hardcoded values I think what you should use is the VALUE property of textboxes for example.
But as Czarny_Pijar indicated, it is not very tidy. I would try something like reading the values on form startup, from an INI File.
But as Czarny_Pijar indicated, it is not very tidy. I would try something like reading the values on form startup, from an INI File.
Charly
Argentina, Hobbyist developer, Clipper/Delphi/PHP/Progress
Argentina, Hobbyist developer, Clipper/Delphi/PHP/Progress