New FTDN March/Marzo 2013 (FWH 13.03)

New FTDN March/Marzo 2013 (FWH 13.03)

Postby Antonio Linares » Thu Mar 28, 2013 11:33 am

March 2013
============

* Enhancement: function ReadComm() has been enhanced to use an optional timeout value
expressed in milliseconds: ReadComm(<nComm>,@<cBuffer> [,<nTimeout>] )

viewtopic.php?p=140480#p140480

* New: samples/xmlreader.prg provides a simple example for a generic XML reader.

* New: samples/xmltree.prg provides a simple generic XML viewer.

* Enhancement: Minor change in Class TDataBase to make it compatible with Harbour
and xHarbour (function hb_CurDrive())

* TXBROWSE:

- Evaluation of bStrData and bEditValue:

bEditValue is evaluated with nil and column object as first and second parameters for
accessing data and with new value and column object as parameters for assigning data.
Eval( oCol:bEditValue, nil, oCol ) for access
Eval( oCol:bEditValue, uNewValue, oCol ) for assignment.

bStrData is now evaluated with nil as first paramter and Column object as second
parameter ( Eval( oCol:bStrData, nil, oCol ) ).

While the existing code continues to work, future code can use oCol object and its data
in these two codeblocks.

- Improved functioning of incremental seek on date columns in RDD & ADO browses

- Improvements to SetRDD() method. New fields types are now considered. Code compacted.

- Enhancement: Avoided unnecessary calls to Refresh() to improve performance, particulary
at the time of initial display. This improves performance in case of slow access RDDs.

- Enhancement: Protection is provided against inadvertent deletion or hiding of all
columns by an application program, resulting in runtime errors.

- Fix: Problems with browsing ADO with blanks in column names were fixed in FWH 12.12. However,
the changes resulted in a few bugs in incremental seek, which are fixed now.

- Enhancement: COLUMNS clause of XBrowse of TDatabase can now contain Expressions and CodeBlocks
also. The expressions will be macro evaluated selecting the oDbf:nArea inside the xbrowse.

Example:

USE CUSTOMER

DATABASE oDbf

@ 0,0 XBROWSE oBrw OF oWnd DATASOURCE oDbf ;
COLUMNS "FIRST","CITY","Date() - HireDate", "SALARY * 1.1", { || oDbf:First - oDbf:Last } ;
HEADERS nil, nil, "Service", "NewSalary", "FirstLast"

Note: These enhancements are made in method SetXBrowse of database.prg.

- Enhancement: Improved evaluation of expressions used while declaring columns in ADO.

- Enhancement: When nEditType is EDIT_LISTBOX and both aEditListBound and aEditListTxt are specified,
value in the editlisttxt is diaplayed corresponding the value in the editlistbound.

- Enhancement: Method Paste() now updates dependent calculated columns also by evaluation oCol:bOnChange

- Enhancement: TDOLPHIN Browse:
Improved compatibility with TDolphin. Appropriate bOnPostEdit block is generated internally.
No need to write bOnPostEdit codeblock in the application program like in other browse.

COLUMNS can also contain field numbers, codeblocks, expressions.
Note: Expressions can also contain field names.

Fixed runtime error when a query is created without "ORDER BY" clause and browse is
created with AUTOSORT clause. Improved sorting logic.

Incremental Filters fully supported.

- Enhancement: SQLRDD Browse:
Enhanced (though not full) comaptibility with SQLRDD.
The limiations are that ertical scrollbars and fearures that depend on ordkeyno()
may not work same way like other RDDs. However the enhancements may be adequate for most
common browsing purposes.

Refresh after change of order, Incremental Seeks (but not wildseeks) and Incremental
filters (wild also) is fairly improved.

- Enhancement: ADO Browse: Character values are padded with field width for proper editing.

- Enhancement: ADO Browse: Improvements in multiuser compatibility when the Recset is opened
with adLockBatchOptimistic (appropriate locking for multiuser apps).
When row is moved the current row is synched with the server to reflect latest changes.
When oBrw:lAdoOverRideConflicts is .t. ( default ), current users changes are overwritten
ignoring other user changes and when set to .f., current users changes are ignored if
another user modified data after reading the recordset.

- TREE Browse: COLUMNS clause in command syntax is now fully supported for TREE browses.
If treeitem:Cargo is an array, COLUMNS clause can contain column numbers. In addition,
valid expressions and codeblocks can be used in the column clause.
Plase see testxbrw3.prg in the samples for usage.

- USAGE OF EXPRESSIONS/CODEBLOCKS:
It is now possible to use Expressions and codeblocks in the COLUMNS clause for RDD,ADO,
TDatabase,TDolphin and TMySql.
Example: COLUMNS "Item", "Quantity", "Price", "Quantity * Price", ...
work exactly the same way for different datasources. This enables use of the same code
for different datasources.

- New Data lOemAnsi for Column Objects also. lOemAnsi can be turned on/off for
individual columns or for the entire browse dynamically.

- Enhancement: Pressing Up key when already on the first row and Down key when already
on the last row is ignored avoiding flickering and repaint of browse.

- Enhancement: Method BrwFitSize( [<lResize>]. [<nMaxRows>] ) now accepts a second
parameter nMaxRows. See topic viewtopic.php?f=3&t=25945


* Fix: Class TGantt and samples/testgant.prg were not working fine. Now they are ok:

viewtopic.php?p=140460#p140460

* Enhancement: FW_OpenAdoConnection( cConnStr )
Now for connecting to MSAccess mdb database it is enough to specify the full path of the
mdb file
For connectiong to a folder containing DBF tables, it is enough to specify the full path
of the folder.
In the above cases, the function constructs the appropriate connection string.

* Enhancement: FW_OpenRecordSet( oCn, cSql ).
Now the first parameter can also be a connection string (or mdb filename or dbf folder)
instead of an already opened ADO connection.
Example:
oRs := FW_OpenRecordSet( "c:\fwh\samples\", ;
"SELECT STATE, SUM( SALARY ) AS TOTSALARY FROM CUSTOMER GROUP BY STATE" )
xbrowser oRs

* New: Function FW_DbfSqlQuery( [cFolder], cSql, [lExecute], [lAsRecSet (.f.)] )
--> aResult ( see database.prg )

- This function can be used to retrieve results of an Sql Query on DBF tables stored on
local computer quickly.

- If the 1st optional parameter is omitted, the function operates on default alias.
Example:
USE CUSTOMER SHARED ALIAS CUST
aResult := CUST->( FW_DbfSqlQuery( "SELECT STATE,SUM(SALARY) GROUP BY STATE" ) )
XBROWSER aResult
- If specified, the 1st paramter should be either (a) fully qualitied path of dbf table
or (b) full path a folder ending with "\".
- When the 3rd parameter is specified as .t., the sql statement is executed as command and
the result is returned.
- By default, the function returns the results as array after closing the connection and
recorset objects. If the 4th parameter is .t., the function returns the recordset object
and the programmer should close the recordset's activeconnection object after using the
recordset.

* New: New method SqlQuery( cSql, [lExecute] ) in TDatabase Class: database.prg
Results of a valid SqlQuery are returned as a multi dimentional array.
Example: aSummary := oDbf:SqlQuery( "SELECT STATE,SUM(SALARY) GROUP BY STATE" )
XBrowse( aSummary )
If the sql query does not contain FROM <CTABLE> clause this is provided by the TDataBase class.
If the call fails the return array is empty.

Limitations: Works only for DBF tables on local computer. The call fails if the table is
used exclusively or locked.

Fix: function IsWin8() was wrongly returning true on Win98. Now it is ok:

viewtopic.php?p=140474#p140474

* New function FW_ArrayToDbf( aData, [cFieldList], [bProgress] )
Saves data in aData to the default open alias.

* Fix: There was a memory leak in Class TPrinter Method End() cause PrinterEnd() was
commented out. Now it is ok.

* Enhancement: We remove function DiskChange() from FWH in order to use Harbour's DiskChange()

* Enhancement: We remove function DriveType() from FWH in order to use Harbour's DriveType()

* New: samples/germano.prg shows how to use a dfferent bitmap on a BTNBMP control when
the mouse is moved over it.

viewtopic.php?p=141302#p141302

* New: samples\darrell.prg shows how to iterate a XML searching for a specific node and
listing its branches:

viewtopic.php?p=141398#p141398

* Enhancement: Some FWH debugger messages have been translated into english (they were in
spanish).

* Enhancement: Class TScintilla was allocating a chunk of memory that invoked __chkstk()
with MSVC compiler. Now it is ok.

* Fix: We have moved function GetProcAddress() and GetLastError() to harbour.prg to avoid
conflicts with xHarbour (linking warnings).

* Enhancement: Class TTxtEdit new DATA lReadOnly to support readonly mode:

viewtopic.php?p=141588#p141588

* New: samples/vmh.prg provides a visual interface for Harbour hbmk2.exe make utility.

viewtopic.php?f=3&t=25893

* Enhancement: FWH debugger added support to set breakpoints from the pulldown menu or
pressing F2:

viewtopic.php?p=141676#p141676

* Fix: Class TCalendar DATA bChange was evaluated twice. Now it is ok:

viewtopic.php?f=6&t=25896&start=0

* Enhancement: ToExcel() method of Report class now uses Spansh formula for Spanish
installations of Excel.
regards, saludos

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