diff --git a/FoxBin2PRGVersionFile.txt b/FoxBin2PRGVersionFile.txt
index 3f1bebc..8695fcd 100644
--- a/FoxBin2PRGVersionFile.txt
+++ b/FoxBin2PRGVersionFile.txt
@@ -2,8 +2,8 @@ Lparameters toUpdateInfo
Local lcNote
With toUpdateInfo
- .VersionNumber = 'v1.19.49.4'
- .VersionDate = Date(2017,12,04)
+ .VersionNumber = 'v1.19.49.6'
+ .VersionDate = Date(2018,01,06)
.SourceFileUrl = 'http://vfpxrepository.com/dl/thorupdate/Projects/FoxBin2Prg/FoxBin2Prg.Zip'
.Link = 'http://vfpx.codeplex.com/wikipage?title=FoxBin2PRG'
@@ -21,6 +21,10 @@ Demo video using FoxBin2Prg with PlasticSCM: http://youtu.be/sE4wQ50Itqg
Change History -------------------------------------------------------------
+2018/01/04 v1.19.49.6
+- BugFix vcx/scx: FoxBin2Prg should ignore the records that VFP Designer ignores (Doug Hennig / https://github.com/fdbozzo/foxbin2prg/issues/15)
+- BugFix vcx/scx: FoxBin2Prg encodes MemberData property with CR/LF, which can cause "property '_memberdata' value is too long" error (Doug Hennig / https://github.com/fdbozzo/foxbin2prg/issues/16)
+
2017/12/20 v1.19.49.5
- BugFix DBF: When FoxBin2PRG converts a DB2 file to a DBF file and imports the data (using DBF_Conversion_Support = 8), tabs at the start of lines in memo fields are lost (Doug Hennig / https://github.com/fdbozzo/foxbin2prg/issues/13)
diff --git a/TESTS/DATOS_READONLY/lib_controles.vc2 b/TESTS/DATOS_READONLY/lib_controles.vc2
index 4027987..9713188 100644
--- a/TESTS/DATOS_READONLY/lib_controles.vc2
+++ b/TESTS/DATOS_READONLY/lib_controles.vc2
@@ -1544,7 +1544,7 @@ DEFINE CLASS f_base AS form
tcFilename = SYS(5) + ADDBS(CURDIR()) + "TESTS\DATOS_TEST\" + tcFilename + '.bmp'
ENDIF
- Declare Integer formtobmp IN "TESTS\PCT_DLL.dll" integer hwnd,String bmpFileName
+ Declare Integer formtobmp IN "PCT_DLL.dll" integer hwnd,String bmpFileName
retVal = formtobmp( THISFORM.HWnd, tcFilename )
*Declare Integer formtobmpA IN "TESTS\PCT_DLL.dll" string bmpfilename,integer nX,integer nY,integer nX2,integer nY2
@@ -1561,6 +1561,7 @@ DEFINE CLASS f_base AS form
ENDPROC
PROCEDURE Init
+ SET PATH TO (FULLPATH("..\", THIS.ClassLibrary)) ADDITIVE
THISFORM.cmdCapturar.SetFocus()
ENDPROC
diff --git a/TESTS/DATOS_READONLY/lib_controles.vct b/TESTS/DATOS_READONLY/lib_controles.vct
index 86434ef..c2ae1d2 100644
Binary files a/TESTS/DATOS_READONLY/lib_controles.vct and b/TESTS/DATOS_READONLY/lib_controles.vct differ
diff --git a/TESTS/DATOS_READONLY/lib_controles.vcx b/TESTS/DATOS_READONLY/lib_controles.vcx
index 1ef9e56..b10f42f 100644
Binary files a/TESTS/DATOS_READONLY/lib_controles.vcx and b/TESTS/DATOS_READONLY/lib_controles.vcx differ
diff --git a/TESTS/ut__foxbin2prg__c_conversor_prg_a_bin__analyzeAssignmentOf_TAG.prg b/TESTS/ut__foxbin2prg__c_conversor_prg_a_bin__analyzeAssignmentOf_TAG.prg
index 7a92e4d..585d1e2 100644
--- a/TESTS/ut__foxbin2prg__c_conversor_prg_a_bin__analyzeAssignmentOf_TAG.prg
+++ b/TESTS/ut__foxbin2prg__c_conversor_prg_a_bin__analyzeAssignmentOf_TAG.prg
@@ -290,7 +290,9 @@ DEFINE CLASS ut__foxbin2prg__c_conversor_prg_a_bin__analyzeAssignmentOf_TAG AS F
*-- DATOS ESPERADOS
STORE 0 TO lnCodError_Esperado
- lcValue_Esperado = REPLICATE( CHR(1), 517 ) + STR(23 + LEN(lcMemberdata),8) + '' + CR_LF + lcMemberdata + CR_LF + ''
+ *lcValue_Esperado = REPLICATE( CHR(1), 517 ) + STR(23 + LEN(lcMemberdata),8) + '' + CR_LF + lcMemberdata + CR_LF + ''
+ lcMemberdata = CHRTRAN(lcMemberdata,CR_LF,'') && Issue#15 - Doug Hennig
+ lcValue_Esperado = REPLICATE( CHR(1), 517 ) + STR(19 + LEN(lcMemberdata),8) + '' + lcMemberdata + ''
*-- TEST
loObj.analyzeAssignmentOf_TAG( @lcPropName, @lcPropValue, @laProps, @lnProp_Count ;
diff --git a/foxbin2prg.exe b/foxbin2prg.exe
index 218e840..753cd3c 100644
Binary files a/foxbin2prg.exe and b/foxbin2prg.exe differ
diff --git a/foxbin2prg.prg b/foxbin2prg.prg
index 6ae085d..fe2a768 100644
--- a/foxbin2prg.prg
+++ b/foxbin2prg.prg
@@ -204,6 +204,8 @@
* 03/12/2017 JS&FDBOZZO v1.19.49.3 Bug Fix db2: Los campos "Double" asumen 2 decimales cuando se definen con 0 decimales (Jerry Stager)
* 04/12/2017 FDBOZZO v1.19.49.4 Cuando se usa ClassPerFile an Modo API y se importan clases simples, a veces sus nombres se toman sin comillas, provocando errores (Lutz Scheffler)
* 20/12/2017 DH&FDBOZZO v1.19.49.5 Bug Fix dbf: Cuando se importan datos de un DB2 a DBF (con DBF_Conversion_Support = 8), los tabs al inicio de los memo se pierden (Doug Hennig)
+* 04/01/2018 FDBOZZO v1.19.49.6 Bug Fix vcx/scx: FoxBin2Prg debería ignorar los registros que el diseñador de FoxPro ignora (Doug Hennig)
+* 04/01/2018 FDBOZZO v1.19.49.6 Bug Fix vcx/scx: Cuando se regenera la propiedad _MemberData se agregan CR/LF por cada miembro, pudiendo provocar un error de "valor muy largo" (Doug Hennnig)
*
*
*---------------------------------------------------------------------------------------------------
@@ -321,6 +323,8 @@
* 31/08/2017 Jerry Stager Reporte bug db2 v1.19.48: Los campos "Double" asumen 2 decimales cuando se definen con 0 decimales (Agregado en v1.19.49.3)
* 03/12/2017 Lutz Scheffler Reporte Bug vx2 v1.19.49: Cuando se usa ClassPerFile an Modo API y se importan clases simples, a veces sus nombres se toman sin comillas, provocando errores (Arreglado en v1.19.49.4)
* 18/12/2017 Doug Hennnig Reporte Bug dbf v1.19.49: Cuando se importan datos de un DB2 a DBF (con DBF_Conversion_Support = 8), los tabs al inicio de los memo se pierden (Arreglado en v1.19.49.5)
+* 04/01/2018 Doug Hennnig Reporte Bug vcx/scx v1.19.49: FoxBin2Prg debería ignorar los registros que el diseñador de FoxPro ignora (Arreglado en v1.19.49.6)
+* 04/01/2018 Doug Hennnig Reporte Bug vcx/scx v1.19.49: Cuando se regenera la propiedad _MemberData se agregan CR/LF por cada miembro, pudiendo provocar un error de "valor muy largo" (Arreglado en v1.19.49.6)
*
*
*---------------------------------------------------------------------------------------------------
@@ -6349,12 +6353,6 @@ DEFINE CLASS c_conversor_base AS Custom
LOCAL lnCodError, lnPos, lcValue
tcComentario = ''
- *-- Limpieza de caracteres sin uso
- *IF INLIST(tcValue, '..\', '..\..\' ) THEN
- * MESSAGEBOX( 'Encontrado valor "' + tcValue + '" en propiedad "' + tcProp, 4096, PROGRAM() )
- * tcValue = ''
- *ENDIF
-
*-- Ajustes de algunos casos especiales
DO CASE
CASE tcProp == '_memberdata'
@@ -6362,16 +6360,13 @@ DEFINE CLASS c_conversor_base AS Custom
lcValue = ''
FOR I = 1 TO OCCURS( '/>', tcValue )
- *TEXT TO lcValue TEXTMERGE ADDITIVE NOSHOW FLAGS 1+2 PRETEXT 1+2
- * <', I, 1+4 ), CR_LF, ' ' )>>
- *ENDTEXT
- lcValue = lcValue + CHR(13) + CHR(10) + CHRTRAN( STREXTRACT( tcValue, '', I, 1+4 ), CR_LF, ' ' )
+ * issue#16: memberdata property should be saved in compressed format
+ lcValue = lcValue + CHRTRAN( STREXTRACT( tcValue, '', I, 1+4 ), CR_LF, ' ' )
ENDFOR
+ * issue#16: memberdata property should be saved in compressed format
TEXT TO tcValue TEXTMERGE NOSHOW FLAGS 1 PRETEXT 1+2
-
- <>
-
+ <>
ENDTEXT
IF LEN(lcValue) > 255
@@ -10446,7 +10441,7 @@ DEFINE CLASS c_conversor_prg_a_vcx AS c_conversor_prg_a_bin
* Si tiene objetos asociados, antes debo eliminar los existentes para no duplicarlos
DELETE ALL FOR PLATFORM == PADR('WINDOWS', FSIZE('PLATFORM')) AND LOWER(PARENT) == loClase._ObjName
-
+
.insert_AllObjects( @loClase, @toFoxBin2Prg )
ELSE
@@ -13510,6 +13505,7 @@ DEFINE CLASS c_conversor_bin_a_prg AS c_conversor_base
+ [] ;
+ [] ;
+ [] ;
+ + [] ;
+ [] ;
+ [] ;
+ [] ;
@@ -14025,6 +14021,44 @@ DEFINE CLASS c_conversor_bin_a_prg AS c_conversor_base
+ PROCEDURE ignoreIncorrectDefinedObjects(lcCursor)
+ * Issue#15 - VFP Designer ignored objects should be ignored by FoxBin2Prg
+ LOCAL lcObjName, lcParent, lcParentObjName, loObjs as Collection
+ loObjs = CREATEOBJECT("Collection")
+ SELECT (lcCursor)
+
+ SCAN FOR PLATFORM = "WINDOWS"
+ lcObjName = LOWER(OBJNAME)
+ lcParent = LOWER(PARENT)
+
+ IF EMPTY(lcParent)
+ lcParentObjName = lcObjName
+ ELSE
+ lcParentObjName = lcParent + '.' + lcObjName
+ ENDIF
+
+ IF NOT EMPTY(lcParent)
+ * Tiene Parent, y debe existir, si no es ignorado
+ * NOTA: Del parent solo se puede comprobar el objeto primario.
+ IF loObjs.GetKey(GETWORDNUM(lcParent + '.', 1, '.')) > 0
+ * Existe: se agrega al array el nuevo objeto
+ loObjs.Add( '', lcParentObjName )
+ ELSE
+ * No existe: se ignora
+ DELETE
+ ENDIF
+ ELSE
+ * No Existe: se agrega al array
+ loObjs.Add( '', lcParentObjName )
+
+ ENDIF
+ ENDSCAN
+
+ RETURN
+ ENDPROC
+
+
+
PROCEDURE indentMemo
LPARAMETERS tcMethod, tcIndentation, tlKeepProcHeader
*-- INDENTA EL CÓDIGO DE UN MÉTODO DADO Y QUITA LA CABECERA DE MÉTODO (PROCEDURE/ENDPROC) SI LA ENCUENTRA
@@ -15398,7 +15432,7 @@ DEFINE CLASS c_conversor_vcx_a_prg AS c_conversor_bin_a_prg
IF toFoxBin2Prg.n_UseClassPerFile = 0 OR EMPTY(toFoxBin2Prg.c_ClassToConvert) THEN
*-- Exportar la librería entera a texto
- SELECT _TABLAORIG.*,RECNO() regnum FROM _TABLAORIG INTO CURSOR TABLABIN
+ SELECT _TABLAORIG.*,RECNO() regnum FROM _TABLAORIG INTO CURSOR TABLABIN READWRITE
ELSE
*-- Exportar solo una clase a texto cuando se usa ClassPerFile y se indicó una clase
SELECT _TABLAORIG.*,RECNO() regnum FROM _TABLAORIG INTO CURSOR TABLABIN ;
@@ -15411,6 +15445,9 @@ DEFINE CLASS c_conversor_vcx_a_prg AS c_conversor_bin_a_prg
lnStepCount = 7
USE IN (SELECT("_TABLAORIG"))
+ * Issue#15: Ignorar objetos mal definidos
+ .ignoreIncorrectDefinedObjects('TABLABIN')
+
INDEX ON PADR(LOWER(PLATFORM + IIF(EMPTY(PARENT),'',ALLTRIM(PARENT)+'.')+OBJNAME),240) TAG PARENT_OBJ ADDITIVE
SET ORDER TO 0 IN TABLABIN
@@ -15763,9 +15800,12 @@ DEFINE CLASS c_conversor_scx_a_prg AS c_conversor_bin_a_prg
WITH THIS AS c_conversor_scx_a_prg OF 'FOXBIN2PRG.PRG'
USE (.c_InputFile) SHARED AGAIN NOUPDATE ALIAS _TABLAORIG
- SELECT _TABLAORIG.*,RECNO() regnum FROM _TABLAORIG INTO CURSOR TABLABIN
+ SELECT _TABLAORIG.*,RECNO() regnum FROM _TABLAORIG INTO CURSOR TABLABIN READWRITE
USE IN (SELECT("_TABLAORIG"))
+ * Issue#15: Ignorar objetos mal definidos
+ .ignoreIncorrectDefinedObjects('TABLABIN')
+
INDEX ON PADR(LOWER(PLATFORM + IIF(EMPTY(PARENT),'',ALLTRIM(PARENT)+'.')+OBJNAME),240) TAG PARENT_OBJ ADDITIVE
SET ORDER TO 0 IN TABLABIN