New FTDN February/Febrero 2021 (FWH 21.02)

New FTDN February/Febrero 2021 (FWH 21.02)

Postby Antonio Linares » Wed Mar 24, 2021 8:56 am

February 2021
=============

* Fix: FW_ReadImage() and FW_DrawImage() functions(fwh\source\imgtxtio.prg)
These function are failing when a memo field containing image data is
directly provided as paramter. It was necessary to first assign the field
value to another variable and then call these functions. Fixed now.
Eg:
FW_ReadImage( nil, FIELD->IMAGE ) was failing where as
cImage := FIELD->IMAGE
FW_ReadImage( nil, cImage ) was working.
Same is with FW_DrawImage() also.
Now it is possible to call both the functions directly with the field.
FW_ReadImage( nil, FIELD->IMAGE ) and FW_DrawImage( hDC, FIELD->IMAGE,...)
both work now.
Many other controls that display images like XImage, Bitmap, Buttons,
etc. also had the same issue and that is fixed now.

* Fix: FW_StriCmp(): Results were wrong if one of the values is a memo-field.
fixed now.

* FW_ArrayAsList( aArray, [cDelim = ","], [lTrim = .f.] )
If the new 3rd param is .t., strings are trimmed.

* New function FW_CRC8( cStr ) --> nCRC8 (source\function\fwcrc8.c)
http://forums.fivetechsupport.com/viewt ... 14#p239014

* New function IsRomanNumber( cText ) --> True, if cText is a
valid roman numeral.

* New function FW_ProperCase( cText, [lRomanUpper=.t.] ) --> cProper
Converts text with each word capitalized. Roman numbers are fully
capitalized by default.
? FW_ProperCase( "he is in cLaSS-viii" )
--> "He Is In Class-VIII"

* TGET:
- oGet:oGet:Name is showing the name of the control variable,
instead of the name of variable being edited, in case of gets
created from source code. Fixed.
http://forums.fivetechsupport.com/viewt ... 36#p239036

- New clause in @ r, c GET command:
CASE UPPER or CASE LOWER or CASE PROPER. Forces upper/lower/
proper case to get entry.
Note: Presence of "!" in the picture clause ignores this setting.

- New method SetCase( "UPPER/LOWER/PROPER" ) --> cPrevCase

- Enhancement in SAY/GET command. New subclause WIDTH <nSayWidth>
in clause SAY <cSay>
Eg: @ nRow, nCol SAY cSay PICTURE "@!" WIDTH 100 GET oGet ...

* XImage.prg:
- method Save( lAsViewed, cFile, nQuality ), when lAsViewed is .t., is
saving only the basic image but not any freehand drawins drawn by the
user over the image. Fixed.
Window.prg, imgtxtio.prg and gdipfwh.cpp are changed for this purpose.
http://forums.fivetechsupport.com/viewt ... 32#p239101
- Resource leak in Paste() method fixed.

* TClipboard:
method SetBitmap( ohBitmap ) reports resource leakage. Fixed:
http://forums.fivetechsupport.com/viewt ... d1#p239130

* Enhancement: function FW_ExcelToDbf( oRange, cFieldList, lHasHeaders, bProgress )
Now cFieldList can also be a two-dimensional array:
First element of each item contains the field name and
the second element contains the corresponding header in the excel range or
number of the excel column or alpha-column number like "A", "C", "AB", etc.
http://forums.fivetechsupport.com/viewt ... 70#p239170

* Report.prg:
- Fix: Export to Excel encounters runtime error where the report
has groups and also the first column has totals. Fixed.

* XBrowse:

- Method ReArrangeCols() now includes Refresh() also and returns Self
instead of nil.

- Many commonly used methods now return Self instead of nil, making
it easy to call multiple methods in a single line of code.

- New Method SetMultiSelectCol( [uCol], [lFooter] )
If called without params or uCol as nil, a new column is inserted
as the first column and set as multi-select-column. If uCol is
specified that column is set as multi-select column.
[lFooter] defaults to oBrw:lFooter and set to display total selected
columns.
This column displays checkboxes indicating the selected status of the row.
Header displays a checkbox indicating if all rows are selected or not.
Double click, Ctrl-Click or space key in this column toggles selection.
If oBrw:lDblClick is nil double click on any column toggles selection if that
column's bLDclickdata is also nil.
If FastEdit is .f., pressing space key in any column toggles selection.
Shift-click selects all rows from the last selection till the current row.
Click on header toggles selection of all rows.

- When oBrw:aSelected has only one record, all rows are sent to report/excel. Fixed.

* TGRAPH:
- New method Define() supported by new command DEFINE GRAPH to create
graph object not as a control on a dialog/window. This is basically intended
to print one or more graphs without creating a dialog/window as well as to
generate and save graphs as images.

#xcommand DEFINE GRAPH <oGraph> [ SIZE <nWidth>, <nHeight> ] ;
[ TITLE <cTitle> ] ;
[ <pixel: PIXEL > ] ;
[ <l3d: 3D> ] ;
[ <lxGrid: XGRID> ] ;
[ <lyGrid: YGRID> ] ;
[ <lxVal: XVALUES> ] ;
[ <lyVal: YVALUES> ] ;
[ <lLegends: LEGENDS> ] ;
[ TYPE <nType> ] ;
[ FONT <oFont> ] ;
=> ;
<oGraph> := TGraph():Define( <nWidth>, ;
<nHeight>, <cTitle>, <.l3d.>, <.lxGrid.>, ;
<.lyGrid.>, <.lxVal.>, <.lyVal.>, <.lLegends.>, <nType>, <oFont> )

This command creates a tgraph object without displaying on any dialog/
window as control.

This object can be used to generate and save as image using
oGraph:SaveAsImage( cFile ), where cFile can be bmp, png, jpg, tif, etc.

This object can also be used to print or generate pdf using the new print command

@ nRow, nCol PRINT TO oPrn GRAPH oGraph SIZE nWidth,nHeight INCHES/CM/MM

- New Access Method aTable

- see fwh\samples\graphprn.prg

* New bitmap function HDCBITMAP( hDC, nTop, nLeft, nBottom, nRight ) --> hBmp
Can extract any part of HDC as bitmap.

* FWMARIALIB:
* FWMariaConnection and FWMariaRowSet (both)
New Data aSql --> Array of last 10 sql statements executed
New Data cLastSQL -> Last sql statement executed
New Data cSaveSQL (RowSet object only) Last sql saving any data

* PRINTER:
Can now save preview to jpg / png files also same way like pdf/emf.
eg:
PRINT oPrn [PREVIEW] FILE "name.jpg/png"
If preview has more pages, first page is saved with the speicified name
and other pages are saved with <name><pagenum>.jpg/png.
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41314
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: New FTDN February/Febrero 2021 (FWH 21.02) revised 01

Postby Antonio Linares » Fri Apr 02, 2021 4:49 pm

February 2021 (Revised Build)
=============================

* MariaDB RowSet: Due to a bug created in the original release,
Requery() is crashing with runtime error. Fixed.
http://forums.fivetechsupport.com/viewt ... 89#p239989

* TPanel: Enhancement. Till now it was not possible to navigate between
the controls of a panel and its parent window with tab/enter/up/down
keys. Now the controls of the panel and the container window/dialog
are seemlessly integrated.

* Scrollpanel: When clause of any control was breaking navigation.
Fixed.
http://forums.fivetechsupport.com/viewt ... 9f7ca44f79

* Fix: FW_ExcelToDBF() is not fuctioning properly in some cases with
newer versions of Harbour. Fixed. For details
http://forums.fivetechsupport.com/viewt ... 9f7ca44f79
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41314
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: New FTDN February/Febrero 2021 (FWH 21.02)

Postby Antonio Linares » Mon Apr 05, 2021 6:43 am

Febrero 2021 (Construcción Revisada)
====================================

* Conjunto de filas (RowSet) en MariaDB: Debido a un error creado en la versión original,
ReQuery() da error en tiempo de ejecución. Solucionado !!!
viewtopic.php?f=6&t=40194&p=239989#p239989

* TPanel: Mejora. Hasta ahora no era posible navegar entre los controles de un panel y
su ventana principal con las teclas tab/enter/arriba/abajo. Ahora los controles del
panel y la ventana/cuadro de diálogo del contenedor están perfectamente integrados.

* Scrollpanel: Cuando la clase TScrollpanel no contola la claúsula de cualquier control,
se rompía la navegación. Solucionado !!!
viewtopic.php?f=3&t=40162

* Corrección: FW_ExcelToDBF() no está funcionando correctamente en algunos casos con la versión más
reciente de Harbour. Solucionado !!!
Para más detalles:
viewtopic.php?f=3&t=40176


Febrero 2021
============

* Corrección: En las funciones FW_ReadImage() y FW_DrawImage() en (fwh\source\imgtxtio.prg).
Estas funciones están fallando cuando un campo memo contiene datos de tipo imagen y es
proporcionado como parámetro. Era necesario primero asignar el valor del campo a otra variable y
entonces llamar a estas funciones. Solucionado ahora !!!
Ejemplos:
FW_ReadImage( nil, FIELD->IMAGE ) estaba fallando
cImage := FIELD->IMAGE
FW_ReadImage( nil, cImage ) estaba funcionando.
Lo mismo con FW_DrawImage().
Ahora es posible llamar a ambas funciones directamente con el campo.
FW_ReadImage( nil, FIELD->IMAGE ) y FW_DrawImage( hDC, FIELD->IMAGE,...),ambas funcionan ahora.
Muchos otros controles pueden mostrar imágenes como XImage, Bitmap, Buttons, etc..., también
tenían el mismo problema y ahora se ha solucionad.

* Corrección: FW_StriCmp(): Los resultados eran erróneos si uno de los valores era un campo memo.
Solucionado ahora !!!

* FW_ArrayAsList( aArray, [cDelim = ","], [lTrim = .f.] )
Si el nuevo tercer parámetro es .T., las cadenas de caracteres se recortan.

* Nueva función FW_CRC8( cStr ) --> nCRC8 (source\function\fwcrc8.c)
viewtopic.php?f=6&t=40052&p=239014#p239014

* Nueva función IsRomanNumber( cText ) --> True, si cText es un número romano válido.

* Nueva función FW_ProperCase( cText, [lRomanUpper=.t.] ) --> cProper
Convierte texto con cada palabra en mayúsculas. Por defecto, los números romanos son
escritos en mayúsculas.
? FW_ProperCase( "he is in cLaSS-viii" ) --> "He Is In Class-VIII"

* TGET:
- oGet:oGet:Name muestra el nombre de la variable de control, en lugar del nombre de la
variable que se está editando, en caso de que el objeto "get" se cree a partir del código fuente.
Solucionado !!!
viewtopic.php?f=3&t=40015&p=239036#p239036

- Nueva claúsula en el comando @ r, c GET:
CASE UPPER o CASE LOWER o CASE PROPER. Fuerza el uso de mayúsculas/minúsculas/adecuada a la
hora de la introducción de los datos.
Nota: La presencia del carácter "!" en la claúsula picture ignora esta configuración.

- Nuevo método SetCase( "UPPER/LOWER/PROPER" ) --> cPrevCase

- Mejora en los comandos SAY/GET. Nueva subclaúsula WIDTH <nSayWidth> en la claúsula SAY <cSay>.
Ejemplo: @ nRow, nCol SAY cSay PICTURE "@!" WIDTH 100 GET oGet ...

* XImage.prg:
- Método Save( lAsViewed, cFile, nQuality ), cuando lAsViewed es .T., está guardando sólo la
imagen básica pero no cualquier dibujo a mano alzada realizado por el usuario sobre la imagen.
Solucionado !!!
Window.prg, imgtxtio.prg y gdipfwh.cpp se han modificado para este propósito.
viewtopic.php?f=6&t=40035&p=239101&sid=a787d329bf4e2e1cccab0ba0f5148432#p239101

- Se ha solucionado una pérdida de recursos en el método Paste().

* TClipboard:
- El método SetBitmap( ohBitmap ) informa de pérdida de recursos. Solucionado !!!
viewtopic.php?f=6&t=40035&p=239130&sid=32a11be08a7956146c2a481125f368d1#p239130

* Mejora: En la función FW_ExcelToDbf( oRange, cFieldList, lHasHeaders, bProgress )
Ahora el parámetro cFieldList puede ser también una matriz de dos dimensiones:
El primer elemento de cada ítem contiene el nombre del campo y el segundo elemento contiene la cabecera
correspondiente en el rango de Excel o número de la columna de Excel o número de columna alfa como "A", "C", "AB", etc.
viewtopic.php?f=3&t=39960&p=239170#p239170

* Report.prg:
- Corrección: La exportación a Excel da un error de ejecución cuando el informe tiene grupos y también cuando la
primera columna tiene totales. Solucionado !!!

* XBrowse:
- El método ReArrangeCols() ahora incluye también la función Refresh() y devuelve Self en lugar de NIL.

- Muchos métodos usados comúnmente ahora devuelven Self en lugar de NIL, lo que facilita la llamada a varios métodos en
una sola línea de código.

- Nuevo método SetMultiSelectCol( [uCol], [lFooter] )
Si se llama sin parámetros o uCol como NIL, se inserta una nueva columna como primera columna y se establece como
columna multi-selección. Si se especifica uCol esa columna se establece como columna de selección múltiple.
[lFooter] por defecto es oBrw:lFooter y se establece para mostrar el total de columnas seleccionadas.
Esta columna muestra casillas de verificación que indican el estado de selección de la fila.
La cabecera muestra una casilla de verificación que indica si todas las filas están seleccionadas o no.
El doble clic, el Ctrl-Clic o la tecla de espacio en esta columna conmutan la selección. Si Brw:lDblClick es nulo,
un doble clic en cualquier columna activa la selección si la columna bLDclickdata de esa columna también es nulo.
Si FastEdit es .T., al pulsar la tecla espacio en cualquier columna se activa la selección.
Si se pulsa la tecla Mayúsculas, se seleccionan todas las filas desde la última selección hasta la fila actual.
Hacer clic en la cabecera activa la selección de todas las filas.
viewtopic.php?f=3&t=40107

- Cuando oBrw:aSelected tiene sólo un registro, todas las filas se envían al informe/Excel. Solucionado !!!

* TGRAPH:
- Nuevo método Define(), soportado por el nuevo comando DEFINE GRAPH para crear un objeto gráfico,
no como un control en un diálogo/ventana. Esto está pensado básicamente para imprimir uno o más gráficos
sin crear un diálogo/ventana, así como para generar y guardar gráficos como imágenes.

#xcommand DEFINE GRAPH <oGraph> [ SIZE <nWidth>, <nHeight> ] ;
[ TITLE <cTitle> ] ;
[ <pixel: PIXEL > ] ;
[ <l3d: 3D> ] ;
[ <lxGrid: XGRID> ] ;
[ <lyGrid: YGRID> ] ;
[ <lxVal: XVALUES> ] ;
[ <lyVal: YVALUES> ] ;
[ <lLegends: LEGENDS> ] ;
[ TYPE <nType> ] ;
[ FONT <oFont> ] ;
=> ;
<oGraph> := TGraph():Define( <nWidth>, ;
<nHeight>, <cTitle>, <.l3d.>, <.lxGrid.>, ;
<.lyGrid.>, <.lxVal.>, <.lyVal.>, <.lLegends.>, <nType>, <oFont> )

Este comando crea un objeto TGraph sin mostrar ninguna caja de diálogo/ventana como un control.

Este objeto puede ser usado para generar y guardar una imagen usando oGraph:SaveAsImage( cFile ),
donde el parámetro cFile puede ser cualquiera de los siguientes formatos gráficos:
BMP, PNG, JPG, TIF, etc ...

Este objeto también puede ser usado para imprimir o generar un fichero PDF usando el nuevo comando de impresión

@ nRow, nCol PRINT TO oPrn GRAPH oGraph SIZE nWidth,nHeight INCHES/CM/MM

- Nuevo método de acceso aTable.

- Revisa el ejemplo fwh\samples\graphprn.prg

* Nueva función de mapa de bits HDCBITMAP( hDC, nTop, nLeft, nBottom, nRight ) --> hBmp
Puede extraer cualquier parte de HDC como mapa de bits.

* FWMARIALIB:
* FWMariaConnection and FWMariaRowSet (ambas)
Nueva Data aSql --> Conjunto de las 10 últimas sentencias sql ejecutadas.
Nueva Data cLastSQL -> Última sentencia sql ejecutada.
Nueva Data cSaveSQL (sólo objeto RowSet) Último sql que guarda cualquier dato.

* PRINTER:
Ahora puede guardar la vista previa en archivos JPG/PNG también de la misma manera como PDF/EMF.
Ejemplo:
PRINT oPrn [PREVIEW] FILE "name.jpg/png"
Si la vista previa tiene más páginas, la primera página se guarda con el nombre especificado y
las otras páginas se guardan con <nombre><pagenum>.jpg/png.
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41314
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain


Return to WhatsNew / Novedades

Who is online

Users browsing this forum: No registered users and 29 guests