New FTDN December 2019 (FWH 19.12)

New FTDN December 2019 (FWH 19.12)

Postby Antonio Linares » Sat Dec 21, 2019 5:59 pm

October, November, December 2019
======================

* Fix: TArratData: Bold font internally created in the method ShowTable()
is not being released. Fixed.

* Fix: TGraph: When :lViewVal is true and if ::aSeries[x,5] is nil raises
runtime error. This happens when values of :aSeries are assigned manually
by the programmer, instead of using the prescribed method AddSerie()
Fixed.

* Fix: FWMariaRowSet: Runtime error when using methods CancelBatch() and
IsBatchEdited() introduced in FWH1909 fixed.

* FWMariaRowSet: Now accepts SQL statement "WITH RECURSIVE "
viewtopic.php?f=3&t=37877&p=226372&hilit=RECURSIVE#p226372

* FWMariaRowSet: New sample fwh\samples\marialok.prg for locking records while
editing.
viewtopic.php?f=3&t=37928

* FWMariaRowSet METHOD EditBaseRecord( cFieldList, lNew, bEdit, oBrw, lLock )
If lLock is set to .t. or a codeblock is specified, the record is locked while
reading and on failure to read, the codeblock is evaluated with the rowset as
parameter.
Till FWH1909, read is attempted with clause "LOCK IN SHARE MODE". This approach
was not giving the expected results as other users also are able to read the
record for lock and attempt to write was resulting in deadlock issues.
This is now modified to read with clause "FOR UPDATE". This change is working
as expected.
viewtopic.php?f=3&t=37928

* FWMariaRowSet(): Method NewSql() fix.

* Fix: Due to a bug in the function FW_ReadImage() in imgtxtio.prg, painting
of png images by TBtnBmp is of low quality. Fixed.
viewtopic.php?f=3&t=37944&p=226800#p226800

* XBrowse:
- Fix: In some cases, if :cFooterPicture is specified without specifying
:cEditPicture, the cFooterPicture is ignored. Fixed.
viewtopic.php?f=3&t=37938&p=226804#p226804

- Improved painting of transparent buttons.

- Fix: EDIT_LISTBOX: Text corresponding to a blank item in aEditListBound is
not displayed. Fixed.
viewtopic.php?f=3&t=37965

- New data nLbxAt in the column object. Has meaning only when nEditType is
EDIT_LISTBOX. (Not applicable to EDIT_GET_LISTBOX also).
This data is set to the item number in the aEditListTxt/Bound for each row
and can be used to display/set values in other columns.
See: fwh\samples\xbrlbxat.prg

* Window class: Methods SaveState() and RestoreState() were not working with
MDICHILD windows. Now fixed.
viewtopic.php?f=6&t=37962

* Enhancement: TClipBoard class: Now TClipBoard class works even when no window
or dialog is opened in the application.
TClipBoard():New():SetText( "SomeText" ) works even if there is no window or
dialog opened.

* Enhancement: DTPICKER can now be used for DateTime values also
New clause "STYLE <nStyle>"
Optional nStyle can be a combination of any of the styles defined in
dtpicker.ch
#define DTS_UPDOWN 0x0001 // use UPDOWN instead of MONTHCAL
#define DTS_SHOWNONE 0x0002 // allow a NONE selection
#define DTS_SHORTDATEFORMAT 0x0000 // use the short date format DEFAULT
#define DTS_LONGDATEFORMAT 0x0004 // use the long date format

* Fix: Report.prg: In the preview of a report, the button Excel remains
disabled wrongly. This was a bug introduced in FWH1909. Fixed now.
viewtopic.php?f=6&t=38053

* Treatment of ADO Date and DateTime fields/values
XBrowse, TDataRow, TRecSet and function FWAdoStruct( oRs )

In many databases like MSAccess, MSSQL, Oracle only DateTime field type is
avaiable for storing both simple dates and date-time values. Whether a
particular field is to be treated as Date or DateTime field mostly depends
on the usage. Accordingly FWH libraries treat fields containing pure Date
values (without any time-part) as Date fields and fields containing DateTime
values are treated as DateTime fields. While this approach works satisfactorily
in most cases, there could be exceptions and the programmer needs to have
the facility to override the default behavior.

Databases like MYSQL,POSTGRE provide separate field types for Date and DateTime
and the above approach is not relevant in these cases.

Now from this version:
In cases of databases MYSQL,POSTGRE field types as reported by ADO are used
irrespective of the values stored.
In case of other databases, the existing default behaviour will continue and
the programmer can override by:

oCol:cDataType := .T. // xbrowse
oRec:FieldType( "fieldname", "T" ) // DataRow and TRecSet
viewtopic.php?f=3&t=37792

* TGet:
- A codeblock can be specified in the COLOR clause instead of color constant.
If a codeblock is specified, it is assigned to oGet:bColor.
The codeblock is evaluated on every refresh with the get object as parameter.
The codeblock should return an array of two colors, which will be used as
foreground and background colors.

- Fix: When text is pasted in a Password Get, the entire text is converted
into asterisks. Fixed.
viewtopic.php?f=3&t=37880

- Fix: In Unicode applications, disabled password get was displaying the text.
Fixed.

- New: Method ShowPassword()
Method MaskPassword( [nMaskChar] )
DATA nPasswordChar [:= nChar] // Gets/Sets password mask char

- Now a bitmap handle also can be specified in the clause BITMAP.
viewtopic.php?f=3&t=38244

* Combobox Enhancement:
Additional clause "OWNERDRAW <uOwnerDraw>" allows specifying a function for
owner draw of combobox items.
viewtopic.php?f=3&t=37878
Samples\cbxowner.prg
- The function <uOwnerDraw> is suppied with parameters Combobox object, nIdCtl,
oItemStruct, nPItem. oItemStruct is an object of TDrawItemStruct, with the same
datas corresponding to DRAWITEMSTRUCT.
https://docs.microsoft.com/en-us/window ... itemstruct

oItemStruct DATAs are
CtlType, CtlID, itemID, itemAction, itemState, hwndItem, hDC, aRect, itemData,
nTop, nLeft, nBottom, nRight, nWidth, nHeight.
All the datas are readonly. Usage can be seen in the above sample.

* TBlockChain CLASS:
Compatibility with xHarbour: fixed

* FWPDF class: New datas added to store METDATA information in the pdf.
cAuthor,cCreator,cTitle,cSubject
lTimeStamp (default .T.) stores the creation date time
cCreator can be a character string or a logical .T.. If .t., the
name of the exe without path is stored as "Application" in METADATA.

* function FW_AdoExportToDBF( oRs, cDbf, [lEditStruct] )
When the recordset has AutoIncrement field, that field is being
created as an autoincrement field in DBF also. This resuls in different
numbers in the exported DBF. Now this field is created as a simple
numeric field so that the exported data exactly matches the source data.

* Fix: MDI frame window. In a Unicode application, changing the title of the
main MDI frame window was not working correctly. Fixed.
viewtopic.php?f=3&t=38106&p=227902#p227902
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 December 2019 (FWH 19.12)

Postby Jimmy » Sat Dec 21, 2019 8:59 pm

hi,

em, äh ... where do i get new Version :?:

Use your login and password to download it
greeting,
Jimmy
User avatar
Jimmy
 
Posts: 1585
Joined: Thu Sep 05, 2019 5:32 am
Location: Hamburg, Germany

Re: New FTDN December 2019 (FWH 19.12)

Postby Antonio Linares » Thu Jan 02, 2020 12:45 pm

Octubre, Noviembre, Diciembre 2019
==================================

* Corrección: TArratData: La fuente en negrita creada internamente en el método ShowTable()
no está siendo liberado. Corregido.

* Corrección: TGraph: Cuando :lViewVal es verdadero y si ::aSeries[x, 5] es nulo genera un
error de tiempo de ejecución. Esto sucede cuando el programador asigna manualmente los valores
de :aSeries, en lugar de utilizar el método prescrito AddSerie(). Corregido.

* Corrección: FWMariaRowSet: Error en tiempo de ejecucción cuando se usan los métodos
CancelBatch() y IsBatchEdited(), introducido en FWH1909. Corregido.

* Corrección: FWMariaRowSet: Ahora acepta la sentencia SQL "WITH RECURSIVE".
viewtopic.php?f=3&t=37877&p=226372&hilit=RECURSIVE#p226372

* FWMariaRowSet: Nuevo ejemplo fwh\samples\marialok.prg para bloquear registros mientras
editamos.
viewtopic.php?f=3&t=37928

* FWMariaRowSet METHOD EditBaseRecord( cFieldList, lNew, bEdit, oBrw, lLock )
Si lLock está configurado en .T. o se especifica un bloque de código, el registro se bloquea
durante la lectura y, si no se lee, el bloque de código se evalúa con el conjunto de filas
como parámetro.
Hasta FWH1909, la lectura se intenta con la cláusula "LOCK IN SHARE MODE".
Este enfoque no estaba dando los resultados esperados, ya que otros usuarios también pueden
leer el registro bloqueado y el intento de escribir estaba dando lugar a problemas de punto
muerto.
Esto ahora se modifica para leer con la cláusula "FOR UPDATE". Este cambio está funcionando
como se espera.
viewtopic.php?f=3&t=37928

* FWMariaRowSet(): Corregido el método NewSql().

* Corrección: Debido a un error en la función FW_ReadImage() en imgtxtio.prg, el pintado de
imágenes png por TBtnBmp es de baja calidad. Corregido.
viewtopic.php?f=3&t=37944&p=226800#p226800

* XBrowse:
- Corrección: En algunos casos, si :cFooterPicture se especifica sin especificar :cEditPicture,
se ignora cFooterPicture. Corregido.
viewtopic.php?f=3&t=37938&p=226804#p226804

- Se ha mejorado el pintado de los botones transparentes.

- Corrección: EDIT_GET_LISTBOX: El texto correspondiente a un elemento en blanco en aEditListBound
no se muestra. Corregido.
viewtopic.php?f=3&t=37965

- Nueva DATA nLbxAt en el objeto columna. Tiene únicamente significado cuando nEditType es
EDIT_LISTBOX. (No es aplicable también a EDIT_GET_LISTBOX).
Esta DATA se establece en el número de artículo en aEditListTxt/Bound para cada fila y se puede
usar para mostrar/establecer valores en otras columnas.
Ver: fwh\samples\xbrlbxat.prg

- Window class: Métodos SaveState() y RestoreState() no funcionaban con ventanas MDICHILD.
Ahora se ha corregido.
viewtopic.php?f=6&t=37962

* Mejora en la clase TClipBoard: Ahora la clase TClipBoard funciona incluso cuando no se abre
ninguna ventana o diálogo en la aplicación.
TClipBoard():New():SetText( "SomeText" ) funciona incluso si no hay ninguna ventana o diálogo abierto.

* Mejora: DTPICKER ahora también se puede usar para valores de fecha y hora (DateTime).
Nueva cláusula "STYLE <nStyle>"
La claúsula opcional nStyle puede ser una combinación de cualquiera de los estilos definidos en
dtpicker.ch.
#define DTS_UPDOWN 0x0001 // use UPDOWN en lugar de MONTHCAL
#define DTS_SHOWNONE 0x0002 // permite una selección NINGUNA
#define DTS_SHORTDATEFORMAT 0x0000 // usa el formato de fecha corta (por defecto)
#define DTS_LONGDATEFORMAT 0x0004 // usa el formato de fecha larga

* Corrección: Report.prg: en la vista previa de un informe, el botón Excel permanece
deshabilitado incorrectamente. Este fue un error introducido en FWH1909. Corregido ahora.
viewtopic.php?f=6&t=38053

* Tratamiento de los campos/valores Fecha (Date) y Fecha/Hora (DateTime) en ADO,
XBrowse, TDataRow, TRecSet y en la función FWAdoStruct( oRs )

En muchas bases de datos como MSAccess, MSSQL, Oracle, solo el tipo de campo DateTime
está disponible para almacenar fechas simples y valores de fecha y hora. Si un campo en
particular debe tratarse como un campo de fecha o fecha y hora depende principalmente del uso.
En consecuencia, las bibliotecas FWH tratan los campos que contienen valores de fecha puros
(sin ninguna parte de tiempo) como campos de fecha y los campos que contienen valores de fecha y hora
se tratan como campos de fecha y hora. Si bien este enfoque funciona satisfactoriamente en la mayoría
de los casos, podría haber excepciones y el programador debe tener la facilidad de anular el
comportamiento predeterminado.

Las bases de datos como MYSQL, POSTGRESQL proporcionan tipos de campo separados para fecha y fecha y hora,
el enfoque anterior no es relevante en estos casos.

Ahora desde esta versión:
En caso de bases de datos MYSQL, POSTGRESQL, los tipos de campo informados por ADO se utilizan
independientemente de los valores almacenados.
En el caso de otras bases de datos, el comportamiento predeterminado existente continuará y el
programador puede anular:

oCol:cDataType := .T. // xbrowse
oRec:FieldType( "fieldname", "T" ) // DataRow y TRecSet
viewtopic.php?f=3&t=37792

* TGet:
- Se puede especificar un bloque de código en la cláusula COLOR en lugar de la constante de color.
Si se especifica un bloque de código, se asigna a oGet: bColor.
El bloque de código se evalúa en cada actualización con el objeto get como parámetro.
El bloque de código debe devolver una matriz de dos colores, que se utilizará como
colores de primer plano y fondo.

- Corrección: Cuando un texto es pegado en un Get para contraseñas, el texto entero es convertido a
asteriscos. Corregido.
viewtopic.php?f=3&t=37880

- Corrección: En aplicaciones Unicode, los get para contraseñas deshabilitados, mostraban el texto.
Corregido.

- Nuevo: Método ShowPassword()
Método MaskPassword( [nMaskChar] )
DATA nPasswordChar [:= nChar] // Obtiene/establece la máscara de la contraseña

- Ahora también se puede especificar un identificador de mapa de bits en la cláusula BITMAP.
viewtopic.php?f=3&t=38244

* Mejoras en Combobox:
La claúsula adicional "OWNERDRAW <uOwnerDraw>" permite especificar una función para dibujar los
componentes (items) del combobox.
viewtopic.php?f=3&t=37878
Samples\cbxowner.prg
- La función <OwnerDraw> se suministra con los parámetros del objeto Combobox, nIdCtl,
oItemStruct, nPItem. oItemStruct es un objeto de TDrawItemStruct, con los mismos datos
correspondientes a DRAWITEMSTRUCT.
https://docs.microsoft.com/en-us/window ... itemstruct

Las DATAs de oItemStruct son:
CtlType, CtlID, itemID, itemAction, itemState, hwndItem, hDC, aRect, itemData,
nTop, nLeft, nBottom, nRight, nWidth, nHeight.
Todas las DATAs son de sólo lectura. Su uso puede vere en el ejemplo anterior.

* Clase TBlockChain:
Compatibilidad con xHarbour. Corregido.

* Clae FWPDF: Nuevas DATAs para almacenar imformación de METADATOS en el fichero pdf:
cAuthor,cCreator,cTitle,cSubject
lTimeStamp (por defectp .T.) almacena la fecha y hora de creación
oCreator puede ser una cadena de caracteres o un valor lógico. Si es .T., el mombre
del fichero ejecutable sin el camino, es almacenado como "Application" en METADATA.

* Function FW_AdoExportToDBF( oRs, cDbf, [lEditStruct] )
Cuando el conjunto de registros tiene un campo de AutoIncrement, ese campo también se
crea como un campo de autoincrement en DBF. Esto resulta en diferentes números en el DBF exportado.
Ahora este campo se crea como un campo numérico simple para que los datos exportados coincidan
exactamente con los datos de origen.

* Corrección: Marco en ventana MDI. En una aplicación Unicode, cambiar el título del marco de la ventana
principal MDI no funcionaba correctamente. Corregido.
viewtopic.php?f=3&t=38106&p=227902#p227902
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 21 guests