New FTDN march/april 2014 (FWH 14.04)

Post Reply
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

New FTDN march/april 2014 (FWH 14.04)

Post by Antonio Linares »

March 2014 and
April 2014
==========

* New: Class TAutoGet developed by Daniel Garcia Gil. This is a GET that provides
suggestions while you type into the GET. Daniel developed this Class before
knowing of Marcelo Via's new similar class (that uses xbrowse) to this one.
Our intent is to combine both classes in next FWH versions, so we gest the best
functionality from them.

Please review samples\testaget.prg, testage2.prg...testage5.prg. Please review
include\autoget.ch to review its syntax and supported clauses.

* Fix: Class TMenuItem Method Destroy() was not releasing the handle of the
menuitem related bitmap, if defined. Now it is ok:

http://forums.fivetechsupport.com/viewt ... 59#p159359

* Fix: SAYs (text) on transparent dialogs were not properly shown
in transparent mode when themes are used (1 24 "WindowsXP.Manifest").
Now it is ok.

* Fix: ... GET ... ACTION created button was not properly placed if themes
are not used. Now it is ok.

* Fix: Class TPreview: Error is generated when MainWindow is closed without
closing the preview window. Fixed

* XBrowse:
(a) Enhancement: METHOD aCellCoor( [nRow], [nCol] ) returns coordinates
of the focussed cell, if parameters are ommitted. If only one parameter
is specified, nRow defaults to oBrw:nRowSel and nCol defaults to
oBrw:nColSel
(b) New: METHOD CellBitmap( [nRow],[nCol] ) --> hBitmap
Returns the contents of the cell as a bitmap. If called without
parameters, bitmap of the active cell contents is returned.
(c) New: DATA bOnRefresh: If assigned this codeblock is evaluated
with the browse object as parameter at the end of every refresh()
operation.
(d) New: METHOD SetLogical( [cTrue], [cFalse] ) CLASS TXBrwColumn.
Where logical data is stored in database as 1/0, 'Y'/'N', 'T'/'F',
etc as numeric or char data it is possible to instruct xbrowse
to treat such data as logical data.
Retuns success/failure to set.

In case of numeric data if oCol:SetLogical() is called, empty data
is read and displayed as logical false and otherwise logical true.
When logical true/false is assigned 1/0 is stored in the database.
After SetLogical() is called, SetCheck() can be called.
In case of character fields, by default, the method works for
values 'Y' and 'N'. Programmer can specify other pair of values
like 'T','F', etc if required. Eg: oCol:SetLogical( 'T', 'F' )

This method works only when oCol:cDataType is 'C' or 'N' and
oCol:bEditvalue is already assigned. Normally this is the case
when browse is created with command syntax from RDD,ADO,MySql/
Dolphin with columns clause. The method does not work with
Arrays.
(e) New: METHOD SetChecks( aBmp, lEdit, aPrompts ) CLASS TXBrowse.
Calling oBrw:SetChecks() calls SetCheck() method for all logical
columns in the browse.
* TDataRow
(a) fix: Now the object can be used in windows and non-modal dialogs also.
(b) New DATA bSaveData
If specified, this codeblock is called with the object as pararmeter,
for saving data to the individual fields, instead of using the
internal logic. Locking / appending and unlocking is taken care of
by the class and the codeblock should contain logic to assign values
to individual fields only. This codeblock is to be used when the
data to be physically saved is different and is to computed from the
data visible to the user. The codeblock can return logical .f. to
indicate failure. Returning any other value indicates success.
(c) Transaction Support:
Consequent on modification of data by the Save() method, it may be
necessary to modify data in some other tables also. This is now
achieved by including such code in the DATA bOnSave codeblock.
Now, it is possible to enclose all the changes ( to the main table
and other tables ) in a Begin and Commit Transaction.
New DATAs: bBeginTrans, bCommitTrans, bRollBack
DATA lUseTrans .t. or .f. ( default .f. )

Programmer may assign logic to begin, commit or rollback transaction
to the three codeblocks and enable transactions by setting the data
lUseTrans to .T.
In case the table is an ADO table, the class by default assigns the
proper codeblocks and programmer need only to assign :lUseTrans.
(d) Fix: Display of auto-increment fields in DBF in the default add/edit
dialog is fixed.
(e) Improvement: While saving ADO RecordSet, if length of character value
assigned is greater than the field's DefinedSize, the value is
truncated to avoid runtime error.

* Enhancement: TBtnFlat: (a) Improved painting of multi-line prompt
(b) If width spedified is less than 5, the width is automatically
calculated to accommodate the size of the prompt.
(c) When dialogs' data lTransparent is true, button's lTransparent
also was being changed to .t.. Now fixed.

* New: AdoFuncs.prg:
New functions FW_AdoAddCol( oCn, cTable, aCol ) --> lSuccess
FW_AdoModifyCol( oCn, cTable, aCol ) --> lSuccess
aCol is column spec in DBF style.

* New: DATA lBmpTransparent in TBtnBmp class (btnbmp.prg).
By default this data is True and bitmaps are painted in the buttons
transparently. When this DATA is set to False, the bitmaps are
drawn non-transparently.
regards, saludos

Antonio Linares
www.fivetechsoft.com
MGA
Posts: 1219
Joined: Mon Feb 25, 2008 2:54 pm
Location: Brasil/PR/Maringá
Contact:

Re: New FTDN march/april 2014 (FWH 14.04)

Post by MGA »

ubiratanmga@gmail.com

FWH17.04
FWPPC
Harbour/xHarbour
xMate
Pelles´C
TDolphin
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: New FTDN march/april 2014 (FWH 14.04)

Post by Antonio Linares »

Implemented for next FWH build, thanks :-)
regards, saludos

Antonio Linares
www.fivetechsoft.com
Post Reply