New FTDN May/Mayo 2013 (FWH 13.05)

New FTDN May/Mayo 2013 (FWH 13.05)

Postby Antonio Linares » Wed Jun 05, 2013 3:09 pm

May 2013
========

* Fix: RibbonBar were flickering when selecting a top item. Now it is fine:

viewtopic.php?p=146155#p146155

* New: examples/access.prg shows hot to review all the tables from a database
using ADO.

* Fix: XBrowse: XBROWSE command is failing to recognise recordset object properly
in some rare cases when built with xharbour. fixed now.

* Enhancement: Added a dummy function Execute() for xHarbour. This function
simply shows an alert with the message that it is only available with Harbour.

* Enhancement: Class TBtnBnp now supports PNG files too:

viewtopic.php?p=143968#p143968

* New: Class TComboBox Method GetKeyChar() used from ComboBoxes with DropDownList
style. Recently implemented and tested with Rick help:

viewtopic.php?p=143534#p143534

* Enhancement: Removed three warnings reported by Lucas:

viewtopic.php?p=144233#p144233

* hbcomat.ch is included inside fivewin.ch

* Enhancement: Class TComboBox only creates a GET for those styles that require it.

* Enhancement: XBROWSER command now accepts VALID clause. Please review
samples/olebrow.prg

* New: samples/olebrow.prg shows how to review all the OLE classes available on
a computer and lets you inspect each class methods, etc.

* New: samples/outlook.prg shows how to manage Outlook from your apps.

* Enhancement: Added Class TMsgItem Method Refresh(), it was missing.

* Enhancement: Class TDialog, cVarName was not being provided to Method New().
Now it is ok.

* New: samples/speak.prg check how easily you can make your app talk!

* Fix: Fixed some pending bugs introduced with recent Class TComboBox changes.

* Enhancement: TXBrowse. New DATA lFreezeLikeExcel ( default .f. )
When some columns are frozen on the left, navigation to to the right,
may hide some columns next to the frozen columns while bringing far right
columns into the visible window.
While moving cursor to left with left arrow, cursor moves into the frozen
columns keeping the far right columns still visible. Only when left arrow key
is pressed while on the first frozen column, the hidden columns are made
visible by moving other columns to right. This behaviour is provided intentionally
to enable to view and juxtoppose far right columns by the side of frozen columns.
However this behavior is different from Excel.
If oBrw:lFreezeLikeExcel data is set to .t., navigating to left with left arrow key
reveals the all hidden colummns one by one before moving into the frozen columns.
This option can be used to have excel like behavior.

viewtopic.php?p=145136#p145136

* Fix: TXBrowse: TDolphin: Wrong construction of sql stement for incremental filters
when an order is descending. Fixed.

* Fix: Class THActiveX Method ReadTypes() is properly loading the events names.

* Enhancement: Class THActiveX has been greatly enhanced making it compatible
with FWH Class TActiveX. Class THActiveX is based on Harbour's Activex ATL
support.

* New: Class TPrinter new Methods CmBox( nRow, nCol, nBottom, nRight, oPen ) and
METHOD CmLine( nRow, nCol, nBottom, nRight, oPen ). Thanks to Manuel! (mastintin)
New Method Pix2Cmtr( nRow, nCol ) also.

* Fix: XBrowse: ADO Incremental filters are not working when the value of the filter
field in the current row is NULL. Now fixed.
Also after the user types invalid search, the behaviour is erratic. Fixed now.

* Enhancement: Class TRibbon DATA nOldOption keeps the previous selected option
when the current selected (top items bar) option changes. Thanks to Pedro!

viewtopic.php?p=145611#p145611

* Enhancement: Function FW_DbfToArray(...). If an array is provided as the 7th
parameter, data from the dbf is appended to the array.

* New: Methods RowGet( [<cFieldList>], [<lBlank>] --> 2 dim array of field names and values
RowPut( aData, <lNew> ) Writes data into fields from the data array
in TDatabase class
* New: New Class TDataRow ( datarow.prg )
Reads data from Alias, oRecset, oDbf
Can be used for edit/append/save

* Enhancement: XBrowse: DATA lAutoSort toggles autosort feature.

* New Data: XBrowse: oBrw:lReadOnly and oCol:lReadOnly
When set to .t., edit and modification of values is inhibitied, irrespective
of oCol:nEditType setting
In case of RDD and ADO, XBrowse recognises if the DBF / RecordSet is opened in
readonly mode and sets the readonly mode. XBrowse also tries to ascertain if
individual fields can be modified and accordingly sets oCol:lReadOnly.
Programmer can at any time toggle the DATA but it may not be desirable to allow
edit of readonly datasource.

* Fix: samples/FiveDBU.prg ADO Add record fix, now it is ok:

viewtopic.php?p=145842#p145842

* Enhancement: Class TPrinter new Methods CmtrGetTextWidth( cText, oFont ),
CmtrTextToCenter( cText, oFont ), METHOD TextInBoxCentered( nTop, cText, cmExRow,
cmExCol, oFont, oPen, nColor ) and METHOD TextInBox( nTop, nLeft, cText, cmExRow,
cmExCol, oFont, oPen, nColor ). Thanks to Manuel Alvarez:

viewtopic.php?p=145375#p145375

* Enahanced suport for ADO in \fwh\source\function\olefuncs.prg
New: FW_ShowAdoError( oCn ) --> shows last ado error
New: FW_CreateMDB( cFile[.mdb|.accdb] ) --> lCreated
Creates new MS Access Database file.
For creation of accdb file, Microsort ACE.12.0 need to be installed.
By default creates mdb if no extension is specified.
New: FW_FieldUpdateable( oRs, <nFld|cFldName|oField ) --> .t. / .f. / nil
Useful for deciding if a field is readonly.
New: FW_DateToADO( dDate ) --> '#YYYY-MM-DD#'
Converts a date as literal for use in ADO and also MsAccess SQL

Enhanced: FW_OpenAdoConnection( cConnStr, [ lShowError ] )
In case of MSAccess, it is enough if the name of mdb/accdb file is
specified instead of full connection string.
In case of DBF, it is enough if full filepath is specified instead
of full connection string.
If optional second parameter is set to .t., ado error is displyed in
case of error in opening the connection.

* Suport for SQL in \fwh\source\function\olefuncs.prg
New: FW_DateToSQL( dDate/tDateTime ) --> cDate/DateTime literal
returned datetime literal to be used in SQL Statements.
New: FW_ValToSQL(...) Parameter can be single value, array of values of list
returns Sql literal to be used in SQL statements.
Examples"
FW_ValToSql( "Mc'Donald" ) --> "'Mc''Donald'"
FW_ValToSql( tDateTime ) --> "YYYY-MM-DDTHH:MM:SS"
(Oracle: "TIMESTAMP YYYY-MM-DD HH:MM:SS"
FW_ValToSql( nAge, Salary, First, Married, HireDate ) -->
"( 32, 23400.26, 'David', 0, '1980-10-12' )"
This returned list literal can be used in INSERT statements and
as params list for stored procedures.
New: FW_QuotedColSQL( cColName ) --> "[cColName]" or "'cColName'" depending
on the RDBMS. ( MSACCESS and MSSQL use [] and MySql uses ' )

* New: Include file fwsqlcmd.ch in \fwh\include folder contains translates
which make writing INSERT and UPDATE sql statements easy

cSql := SQL INSERT INTO TEST ( AGE, FIRST, HIREDATE ) ;
VALUES ( CUST->AGE, CUST->FIRST, CUST->HIREDATE )
cSql --> "INSERT INTO TEST (AGE,FIRST,HIREDATE) VALUES ( 34, 'David', '1980-10-12' )"
oCn:Execute( cSql )

cSql := SQL UPDATE TEST SET AGE = nAge, HIREDATE = dDate WHERE ID = 2
cSql := "UPDATE TEST SET AGE = 40, HIREDATE = '2000-12-12' WHERE ID = 2"

With help of these translates, which use FW_ValToSQL() function, we can
write SQL statements using Harbour vairables / data without coverting and
concatenating in our code.

* New: Class TDataRow ( \fwh\source\classes\datarow.prg )
This calss reads values of a record/row of dbf/recset/xbrowse and enables
access of the data as object data.
constructor:
oRec := TDataRow():New( <cAlias|oRs|oBrw|aPromptVal>, [cFieldList], [lBlank] )
Examples:
USE CUSTOMER
oRec := TDataRow():New( "customer", "First,Age,Salary" )
? oRec:first
? oRec:Age := 40
? oRec:Modified()
oRec:Save()
etc.
The class has a default Edit() method for quick use.
Programmer can build his own add/edit dialog or Assign oRec:bEdit with his
own implementation.
More details of usage will be posted in the forums

* New: Class TRibbonBar new Method AEvalWhen() controls all controls on its child
dialogs. Thanks to Enrico!
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42107
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 58 guests