Merge branch 'master v1.19.58' into mod

This commit is contained in:
Lutz
2021-03-07 13:36:13 +01:00
12 changed files with 945 additions and 866 deletions

View File

@@ -116,13 +116,14 @@ These are the FoxBin2Prg.cfg configuration file settings and their meaning:
| | | **Note:**<br/>This is only true for tables. Generating DBC to _Text_ and back to _Binary_ will act as PACK DATABASE.<br/>The data added by _DBF_IncludeDeleted: 1_ will be ignored by old versions generating _Binary_ files. |
| UseClassPerFile | _0_, 1, 2 | 0=One library _Text_ file,<br/>1=Multiple file.class.vc2 files,<br/>2=Multiple file.baseclass.class.vc2 files<br/>See [Create Class-Per-File](#create-class-per-file) |
| [RedirectClassPerFileToMain:](#redirectclassperfiletomain:) | _0_, 1 | 0=Don't redirect to file.vc2,<br/>1=Redirect to file.vc2 when selecting file.class.vc2<br/>RedirectClassType: 1 precedes this setting |
| RedirectClassType | _0_, 1, 2 | For classes created with UseClassPerFile>0 in the form file[.baseclass].class.tx2 (vcx only) |
| | | 0 creates / refresh class in file.VCX and add / replace all other classes of this library |
| | | 1 creates / refresh class file[.baseclass].class.VCX and do not touch file.VCX |
| | | 2 creates / refresh class in file.VCX and do not touch other classes of file.VCX |
| RedirectClassType | _0_, 1, 2 | For classes created with UseClassPerFile>0 in the form file[.baseclass].class.tx2 (vcx only) |
| | | 0 creates / refresh class in file.VCX and add / replace all other classes of this library |
| | | 1 creates / refresh class file[.baseclass].class.VCX and do not touch file.VCX |
| | | 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 |
| ClearDBFLastUpdate | 0, _1_ | 0=Keep DBF LastUpdate, 1=Clear DBF LastUpdate. Useful for Diff, minimizes differences. |
| ClearDBFLastUpdate | 0, _1_ | 0=Keep DBF LastUpdate, 1=Clear DBF LastUpdate. Useful for Diff, minimizes differences. |
| Language | _(auto)_, EN, FR, ES, DE | Language of templates, shown messages and LOGs. EN=English, FR=French, ES=Español, DE=German, Not defined = AUTOMATIC (using VERSION(3)) ||
| HomeDir | 0, _1_ | 0 = don't save HomeDir in PJ2, 1 = save HomeDir in PJ2. Setting this to 0 prevents the PJ2 file from changing just because two developers have the project in different folders |
### Note
The options will be read outside in, top to down. See [Multi-config](#multi-config)
@@ -411,260 +412,260 @@ In example, if you have a classlib "mylib.vcx" with 3 classes inside ( "cl_1, cl
- mylib.cl_3.vc2
#### Important note
The settings of UseClassPerFile and related options are sensible. If changed the wrong way it easy to destroy classlibs.
#### Recommended new setting
Starting at v1.19.42 you can configure foxbin2prg to generate one class per file.
using the naming style "basefile._baseclass_.class.vc2" with the new value "2".
To configure this, you must first enable it in foxbin2prg.cfg file:
````
*UseClassPerFile: 2 && 0=One library _Text_ file, 1=Multiple file.class.vc2 files, 2=Multiple file.baseclass.class.vc2 files,
including DBC members
````
In example, if you have a classlib "mylib.vcx" with 3 classes inside ( "cl_1, cl_2, cl_3") then this files are generated:
````
mylib.vc2 => Header file, with all conforming classes annotated inside
mylib.custom.cl_1.vc2
mylib.form.cl_2.vc2
mylib.textbox.cl_3.vc2
````
#### Complementary options for the UseClassPerFile setting
##### RedirectClassPerFileToMain:
#### Recommended new setting
Starting at v1.19.42 you can configure foxbin2prg to generate one class per file.
using the naming style "basefile._baseclass_.class.vc2" with the new value "2".
To configure this, you must first enable it in foxbin2prg.cfg file:
````
*UseClassPerFile: 2 && 0=One library _Text_ file, 1=Multiple file.class.vc2 files, 2=Multiple file.baseclass.class.vc2 files,
including DBC members
````
In example, if you have a classlib "mylib.vcx" with 3 classes inside ( "cl_1, cl_2, cl_3") then this files are generated:
````
mylib.vc2 => Header file, with all conforming classes annotated inside
mylib.custom.cl_1.vc2
mylib.form.cl_2.vc2
mylib.textbox.cl_3.vc2
````
#### Complementary options for the UseClassPerFile setting
##### RedirectClassPerFileToMain:
Configuring this setting to 1 will redirect any selection of file[.baseclass].class.vc2
to the main file.vc2 file, which will not let you generate individual vcx files by mistake.
to the main file.vc2 file, which will not let you generate individual vcx files by mistake.
RedirectClassType: 1 precedes this setting for files in the
##### ClassPerFileCheck
##### ClassPerFileCheck
Configuring this setting to 1 will check the inclusion of all file[.baseclass].class.vc2 files
annotated on file.vc2 main file, otherwise no checking is made and when reconstructing the vcx/scx all files
annotated on file.vc2 main file, otherwise no checking is made and when reconstructing the vcx/scx all files
containing the file.class.ext naming will be included in the _Binary_ (useful when you want to add external classes to the library).
This only used if import file is in file[.baseclass].class.tx2 syntax.
Ignored for RedirectClassType: 2
#### Note
If you dont use the redirect setting, an individual vcx/scx file will be generated.
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.
### 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"
To configure this, you must first enable it in foxbin2prg.cfg file:
````
*UseFilesPerDBC: 0 && 0=One database dc2 file, 1=Multiple file.*.*.dc2 files
````
In example, if you have a classlib "MyData.dbc" with 3 tables inside ( "tl_1, tl_2, tl_3") and stored procedures.
Then this files are generated:
- MyData.vc2 => Header file, with all database settings and conforming items annotated inside
- MyData.database.storedproceduressource.dc2 -> stored procedures
- MyData.table.tl_1.dc2
- MyData.table.tl_2.dc2
- MyData.table.tl_3.dc2
#### Complementary options for the UseFilesPerDBC setting
##### RedirectFilePerDBCToMain
`*RedirectFilePerDBCToMain 0 && 0=Don't redirect to file.dc2, 1=Redirect to file.tx2 when selecting file.item.*.dc2`
Configuring this setting to 1 will redirect any selection of DataBaseName.*.dc2
to the main DataBaseName.dc2 file, which will not let you generate individual DBC files by mistake.
##### ItemPerDBCCheck
`*ItemPerDBCCheck: 0 && 0=Don't check file.item.*.dc2 inclusion, 1=Check file.item.*.dc2 inclusion`
Configuring this setting to 1 will check the inclusion of all DataBaseName.*.dc2 files
annotated on DataBaseName.dc2 main file, otherwise no checking is made and when reconstructing the dbc files
#### Note
If you dont 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,
that allow you to implement your own tools, like the VFP tools I've implemented for working with PlasticSCM.
The return value of execute() method, is an error code, where 0 means No errors.
You can also get an Exception reference in case of errors, passing extra parameters as in the next examples.
First you instantiate foxbin2prg as object, using this syntax:
````
LOCAL loCnv AS c_foxbin2prg OF "<Path>\FOXBIN2PRG.PRG" && For Intellisense
SET PROCEDURE TO "<Path>\FOXBIN2PRG.EXE"
loCnv = CREATEOBJECT("c_foxbin2prg")
````
Now some examples:
Convert a file.vcx to text:
````
loCnv.execute( "<Path>\file.vcx" )
````
generate the _Binary_ classlib from the text file.vc2:
````
loCnv.execute( "<Path>\file.vc2" )
````
Convert all files of a project.pjx to text:
````
loCnv.execute( "<Path>\project.pjx", "*" )
````
Return a laProc array of processed forms _**after**_ processing a project:
````
DIMENSION laProcs(1,6)
lnErr = loCnv.execute("C:\DESA\foxbin2prg\TESTS\DATOS_TEST\fb2p_test.pjx", "*", "", "", "1", "0", "1")
lnCnt = loCnv.get_Processed(@laProcs, "*.scx")
````
Return a laProc array of processed classlibs _**before**_ processing a project
(almost no file processing here, just minimal header reading):
````
DIMENSION aProcs(1,6)
loCnv.l_ProcessFiles = .F.
lnErr = loCnv.execute("C:\DESA\foxbin2prg\TESTS\DATOS_TEST\fb2p_test.pjx", "*", "", "", "1", "0", "1")
lnCnt = loCnv.get_Processed(@aProcs, "*.vcx")
````
Check if a file has support for converting to text:
````
loCnv.evaluateConfiguration( '', '', '', '', '', '', '', '', <Path>, 'D' )
? loCnv.hasSupport_Bin2Prg("<Path>\file.vcx")
? loCnv.hasSupport_Bin2Prg("<Path>\file.ppt")
````
#### Note
If you query for support in different subdirectories,
then you need to call "evaluateConfiguration()"` method for refreshing the CFG info that is used by those methods._
Clear the cache of processed files for allowing reprocessing a file:
````
loCnv.clearProcessedFiles()
````
Get a CFG object with the settings that will be applied to a directory
````
oCFG = loCnv.get_DirSettings( "c:\developments\projects\myproj_1" )
? oCFG.n_UseClassPerFile
? oCFG.DBF_Conversion_Support
````
#### Note
"get_DirSettings()"` method internally calls "evaluateConfiguration()"`
method for refreshing the CFG info before returning the CFG object._
Check if a file was processed:
````
? loCnv.wasProcessed( "c:\developments\projects\myfile.vcx" )
````
Get the internal FoxBin2Prg's Project project of a given PJX and return an array with existence of files on disk:
````
STORE null TO oMod, oEx
DIMENSION aFiles(1,2) && col.1=Name, col.2=File exist on disk
loCnv.loadModule("c:\developments\projects\myfile.pjx", @oMod, @oEx, .F. )
nFilesNotFound = oMod.getFilesNotFound(@aFiles)
FOR I = 1 TO oMod.Count && oMod.Count is the total count of files in the PJX
? aFiles(1,2), aFiles(1,1)
ENDFOR
````
#### PEM
This is a list of available methods and properties:
| Method()/Property<br/>Syntax | Description |
| -| - |
| **execute**<br/>loCnv.execute( cInputFile [,cType [,cTextName [,lGenText [,cDontShowErrors [,cDebug [,cDontShowProgress [,oModule [,oEx [,lRelanzarError [,cOriginalFileName [,cRecompile [,cNoTimestamps [,cBackupLevels [,cClearUniqueID [,cOptimizeByFilestamp [,cCFG_File](,cType-[,cTextName-[,lGenText-[,cDontShowErrors-[,cDebug-[,cDontShowProgress-[,oModule-[,oEx-[,lRelanzarError-[,cOriginalFileName-[,cRecompile-[,cNoTimestamps-[,cBackupLevels-[,cClearUniqueID-[,cOptimizeByFilestamp-[,cCFG_File ] ] ] ] ] ] ] ] ] ] ] ] ] ] ) | Main execution method to start a conversion<br/> See [Object version](./FoxBin2Prg_Object.md#execute) |
| **conversionSupportType**<br/>loCnv.conversionSupportType( cFilename ) | Return de code of the support type (0,1,2,4,8) |
| **get_DBF_Configuration**<br/>loCnv.get_DBF_Configuration( cInputFile, @oOutDbfCfg ) | Returns 1 if a CFG is found for the indicated DBF, or 0 if not |
| **hasSupport_Bin2Prg**<br/>loCnv.hasSupport_Bin2Prg( cFilename.ext )<br/>loCnv.hasSupport_Bin2Prg( cExt ) | Returns .T. if there is support for converting the file or filetype indicated to text |
| **hasSupport_Prg2Bin**<br/>loCnv.hasSupport_Prg2Bin( cFilename.ext )<br/>loCnv.hasSupport_Prg2Bin( cExt ) | Returns .T. if there is support for converting the file or filetype indicated to _Binary_ |
| **evaluateConfiguration**<br/>loCnv.evaluateConfiguration( cDontShowProgress [,cDontShowErrors [,cNoTimestamps [,cDebug [,cRecompile [,cBackupLevels [,cClearUniqueID [,cOptimizeByFilestamp [,cInputFile [,cInputFileTypeType [,cCFG_File](,cDontShowErrors-[,cNoTimestamps-[,cDebug-[,cRecompile-[,cBackupLevels-[,cClearUniqueID-[,cOptimizeByFilestamp-[,cInputFile-[,cInputFileTypeType-[,cCFG_File) ] ] ] ] ] ] ] ] ) | Forces foxbin to process the directory indicated in the cInputFile and update any CFG in the directory or their parents |
| **loadProgressbarForm**<br/>loCnv.loadProgressbarForm() | Load and show the progressbar form as upper level window |
| **unloadProgressbarForm**<br/>loCnv.unloadProgressbarForm() | Hide and unload the progressbar form |
| **updateProgressbar**<br/>loCnt.updateProgressbar( cText, nValue, nTotal, nType ) | Update the progressbar and the message. nType indicates which progressbar to update, being 0=1st PB and 1=2nd PB |
| **get_DirSettings**<br/>loCnv.get_DirSettings( cDir ) | Returns a CFG object with the settings that are applied on the indicated directory |
| **get_Ext2FromExt**<br/>loCnv.get_Ext2FromExt( cExt ) | Returns the text extension corresponding to the _Binary_ extension indicated |
| **get_Processed**<br/>loCnv.get_Processed( @aProcessed, cFileMask ) | Returns an array with the status of the files being processed or that will be processed in no-real-process-mode if you set "l_ProcessFiles=.F."` before the call. Columns returned are 6: "cFile, cInOutType, cProcessed, cHasErrors, cSupported, cExpanded"` |
| **clearProcessedFiles**<br/>loCnv.clearProcessedFiles() | Clear the statistics and the cache about processed files. If a file was processed and is already processed, being not cached will force to process it again |
| **wasProcessed**<br/>loCnv.wasProcessed( cFile ) | Returns .T. if the fullpath-file was processed, searching in the internal cache |
#### Renamed
This is the translation table of old method names up to v1.19.41 and the new names:
| Old name | New name |
| -| - |
| Ejecutar | Execute |
| TieneSoporte_** | hasSupport_** |
| EvaluarConfiguracion | EvaluateConfiguration |
| AvanceDelProceso | updateProgressbar |
| cargar_frm_avance | loadProgressbarForm |
| descargar_frm_avance | unloadProgressbarForm |
#### Note
Any method or property not documented in this help, could be renamed, changed or deleted, so please, do not use it_
### Log to StdOut
When running from a DOS window, you can get the output to console (same order as array obtained with get_Processed method,
except that element 1 \[filename\] is shown last):
````
C:\DESA\foxbin2prg>foxbin2prg.exe "tests\datos_test\fb2p_dbc.dbc" | find /V
````
````
I,P1,E0,S1,X0,c:\desa\foxbin2prg\tests\datos_test\fb2p_dbc.dbc
O,P1,E0,S1,X1,c:\desa\foxbin2prg\tests\datos_test\fb2p_dbc.dc2
O,P1,E0,S1,X1,c:\desa\foxbin2prg\tests\datos_test\fb2p_dbc.connection.remote_connection_dbf.dc2
O,P1,E0,S1,X1,c:\desa\foxbin2prg\tests\datos_test\fb2p_dbc.connection.remote_connection_oracle.dc2
O,P1,E0,S1,X1,c:\desa\foxbin2prg\tests\datos_test\fb2p_dbc.table.fb2p_depto.dc2
O,P1,E0,S1,X1,c:\desa\foxbin2prg\tests\datos_test\fb2p_dbc.table.nombrelargodeldbf.dc2
O,P1,E0,S1,X1,c:\desa\foxbin2prg\tests\datos_test\fb2p_dbc.view.rv_db_debug_setup.dc2
O,P1,E0,S1,X1,c:\desa\foxbin2prg\tests\datos_test\fb2p_dbc.view.vista_local.dc2
O,P1,E0,S1,X1,c:\desa\foxbin2prg\tests\datos_test\fb2p_dbc.view.vw_local_encuestas.dc2
O,P1,E0,S1,X1,c:\desa\foxbin2prg\tests\datos_test\fb2p_dbc.view.vw_ora_convenios.dc2
O,P1,E0,S1,X1,c:\desa\foxbin2prg\tests\datos_test\fb2p_dbc.view.vw_ora_dual.dc2
O,P1,E0,S1,X1,c:\desa\foxbin2prg\tests\datos_test\fb2p_dbc.database.storedproceduressource.dc2
````
#### First line
The first line means:
Input file (**I**), Processed (**P1**), Without Errors (**E0**), Supported (**S1**), Not Extended file (**X0**) and the full path filename.
#### Last line
The last line means:
Output file (**O**), Processed (**P1**), Without Errors (**E0**), Supported (**S1**), Extended file (**X1**) and the full path filename.
## How to use with a SCM tool
### Note
This chapter is without function if the only the _Text_ files are in the source control.
Here we need to identify 2 distinct operations: checkin because a _Binary_ modification with the IDE
and checkin because a merge operation.
### Checkin because a _Binary_ modification within the IDE
When you work with the VFP 9 IDE, you modify the _Binary_ files (forms, classlib and the like),
then you checkin your modifications, but before doing this you generate the _Text_ files +just for the changed _Binaries_+,
and once you have all the boundles of _Binaries_/_Text_, you checkin them.
#### Note:
If any _Binary_ doesn't have the corresponding _Text_ file,
it can be because it is in use (close opened _Binariy_ and CLEAR ALL at VFP command window),
or because you really haven't made any changes to the code,
in which case you should undo the changes to the _Binaries_ that don't have their _Text_ files using the "undo" option
for these files of your SCM tool._
### Checkin because a merge operation
When you merge a branch, you work on _Text_ files seeing and merging differences manually or automatically.
When you have done with the merge you need to checkin, but before this,
you need to generate the _Binaries_ (forms, classlib, etc) just from the _Text_ files merged, to sync their code.
Once you have done, then you checkin the boundle of _Binaries_/_Text_.
#### Note
If at the end of a merge operation there are _Binaries_ left, you need to choose the "workspace binaries",
because anyway you will generate them later from their _Text_ files._
For options on integrating FoxBin2Prg with SCM tools, look at this topic:
**> [FoxBin2Prg and use with SCM tools](./FoxBin2Prg_SCM.md)**
----
![VFPX logo](https://vfpx.github.io/images/vfpxbanner_small.gif)
This project is part of [VFPX](https://vfpx.github.io/).
----
#### Note
If you dont use the redirect setting, an individual vcx/scx file will be generated.
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.
### 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"
To configure this, you must first enable it in foxbin2prg.cfg file:
````
*UseFilesPerDBC: 0 && 0=One database dc2 file, 1=Multiple file.*.*.dc2 files
````
In example, if you have a classlib "MyData.dbc" with 3 tables inside ( "tl_1, tl_2, tl_3") and stored procedures.
Then this files are generated:
- MyData.vc2 => Header file, with all database settings and conforming items annotated inside
- MyData.database.storedproceduressource.dc2 -> stored procedures
- MyData.table.tl_1.dc2
- MyData.table.tl_2.dc2
- MyData.table.tl_3.dc2
#### Complementary options for the UseFilesPerDBC setting
##### RedirectFilePerDBCToMain
`*RedirectFilePerDBCToMain 0 && 0=Don't redirect to file.dc2, 1=Redirect to file.tx2 when selecting file.item.*.dc2`
Configuring this setting to 1 will redirect any selection of DataBaseName.*.dc2
to the main DataBaseName.dc2 file, which will not let you generate individual DBC files by mistake.
##### ItemPerDBCCheck
`*ItemPerDBCCheck: 0 && 0=Don't check file.item.*.dc2 inclusion, 1=Check file.item.*.dc2 inclusion`
Configuring this setting to 1 will check the inclusion of all DataBaseName.*.dc2 files
annotated on DataBaseName.dc2 main file, otherwise no checking is made and when reconstructing the dbc files
#### Note
If you dont 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,
that allow you to implement your own tools, like the VFP tools I've implemented for working with PlasticSCM.
The return value of execute() method, is an error code, where 0 means No errors.
You can also get an Exception reference in case of errors, passing extra parameters as in the next examples.
First you instantiate foxbin2prg as object, using this syntax:
````
LOCAL loCnv AS c_foxbin2prg OF "<Path>\FOXBIN2PRG.PRG" && For Intellisense
SET PROCEDURE TO "<Path>\FOXBIN2PRG.EXE"
loCnv = CREATEOBJECT("c_foxbin2prg")
````
Now some examples:
Convert a file.vcx to text:
````
loCnv.execute( "<Path>\file.vcx" )
````
generate the _Binary_ classlib from the text file.vc2:
````
loCnv.execute( "<Path>\file.vc2" )
````
Convert all files of a project.pjx to text:
````
loCnv.execute( "<Path>\project.pjx", "*" )
````
Return a laProc array of processed forms _**after**_ processing a project:
````
DIMENSION laProcs(1,6)
lnErr = loCnv.execute("C:\DESA\foxbin2prg\TESTS\DATOS_TEST\fb2p_test.pjx", "*", "", "", "1", "0", "1")
lnCnt = loCnv.get_Processed(@laProcs, "*.scx")
````
Return a laProc array of processed classlibs _**before**_ processing a project
(almost no file processing here, just minimal header reading):
````
DIMENSION aProcs(1,6)
loCnv.l_ProcessFiles = .F.
lnErr = loCnv.execute("C:\DESA\foxbin2prg\TESTS\DATOS_TEST\fb2p_test.pjx", "*", "", "", "1", "0", "1")
lnCnt = loCnv.get_Processed(@aProcs, "*.vcx")
````
Check if a file has support for converting to text:
````
loCnv.evaluateConfiguration( '', '', '', '', '', '', '', '', <Path>, 'D' )
? loCnv.hasSupport_Bin2Prg("<Path>\file.vcx")
? loCnv.hasSupport_Bin2Prg("<Path>\file.ppt")
````
#### Note
If you query for support in different subdirectories,
then you need to call "evaluateConfiguration()"` method for refreshing the CFG info that is used by those methods._
Clear the cache of processed files for allowing reprocessing a file:
````
loCnv.clearProcessedFiles()
````
Get a CFG object with the settings that will be applied to a directory
````
oCFG = loCnv.get_DirSettings( "c:\developments\projects\myproj_1" )
? oCFG.n_UseClassPerFile
? oCFG.DBF_Conversion_Support
````
#### Note
"get_DirSettings()"` method internally calls "evaluateConfiguration()"`
method for refreshing the CFG info before returning the CFG object._
Check if a file was processed:
````
? loCnv.wasProcessed( "c:\developments\projects\myfile.vcx" )
````
Get the internal FoxBin2Prg's Project project of a given PJX and return an array with existence of files on disk:
````
STORE null TO oMod, oEx
DIMENSION aFiles(1,2) && col.1=Name, col.2=File exist on disk
loCnv.loadModule("c:\developments\projects\myfile.pjx", @oMod, @oEx, .F. )
nFilesNotFound = oMod.getFilesNotFound(@aFiles)
FOR I = 1 TO oMod.Count && oMod.Count is the total count of files in the PJX
? aFiles(1,2), aFiles(1,1)
ENDFOR
````
#### PEM
This is a list of available methods and properties:
| Method()/Property<br/>Syntax | Description |
| -| - |
| **execute**<br/>loCnv.execute( cInputFile [,cType [,cTextName [,lGenText [,cDontShowErrors [,cDebug [,cDontShowProgress [,oModule [,oEx [,lRelanzarError [,cOriginalFileName [,cRecompile [,cNoTimestamps [,cBackupLevels [,cClearUniqueID [,cOptimizeByFilestamp [,cCFG_File](,cType-[,cTextName-[,lGenText-[,cDontShowErrors-[,cDebug-[,cDontShowProgress-[,oModule-[,oEx-[,lRelanzarError-[,cOriginalFileName-[,cRecompile-[,cNoTimestamps-[,cBackupLevels-[,cClearUniqueID-[,cOptimizeByFilestamp-[,cCFG_File ] ] ] ] ] ] ] ] ] ] ] ] ] ] ) | Main execution method to start a conversion<br/> See [Object version](./FoxBin2Prg_Object.md#execute) |
| **conversionSupportType**<br/>loCnv.conversionSupportType( cFilename ) | Return de code of the support type (0,1,2,4,8) |
| **get_DBF_Configuration**<br/>loCnv.get_DBF_Configuration( cInputFile, @oOutDbfCfg ) | Returns 1 if a CFG is found for the indicated DBF, or 0 if not |
| **hasSupport_Bin2Prg**<br/>loCnv.hasSupport_Bin2Prg( cFilename.ext )<br/>loCnv.hasSupport_Bin2Prg( cExt ) | Returns .T. if there is support for converting the file or filetype indicated to text |
| **hasSupport_Prg2Bin**<br/>loCnv.hasSupport_Prg2Bin( cFilename.ext )<br/>loCnv.hasSupport_Prg2Bin( cExt ) | Returns .T. if there is support for converting the file or filetype indicated to _Binary_ |
| **evaluateConfiguration**<br/>loCnv.evaluateConfiguration( cDontShowProgress [,cDontShowErrors [,cNoTimestamps [,cDebug [,cRecompile [,cBackupLevels [,cClearUniqueID [,cOptimizeByFilestamp [,cInputFile [,cInputFileTypeType [,cCFG_File](,cDontShowErrors-[,cNoTimestamps-[,cDebug-[,cRecompile-[,cBackupLevels-[,cClearUniqueID-[,cOptimizeByFilestamp-[,cInputFile-[,cInputFileTypeType-[,cCFG_File) ] ] ] ] ] ] ] ] ) | Forces foxbin to process the directory indicated in the cInputFile and update any CFG in the directory or their parents |
| **loadProgressbarForm**<br/>loCnv.loadProgressbarForm() | Load and show the progressbar form as upper level window |
| **unloadProgressbarForm**<br/>loCnv.unloadProgressbarForm() | Hide and unload the progressbar form |
| **updateProgressbar**<br/>loCnt.updateProgressbar( cText, nValue, nTotal, nType ) | Update the progressbar and the message. nType indicates which progressbar to update, being 0=1st PB and 1=2nd PB |
| **get_DirSettings**<br/>loCnv.get_DirSettings( cDir ) | Returns a CFG object with the settings that are applied on the indicated directory |
| **get_Ext2FromExt**<br/>loCnv.get_Ext2FromExt( cExt ) | Returns the text extension corresponding to the _Binary_ extension indicated |
| **get_Processed**<br/>loCnv.get_Processed( @aProcessed, cFileMask ) | Returns an array with the status of the files being processed or that will be processed in no-real-process-mode if you set "l_ProcessFiles=.F."` before the call. Columns returned are 6: "cFile, cInOutType, cProcessed, cHasErrors, cSupported, cExpanded"` |
| **clearProcessedFiles**<br/>loCnv.clearProcessedFiles() | Clear the statistics and the cache about processed files. If a file was processed and is already processed, being not cached will force to process it again |
| **wasProcessed**<br/>loCnv.wasProcessed( cFile ) | Returns .T. if the fullpath-file was processed, searching in the internal cache |
#### Renamed
This is the translation table of old method names up to v1.19.41 and the new names:
| Old name | New name |
| -| - |
| Ejecutar | Execute |
| TieneSoporte_** | hasSupport_** |
| EvaluarConfiguracion | EvaluateConfiguration |
| AvanceDelProceso | updateProgressbar |
| cargar_frm_avance | loadProgressbarForm |
| descargar_frm_avance | unloadProgressbarForm |
#### Note
Any method or property not documented in this help, could be renamed, changed or deleted, so please, do not use it_
### Log to StdOut
When running from a DOS window, you can get the output to console (same order as array obtained with get_Processed method,
except that element 1 \[filename\] is shown last):
````
C:\DESA\foxbin2prg>foxbin2prg.exe "tests\datos_test\fb2p_dbc.dbc" | find /V
````
````
I,P1,E0,S1,X0,c:\desa\foxbin2prg\tests\datos_test\fb2p_dbc.dbc
O,P1,E0,S1,X1,c:\desa\foxbin2prg\tests\datos_test\fb2p_dbc.dc2
O,P1,E0,S1,X1,c:\desa\foxbin2prg\tests\datos_test\fb2p_dbc.connection.remote_connection_dbf.dc2
O,P1,E0,S1,X1,c:\desa\foxbin2prg\tests\datos_test\fb2p_dbc.connection.remote_connection_oracle.dc2
O,P1,E0,S1,X1,c:\desa\foxbin2prg\tests\datos_test\fb2p_dbc.table.fb2p_depto.dc2
O,P1,E0,S1,X1,c:\desa\foxbin2prg\tests\datos_test\fb2p_dbc.table.nombrelargodeldbf.dc2
O,P1,E0,S1,X1,c:\desa\foxbin2prg\tests\datos_test\fb2p_dbc.view.rv_db_debug_setup.dc2
O,P1,E0,S1,X1,c:\desa\foxbin2prg\tests\datos_test\fb2p_dbc.view.vista_local.dc2
O,P1,E0,S1,X1,c:\desa\foxbin2prg\tests\datos_test\fb2p_dbc.view.vw_local_encuestas.dc2
O,P1,E0,S1,X1,c:\desa\foxbin2prg\tests\datos_test\fb2p_dbc.view.vw_ora_convenios.dc2
O,P1,E0,S1,X1,c:\desa\foxbin2prg\tests\datos_test\fb2p_dbc.view.vw_ora_dual.dc2
O,P1,E0,S1,X1,c:\desa\foxbin2prg\tests\datos_test\fb2p_dbc.database.storedproceduressource.dc2
````
#### First line
The first line means:
Input file (**I**), Processed (**P1**), Without Errors (**E0**), Supported (**S1**), Not Extended file (**X0**) and the full path filename.
#### Last line
The last line means:
Output file (**O**), Processed (**P1**), Without Errors (**E0**), Supported (**S1**), Extended file (**X1**) and the full path filename.
## How to use with a SCM tool
### Note
This chapter is without function if the only the _Text_ files are in the source control.
Here we need to identify 2 distinct operations: checkin because a _Binary_ modification with the IDE
and checkin because a merge operation.
### Checkin because a _Binary_ modification within the IDE
When you work with the VFP 9 IDE, you modify the _Binary_ files (forms, classlib and the like),
then you checkin your modifications, but before doing this you generate the _Text_ files +just for the changed _Binaries_+,
and once you have all the boundles of _Binaries_/_Text_, you checkin them.
#### Note:
If any _Binary_ doesn't have the corresponding _Text_ file,
it can be because it is in use (close opened _Binariy_ and CLEAR ALL at VFP command window),
or because you really haven't made any changes to the code,
in which case you should undo the changes to the _Binaries_ that don't have their _Text_ files using the "undo" option
for these files of your SCM tool._
### Checkin because a merge operation
When you merge a branch, you work on _Text_ files seeing and merging differences manually or automatically.
When you have done with the merge you need to checkin, but before this,
you need to generate the _Binaries_ (forms, classlib, etc) just from the _Text_ files merged, to sync their code.
Once you have done, then you checkin the boundle of _Binaries_/_Text_.
#### Note
If at the end of a merge operation there are _Binaries_ left, you need to choose the "workspace binaries",
because anyway you will generate them later from their _Text_ files._
For options on integrating FoxBin2Prg with SCM tools, look at this topic:
**> [FoxBin2Prg and use with SCM tools](./FoxBin2Prg_SCM.md)**
----
![VFPX logo](https://vfpx.github.io/images/vfpxbanner_small.gif)
This project is part of [VFPX](https://vfpx.github.io/).
----
Last changed: _2021/03/04_ ![Picture](./pictures/vfpxpoweredby_alternative.gif)