New FTDN August/Agosto 2020 (FWH 20.08)

New FTDN August/Agosto 2020 (FWH 20.08)

Postby Antonio Linares » Sun Sep 20, 2020 11:38 am

August 2020
===========

* adofuncs.prg:
- function FW_OpenAdoConnection( acConStr/Spec, lShowErr, @oErr ) --> oCon
New 3rd parameter receives the ado error object, in case of error.

* msgget.prg: Enhancement: Password Get now has button to show/hide
password.

* FWMariaConnection:
- New Readonly DATAS OS, lWindows: OS of the Server and if it is Windows.
- New method DbExists( [@]cDatabaseName ) --> lExists
The comparsion is case insensitive even on Linux.
If the fist parameter is by reference, the database name with correct
case is returned in the parameter.
- Enhanced Method TableExists( [@]cTableName, [[@]cDatabaseName], ;
[[@]cTableType] ) --> lExists.
a) Temporary tables are also covered in this version.
b) cTableName can also be given as db.table.
c) cTableName and cDatabase names are case insensitive except for
temporary tables.
d) if cTableName and optional cDatabaseName are by reference, names
with correct case are returned.
e) 3rd parameter cTableType can be
- empty to check for base tables/views/temporary tables
- "BASE" to check only basetables
- "VIEW" to check only for views.
- "TEMPORARY" to check only for temporary tables.
- "WRITE" to check for base and temporary tables but not views.
- If empty password is passed by reference, the table type, i.e.,
BASE TABLE/VIEW/TEMPORARY is returned in the parameter.
- Methods RowSet(tablename), Insert, etc are case insensitive and
now support temporary tables also.

- Method CreateTableSQL( cTable ) --> SQL to create the table.
Now, cTable can be a View also and returns SQL to create the view.

- Enhanced method SaveToDBF( cTable/cSql, cDbf/cNewAlias, lForUpdate )
If the 2nd parameter is an unused alias name, a temporary dbf with
that alias is created with the data. This can be used for editing,
appending and then updating the table with
( cAlias )->( oCn:UploadFromAlias( cTable ) )
This is another way of batch mode editing.


* Dialog.prg: When a dialog is activated as mdichild, the tab order of
the controls is reversed. Fixed now.
viewtopic.php?f=3&t=36244&p=234254#p234254

- samples\mdidlg.prg revised.

* TWindow methods WinStyle( nStyle, [lOnOff] ) and WinExStyle( nStyle, [lOnOff] )
apply to windows, dialogs and all controls.
In case of dialogs and controls created on dialogs, it is no more necessary
to use the methods in the on init clause of dialog. It is now possible to use
them even before activating the dialog.

* TGraph.prg: Fix: DATA lFlat is not initialized in case of Redefine() resulting
in runtime error. Fixed.

* Enhancement: MENUITEM ... WHEN clause now receives oMenuItem (Self) as the parameter.

* Enhancement: samples\fivedbu.prg now shows as selected the current index tag from
the button "index" side popup.

* XBrowse:
- New column data: bHRClickMenu: If specified, this will be added to the
SetColumns popup menu when header is right-clicked.

- SetColumns() popup menu is aligned with the bottom of header.

- method DelCol() was changing nCreationOrders of all the columns incorrectly,
when deleted after swapping/moving some columns. fixed.

- GroupHeaders:
- When group headers are specified, oBrw:nHeaderHeight assigned by the programmer
was being ignored. Now this value is considered.
- Sixth parameter nHeight is added to method SetGroupHeader. If specified, this value
is used for the group header.
Method SetGroupHeader( cGroupHeader, nFromCol, nLastCol, oFont, nAlign, nHeight )

- DATAS bClrStd, bClrSel and bClrSelFocus:
- Both browse and columns have these Datas. When the browse is initialized (in the
Adjust() method) datas from browse are copied to all the columns, except where
the datas of individual columns are already diectly assigned with different values.
From that time, all cells are painted using column's datas only (except when
oBrw:lFastDraw is set to .t.) ignoring any further changes to the datas of browse
object. As a result any changes made to the datas of browse at runtime are ignored.
only way is to change all or any columns datas.
From this version, cells are painted using columns' datas when specifically assigned
or the current datas of the browse object. This makes it possible to change the
colors of the cells at runtime by changing the datas of the browse object.
- Now all these datas are evaluated with browse object as the parameter.
When these datas are evaluated by the column object, they are evaluated with
browse object and column object as two parameters.

- Method Adjust(): Fixed memory leak by creating hRowPen, withour releasing the existing
pen. viewtopic.php?p=234672#p234672

* Report:
- New DATA nAlignTitle in TRColumn class. This makes it possible to have
alignment for the column title different from column data

Example usage:
COLUMN oCol TITLE "SALARY" DATA FIELD->SALARY FONT 1
oCol:nAlignTitle := RPT_CENTER
Now the title is displayed centered, while data is aligned right.
viewtopic.php?f=6&t=39312

* TArrayData: Method SetFilter( cFilter ) fails when the filter expression
contains a field name more than once. This is due to a bug in the function
FW_ExprnAsBlock() in fwh\source\function\vstrfun1.prg. Now fixed.
viewtopic.php?f=6&t=39322&p=234654#p234654

* function FWCheckExpression( cExpression, [uVal], [@uRet] ) --> lValid
Optional 3rd new param by ref contains the result on evaluation of the expression.

* xbrowser.prg: Pressing Ctrl-E + Ctrl-X enables entering any expression that will
be evaluated and result displayed. In the expression, we can use variables oBrw and
oCol, which are current browse and selected column object.
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 August/Agosto 2020 (FWH 20.08)

Postby Antonio Linares » Tue Sep 22, 2020 4:33 pm

Agosto 2020
===========

* adofuncs.prg:
- Función: FW_OpenAdoConnection( acConStr/Spec, lShowErr, @oErr ) --> oCon
Nuevo tercer parámetro que recibe el objeto error de ADO, en caso de error.

* msgget.prg: Mejora: Ahora los GET de contraseñas tienen un botón para mostrar/ocultar
la contraseña.

* FWMariaConnection:
- Nuevas DATAs de solo lectura: OS y lWindows. OS es de tipo carácter y lWindows es de
tipo lógico. OS, sistema operativo del servidor y lWindows, si es Windows el sistema
operativo.
- Nuevo método DbExists( [@]cDatabaseName ) --> lExists
La comparación no distingue entre mayúsculas y minúsculas incluso en Linux.
Si el primer parámetro es por referencia, el nombre de la base de datos con el tipo
correcto (mayúsculas ó minúsculas) es devuelta en el parámetro.
- Enhanced Method TableExists( [@]cTableName, [[@]cDatabaseName], ;
[[@]cTableType] ) --> lExists.
a) Las tablas temporales son también cubiertas en esta versión.
b) cTableName puede ser escrita como db.tabla
c) Los nombres de cTableName y cDatabase no distinguen entre mayúsculas
y minúsculas, excepto en las tablas temporales.
d) Si cTableName y opcionalmente cDatabaseName son por referencia, se devuelven los
nombres con el tipo correcto.
e) El tercer parámetro cTableType puede ser:
- Vacío para verificar tablas base/vistas/tablas temporales.
- "BASE" para comprobar sólo las tablas base.
- "VIEW" para comprobar sólo las vistas.
- "TEMPORARY" para comprobar sólo las tablas temporales.
- "WRITE" para comprobar sólo las tablas base y temporales, pero no las vistas.
- Si se pasa una contraseña vacía por referencia, el tipo de tabla, por ejemplo,
BASE TABLE/VISTA/TEMPORARY es devuelta en el parámetro.
- Methods RowSet(tablename), Insert, etc ..., no distinguen entre mayúsculas y minúsculas
y ahora también admiten tablas temporales.
- Method CreateTableSQL( cTable ) --> SQL para crear la tabla.
Ahora, cTable también puede ser una Vista y devuelve la sentencia SQL para crear la vista.

- Enhanced method SaveToDBF( cTable/cSql, cDbf/cNewAlias, lForUpdate )
Si el segundo parámetro es un nombre de alias no utilizado, se crea una base de datos
temporal con ese alias con los datos. Esto se puede usar para editar, añadir y luego
actualizar la tabla con ( cAlias )->( oCn:UploadFromAlias( cTable ) ).
Esta es otra forma de edición en modo por lotes.

* Dialog.prg: Cuando un cuadro de diálogo es activado como hijo MDI, el orden de tabulación
de los controles se invierte. Solucionado.
viewtopic.php?f=3&t=36244&p=234254#p234254

- Revisado samples\mdidlg.prg

* Los métodos de la clase TWindow, WinStyle( nStyle, [lOnOff] ) y WinExStyle( nStyle, [lOnOff] )
se aplican a ventanas, cuadros de diálogos y a todos los controles.
En el caso de cuadros de diálogo y controles creados en cuadros de diálogo, ya no es necesario
utilizar los métodos en la cláusula on init del cuadro de diálogo. Ahora es posible utilizarlos
incluso antes de activar el diálogo.

* TGraph.prg: Corrección: La DATA lFlat no es inicializada en caso de usar Redefine(), resultando
un error en tiempo de ejecución. Solucionado.

* Mejora: La claúsula MENUITEM ... WHEN ahora recibe oMenuItem (Self) como parámetro.

* Mejora: En el ejemplo, samples\fivedbu.prg ahora muestra como seleccionada la etiqueta de índice
actual de el botón emergente lateral "índice".

* XBrowse:

- Nueva DATA de columna: bHRClickMenu: si se especifica, esta se agregará al menú emergente SetColumns
cuando se haga clic con el botón derecho en el encabezado.

- SetColumns() el menú emergente está alineado con la parte inferior del encabezado.

- El método DelCol() estaba cambiando nCreationOrders de todas las columnas incorrectamente,
cuando se elimina después de intercambiar/mover algunas columnas. Solucionado.

- GroupHeaders:
- Cuando se especifican los encabezados de grupo, oBrw:nHeaderHeight asignado por el programador se
ignoraban. Ahora se tiene en cuenta este valor.
- El _ parámetro nHeight se añade al método SetGroupHeader. Si se especifica, este valor se
utiliza para el encabezado del grupo.
Method SetGroupHeader( cGroupHeader, nFromCol, nLastCol, oFont, nAlign, nHeight )

- DATAS bClrStd, bClrSel and bClrSelFocus:
- Tanto el browse como las columnas tienen estas DATAs. Cuando se inicializa el browse
(en el método Adjust()), las DATAs del browse se copian en todas las columnas, excepto
donde las DATAs de las columnas individuales ya están asignadas directamente con valores
diferentes.
A partir de ese momento, todas las celdas se pintan usando solo las DATAs de la columna
(excepto cuando oBrw:lFastDraw está configurado como .T.) ignorando cualquier cambio adicional
en las DATAs del objeto browse. Como resultado, se ignoran los cambios realizados en las
DATAs del browse en tiempo de ejecución.
La única forma es cambiar todos o algunas DATAs de las columnas.
A partir de esta versión, las celdas se pintan utilizando las DATAs de las columnas cuando se asignan
específicamente o las DATAs actuales del objeto browse. Esto hace posible cambiar los colores
de las celdas en tiempo de ejecución cambiando las DATAs del objeto browse.
- Ahora todas estas DATAs se evalúan con el objeto browse como parámetro.
Cuando estas DATAs son evaluadas por el objeto columna, se evalúan con el objeto browse y el objeto
columna como dos parámetros.

- Método Adjust(): Se ha corregido la pérdida de memoria al crear hRowPen, sin soltar el lápiz existente.
viewtopic.php?p=234672#p234672

* Report:
- Nuevo DATA nAlignTitle en la clase TRColumn. Esto hace posible tener una alineación para el
título de la columna diferente de las DATAs de la columna.
Ejemplo de uso:
COLUMN oCol TITLE "SALARY" DATA FIELD->SALARY FONT 1
oCol:nAlignTitle := RPT_CENTER
Ahora el título se muestra centrado, mientras que los datos se alinean a la derecha.
viewtopic.php?f=6&t=39312

* TArrayData: El método SetFilter( cFilter ) falla cuando la expresión de filtro contiene
un nombre de campo más de una vez. Esto se debe a un error en la función FW_ExprnAsBlock()
en fwh\source\function\vstrfun1.prg. Solucionado.
viewtopic.php?f=6&t=39322&p=234654#p234654

* Función FWCheckExpression( cExpression, [uVal], [@uRet] ) --> lValid
El tercer nuevo parámetro opcional por referencia contiene el resultado de la evaluación de la
expresión.

* xbrowser.prg: Presionando Ctrl-E + Ctrl-X permite asignar cualquier expresión que
será evaluada y el resultado mostrado. En la expresión, podemos usar las variables oBrw y oCol, que son
el objeto browse actual y el objeto columna seleccionado.
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 August/Agosto 2020 (FWH 20.08)

Postby Antonio Linares » Sun Oct 04, 2020 8:32 am

FWH 20.08.1 already published

August 2020 (Revision)
==============

* TGet.prg:
- Password Gets created from resource are not working in a non-unicode application
in version 2008. Fixed now.
viewtopic.php?f=3&t=39420

- Shift-home/end is not selecting block in case of unicode gets and password gets. fixed.

* XBrowse:
- Enhancement to method ToCsv( [cFile], [aCols], [lHeaders], [cTrue], [cFalse], [cDelim] )
--> cFile/cCsv
New 6th optional parameter cDelim: If specified, used instead of comma.
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 August/Agosto 2020 (FWH 20.08)

Postby Antonio Linares » Sun Oct 04, 2020 10:10 am

Agosto 2020 (Revisión)
======================

* TGet.prg:
- Las contraseñas creadas a partir de recursos no funcionan en una aplicación que
no sea unicode en la versión 20.08. Solucionado.
viewtopic.php?f=3&t=39420
- Shift-Home/End no está seleccionando el bloque en caso de GETs unicode y GETs de
contraseñas. Solucionado.

* XBrowse:
- Se ha mejorado el método ToCsv( [cFile], [aCols], [lHeaders], [cTrue], [cFalse], [cDelim] ) --> cFile/cCsv
Nuevo _ parámetro (opcional) cDelim: Si se especifica. se usa en lugar de la coma.
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 22 guests