New option to control forms

Bugfix for menu recreation
This commit is contained in:
Lutz
2023-09-03 15:41:58 +02:00
parent bb0c981cbe
commit 7ca1930b2e
10 changed files with 110 additions and 23 deletions

View File

@@ -24,10 +24,12 @@ _**Note:** you can click on the version number for downloading this version from
| Rel.Date | Developer | Version | Details |
| - | - | - | - |
| 2023/09/03 | LScheffler | [v1.20.05](https://github.com/lscheffler/foxbin2prg/releases/tag/v1.20.05) | **Bug Fix**: Problems recreating menu files (introduced with codepage) (LScheffler) |
| | | | Enhancement: Inserted options to allow splitting of SCX handling from VCX.1 |
| 2023/09/01 | LScheffler | [v1.20.04](https://github.com/lscheffler/foxbin2prg/releases/tag/v1.20.04) | Enhancement: New option "tcDebug" for get_DirSettings method. |
| | | | Enhancement: For better clearance, renamed setting AllowInheritance to InhibitInheritance. |
| | | | Enhancement: The debug option set via parameter has precedence over value from config file. |
| | | | Enhancement: For debug option set via parameter only first valid call is used |
| | | | Enhancement: For debug option set via parameter only first valid call is used. |
| 2023/08/31 | LScheffler | [v1.20.03](https://github.com/lscheffler/foxbin2prg/releases/tag/v1.20.03) | **Enhancement**: New option "tcCFG_File" for get_DirSettings method. |
| 2023/08/31 | LScheffler | [v1.20.02](https://github.com/lscheffler/foxbin2prg/releases/tag/v1.20.02) | New option for parameter set config file to control the use of "regular" config files enhanced |
| 2023/08/30 | LScheffler | [v1.20.01](https://github.com/lscheffler/foxbin2prg/releases/tag/v1.20.01) | **Bug Fix**: Some values of config file would not be read, if the inline comment "&&" was not in the line (LScheffler) |
@@ -433,4 +435,4 @@ _**Note:** you can click on the version number for downloading this version from
| 2013/11/22 | FDBOZZO | [v1.0](https://github.com/fdbozzo/foxbin2prg/tree/v1.0---pública) | Initial creation of clases on prg and support of VCX/SCX/PJX files |
----
Last changed: _2023/09/01_
Last changed: _2023/09/02_

View File

@@ -35,6 +35,7 @@ As far as possible these are the original documents. Changes are added where fun
- [Complementary options for the UseClassPerFile setting](#complementary-options-for-the-useclassperfile-setting)
- [RedirectClassPerFileToMain](#redirectclassperfiletomain)
- [ClassPerFileCheck](#classperfilecheck)
- [Create File-Per-Form](create_file_per_form)
- [Create File-Per-DBC](#create-file-per-dbc)
- [Complementary options for the UseFilesPerDBC setting](#complementary-options-for-the-usefilesperdbc-setting)
- [RedirectFilePerDBCToMain](#redirectfileperdbctomain)
@@ -140,7 +141,8 @@ These are the FoxBin2Prg.cfg configuration file settings and their meaning:
| | | 2=creates / refresh class in file.VCX and do not touch other classes of file.VCX |
| [ClassPerFileCheck](#classperfilecheck) | _0_, 1 | 0=Don't check file.class.vc2 inclusion,<br/>1=Check file.class.vc2 inclusion<br/>Only used if import file is in file[.baseclass].class.tx2 syntax.<br/>Ignored for RedirectClassType: 2 |
|||
| UseFormSettings | _0_, 1 | 0=Old Style, like the class settings<br/>1=Form style, special for form<br/>This controls the use of the _UseFormPerFile_, _RedirectFormPerFileToMain_, _RedirectFormType_ and _FormPerFileCheck_ options.<br/>Only if this option is set, the options will be read. |
| [UseFormSettings](create_file_per_form)
| _0_, 1 | 0=Old Style, like the class settings<br/>1=Form style, special for form<br/>This controls the use of the _UseFormPerFile_, _RedirectFormPerFileToMain_, _RedirectFormType_ and _FormPerFileCheck_ options.<br/>Only if this option is set, the options will be read. |
| UseFormPerFile | _0_, 1, 2 | 0=One library _Text_ file,<br/>1=Multiple Form.Object.sc2 files,<br/>2=Multiple Form.baseclass.Object.sc2 files<br/>See [Create Class-Per-File](#create-class-per-file) |
| [RedirectFormPerFileToMain:](#redirectclassperfiletomain:) | _0_, 1 | 0=Don't redirect to Form.scx,<br/>1=Redirect to Form.scx when selecting Form.Object.sc2<br/>RedirectClassType: 1 precedes this setting |
| RedirectFormType | _0_, 1, 2 | For classes created with UseClassPerFile>0 in the form Form[.baseclass].Object.sx2 (scx only) |
@@ -149,7 +151,7 @@ These are the FoxBin2Prg.cfg configuration file settings and their meaning:
| | | 2=creates / refresh class in Form.SCX and do not touch other classes of Form.SCX |
| [FormPerFileCheck](#classperfilecheck) | _0_, 1 | 0=Don't check Form.Object.sc2 inclusion,<br/>1=Check Form.Object.sc2 inclusion<br/>Only used if import file is in Form[.baseclass].Object.sc2 syntax.<br/>Ignored for RedirectClassType: 2 |
|||
| OldFilesPerDBC | _0_, 1 | 0=Old Style,<br/>1=New style<br/>This controls the use of the _UseFilesPerDBC_, _RedirectFilePerDBCToMain_ and _ItemPerDBCCheck_ options.<br/>Only if this option is set, the options will be read. |
| OldFilesPerDBC | _0_, 1 | 0=Old Style,<br/>1=New style<br/>This controls the use of the _UseFilesPerDBC_, _RedirectFilePerDBCToMain_ and _ItemPerDBCCheck_ options.<br/>Only if this option is set, the **Form** options below will be read. |
| | | 0=New version inactive, options follow:<br/>UseFilesPerDBC=UseClassPerFile<br/>RedirectFilePerDBCToMain=RedirectClassPerFileToMain<br/>ItemPerDBCCheck=ClassPerFileCheck |
| | | 1=New version active, options active |
| | | Note: The options will be set to old style, if option is turned off. |
@@ -443,10 +445,17 @@ This inheritance saves a lot of time and minimizes the CFGs needed \:\)
##### Note
Options will be read outside in, top to down.
If an option is defined multiple times, even in the same file, last occurance wins.
This exception is the group controlling the new style to split DBC files.
The options _UseFilesPerDBC_, _RedirectFilePerDBCToMain_ and _ItemPerDBCCheck_ will be ignored,
The exception are the group controlling the new style to split DBC files and the one for forms.
The options _UseFilesPerDBC_, _RedirectFilePerDBCToMain_ and _ItemPerDBCCheck_ will be ignored for DBC,
if _OldFilesPerDBC_ is set to 0.
If _OldFilesPerDBC_ is set to 0 after it was active, the values of the three options are rejected at all.
Setting _OldFilesPerDBC_ to 1 will inhertit the values from the \*class\* options.
If _OldFilesPerDBC_ is set to 0 after it was active, the values of the three options are rejected at all and reset to the corresponding \*class\* values.
For Forms, options _UseFormPerFile_, _RedirectFormPerFileToMain_, _RedirectFormType_ and _FormPerFileCheck_ will be ignored,
if _UseFormSettings_ is set to 0.
Setting _UseFormSettings_ to 1 will inhertit the values from the \*class\* options.
If _UseFormSettings_ is set to 0 after it was active, the values of the four options are rejected at all and reset to the corresponding \*class\* values.
### File Capitalization
FoxBin2Prg takes care of file capitalization (their extension, specifically),
@@ -533,9 +542,20 @@ If you don't use the redirect setting, an individual vcx/scx file will be genera
This can be useful if you want to divide a big library in smaller pieces.
#### Note
This is true for SCX files as well. SCX files may contain a form and a dataenvironment.
It will create sc2 files.
By default, these settings are valid for SCX and DBC files as well. SCX files may expand to header, form and dataenvironment, and a DBC may be split into header and several files of the objects contained.
If you like finer and independend control over forms and databases, check
- [Create File-Per-Form](create_file_per_form) and
- [Create File-Per-DBC](#create-file-per-dbc)
### Create File-Per-Form
Starting at 1.20.05 you can configure FoxBin2Prg to generate Form (sc2) files independent of classlibrary.
The major idea is, that the class settings to split a vcx into multiple files result into splitting a form(SCX into a form header, a from and a dataenvironment file, what might be overkill. (splitting classes is great, so one does not need to merge the whole lib, but a form is a form.)
To configure this, you must first enable it in foxbin2prg.cfg file:
````
UseFormSettings: 1
````
The settings of the four options are similar to the one of the [class options](#create-class-per-file), except they are named \*Form\* instead of \*Class\*.
### Create File-Per-DBC
Starting at 1.19.55 you can configure FoxBin2Prg to generate one _Text_ file per dbc item using naming style "DatabaseName.item.name.dc2"
with the value "1"
@@ -566,7 +586,7 @@ annotated on DataBaseName.dc2 main file, otherwise no checking is made and when
#### Note
If you don't use the Redirect setting, an individual dbc file will be generated.
There is no real use of this.
### FoxBin2Prg API
With v1.19.42 version started an enhanced API support, making public methods that where only for internal use up to now.
When using FoxBin2Prg as an object, you can access low level functionalities not available when using as external program,
@@ -751,4 +771,4 @@ For options on integrating FoxBin2Prg with SCM tools, look at this topic:
See [FoxBin2Prg and use with git](./FoxBin2Prg_git.md)
----
Last changed: _2023/09/01_
Last changed: _2023/09/03_