New FTDN May/Mayo 2009 (9.05)
Posted: Sat Jun 06, 2009 8:44 am
May 2009
========
* Enhancement: We have greatly enhanced FWH Class TActiveX so now there is no need to use Do(), SetProp()
and GetProp(), though it offers full backwards compatibility
Now you can directly send Messages to the ActiveX object! i.e.:
oRb = oActiveX:AddRibbonBar( "first" )
or
oSettings = oActiveX:GlobalSettings
or
oActiveX:AnyProp = ...
* Class TXBrowse:
(1) Copy and Paste:
- Facility to copy any range of cells from xbrowse and paste into Excel sheet is already available. This
facility is turned on by default and can be turned off by setting oBrw:lAllowCopy to .f..
- Now it is possible to copy any range of cells from Excel and paste into XBrowse. The facility is turned off
by default and can be turned on by setting oBrw:lCanPaste := .t. Copied cells will be converted into the
appropriate data types of the columns.
- Clipboard data is pasted from the selected column to right and selected row to bottom and overflowing rows
and columns in the clipboard data are ignored subject to exceptions in case of Array Browses as explained below.
- If the array being browsed is a blank array, all the rows of the clipboard data are appended the array and
xbrowse is reconfitured for the new columns.
- If browsing an array and oBrw:lAutoAppend == .t. and extreme left column is selected, then if the number of
rows pasted exceed the rows of the array, the additional rows are appended to the array. This is useful for
appending data from Excel to the array being browsed.
- Pasting is done by evaluating oCol:bEditValue with the new value and works when bEditValue is a setget block
( Default blocks provided by TXBrowe automatically are setget blocks). bEditValid and nEditType are ignored.
In case of tables opened in shared mode, rows are locked (by evaluating oBrw:bLock ) before pasting.
(2) Bug Fix: When stretchcol is specified, buttons on EDIT_BUTTON, EDIT_LISTBOX, etc. were blinking. Now fixed.
(3) Fix in method lbuttondown: When bChange is evaluated after a mouseclick, the nColPos data is not updated with
the new position. This is fixed.
* Functions
(4) New DATA lSeekWild. If this data is set to .t., bSeek uses OrdWildSeek instead of normal Seek.
(5) bSeek: If the index is created on Upper(…), cSeek is converted to Upper while seeking.
(6) DatePicker in xBrowse respects the cEditPicture data of the column object.
(7) Bugfixes in post edit cursor movement
(8) Bug fix in method SortArrayData. Sorting on array element higher than the number of columns was resulting in
runtime error. Now fixed.
(9) XBROWSE command: New optional clause [ROWS <aRows>]. While defining xBrowse for RDD or DataBase objects, if
ROWS aRows is specified, where aRows is an array containing RecNos, only the records with those RecNos in that
order are shown in the Browse.
- New optional parameter aRows in methods SetRDD and SetODBF achieve the same purpose.
- New optional parameter <bOnSkip> in SetArray evaluates the codeblock on every skip of the Array Browse. ( similar
to SetTree methods bOnSkip ). This codeblock can be used to link external databases to the array browse. New data
bOnskip of TXBrowse serves the same purpose.
(10) Pressing Enter key on a non-editable column moves the cursor right.
(11) Function XBrowse() / Command XBrowser: In selection mode, selection can be now made by pressing Enter key also.
Incremental seek is implemented.
Improved: uCharToVal( cText, [cType] ). Also changed from module WQout.prg to Valblank.Prg
If ctype is not provided or cType is nil, the function determines the appropriate data type and converts the value.
If second parameter is by reference, the type determined by the function is stored in the second paratmer.
RPreview.Prg:
- If the printer’s data lPrvModal is true, a normal window is created even in MDI environment. Prior to this revision,
in an MDI application, even when print preview is called from a modal dialog, the preview was shown in mdichild,
which was shown behind the dialog.
- New function: RPrevUserBtns( bBtnBlock ) --> bPreviousBtnBlock. User can set a code block which is called by the
RPreview program with two parameters Self, oBar while building the button bar for the preview. In this codeblock,
user can add buttons with actions of his choice.
Example:
RPrevUserBtns( { oPrev, oBar | MyButtons( oPrev, oBar ) }
…
REPORT oRep PREVIEW
<clauses>
ACTIVATE REPORT oRep
RPrevUserBtns( nil )
*
Function MyButtons( oPreview, oBar )
DEFINE BUTTON OF oBar RESOURCE ‘Save’ ACTION MsgInfo( “Save” )
Return nil
…
Report.prg:
- When a report is created with MODAL clause, preview is in a normal window (not MDI child), even in MDI application.
- New clause MEMO to COLUMN command. It is now possible to print multi-line text in column by specifying the clause
MEMO or MULTI LINE, without the need for writing extra code in the application program. Please see
fwh\samples\rep20.prg to see the difference in programming before and after 9.05
- New DATA nStrechCol in TReport class:
When a column number is assigned to the data nSretchCol, that column is stretched or shrunk within reasonable
limits to fit the report to the page width.
TDataBase Class: (database.prg)
For Harbour and xHarbour:
- Wildseek capability is added. Seek method now has two additional parameters.
Method Seek( uExpr, lSoft, lWildSeek, lFromCurRec )
If lWildSeek is set to true the functionality is similar to OrdWildSeek( uExpr, lFromCurRec )
- New Method XBrowse( oWnd/oBrw, cTitle, aCols, lautosort, bSetUp ) --> oBrw
- If the first parameter is TXBrowse, the browse is setup with the object
- If the first parameter is a MDI main window, then a new browse is created in a new mdi child window and displayed
- If this parameter is a normal window, the window’s client area is populated with the browse and displayed
TDTPICKER class
New PICTURE clause is added to the command. Picture can be ‘@D’, ‘@E’ or any picture similar to ‘dd-MMMM-yyyy’,
When picture clause is specified, the dtpicker displays the date in the specified format. Otherwise windows
default format is used.
========
* Enhancement: We have greatly enhanced FWH Class TActiveX so now there is no need to use Do(), SetProp()
and GetProp(), though it offers full backwards compatibility
Now you can directly send Messages to the ActiveX object! i.e.:
oRb = oActiveX:AddRibbonBar( "first" )
or
oSettings = oActiveX:GlobalSettings
or
oActiveX:AnyProp = ...
* Class TXBrowse:
(1) Copy and Paste:
- Facility to copy any range of cells from xbrowse and paste into Excel sheet is already available. This
facility is turned on by default and can be turned off by setting oBrw:lAllowCopy to .f..
- Now it is possible to copy any range of cells from Excel and paste into XBrowse. The facility is turned off
by default and can be turned on by setting oBrw:lCanPaste := .t. Copied cells will be converted into the
appropriate data types of the columns.
- Clipboard data is pasted from the selected column to right and selected row to bottom and overflowing rows
and columns in the clipboard data are ignored subject to exceptions in case of Array Browses as explained below.
- If the array being browsed is a blank array, all the rows of the clipboard data are appended the array and
xbrowse is reconfitured for the new columns.
- If browsing an array and oBrw:lAutoAppend == .t. and extreme left column is selected, then if the number of
rows pasted exceed the rows of the array, the additional rows are appended to the array. This is useful for
appending data from Excel to the array being browsed.
- Pasting is done by evaluating oCol:bEditValue with the new value and works when bEditValue is a setget block
( Default blocks provided by TXBrowe automatically are setget blocks). bEditValid and nEditType are ignored.
In case of tables opened in shared mode, rows are locked (by evaluating oBrw:bLock ) before pasting.
(2) Bug Fix: When stretchcol is specified, buttons on EDIT_BUTTON, EDIT_LISTBOX, etc. were blinking. Now fixed.
(3) Fix in method lbuttondown: When bChange is evaluated after a mouseclick, the nColPos data is not updated with
the new position. This is fixed.
* Functions
(4) New DATA lSeekWild. If this data is set to .t., bSeek uses OrdWildSeek instead of normal Seek.
(5) bSeek: If the index is created on Upper(…), cSeek is converted to Upper while seeking.
(6) DatePicker in xBrowse respects the cEditPicture data of the column object.
(7) Bugfixes in post edit cursor movement
(8) Bug fix in method SortArrayData. Sorting on array element higher than the number of columns was resulting in
runtime error. Now fixed.
(9) XBROWSE command: New optional clause [ROWS <aRows>]. While defining xBrowse for RDD or DataBase objects, if
ROWS aRows is specified, where aRows is an array containing RecNos, only the records with those RecNos in that
order are shown in the Browse.
- New optional parameter aRows in methods SetRDD and SetODBF achieve the same purpose.
- New optional parameter <bOnSkip> in SetArray evaluates the codeblock on every skip of the Array Browse. ( similar
to SetTree methods bOnSkip ). This codeblock can be used to link external databases to the array browse. New data
bOnskip of TXBrowse serves the same purpose.
(10) Pressing Enter key on a non-editable column moves the cursor right.
(11) Function XBrowse() / Command XBrowser: In selection mode, selection can be now made by pressing Enter key also.
Incremental seek is implemented.
Improved: uCharToVal( cText, [cType] ). Also changed from module WQout.prg to Valblank.Prg
If ctype is not provided or cType is nil, the function determines the appropriate data type and converts the value.
If second parameter is by reference, the type determined by the function is stored in the second paratmer.
RPreview.Prg:
- If the printer’s data lPrvModal is true, a normal window is created even in MDI environment. Prior to this revision,
in an MDI application, even when print preview is called from a modal dialog, the preview was shown in mdichild,
which was shown behind the dialog.
- New function: RPrevUserBtns( bBtnBlock ) --> bPreviousBtnBlock. User can set a code block which is called by the
RPreview program with two parameters Self, oBar while building the button bar for the preview. In this codeblock,
user can add buttons with actions of his choice.
Example:
RPrevUserBtns( { oPrev, oBar | MyButtons( oPrev, oBar ) }
…
REPORT oRep PREVIEW
<clauses>
ACTIVATE REPORT oRep
RPrevUserBtns( nil )
*
Function MyButtons( oPreview, oBar )
DEFINE BUTTON OF oBar RESOURCE ‘Save’ ACTION MsgInfo( “Save” )
Return nil
…
Report.prg:
- When a report is created with MODAL clause, preview is in a normal window (not MDI child), even in MDI application.
- New clause MEMO to COLUMN command. It is now possible to print multi-line text in column by specifying the clause
MEMO or MULTI LINE, without the need for writing extra code in the application program. Please see
fwh\samples\rep20.prg to see the difference in programming before and after 9.05
- New DATA nStrechCol in TReport class:
When a column number is assigned to the data nSretchCol, that column is stretched or shrunk within reasonable
limits to fit the report to the page width.
TDataBase Class: (database.prg)
For Harbour and xHarbour:
- Wildseek capability is added. Seek method now has two additional parameters.
Method Seek( uExpr, lSoft, lWildSeek, lFromCurRec )
If lWildSeek is set to true the functionality is similar to OrdWildSeek( uExpr, lFromCurRec )
- New Method XBrowse( oWnd/oBrw, cTitle, aCols, lautosort, bSetUp ) --> oBrw
- If the first parameter is TXBrowse, the browse is setup with the object
- If the first parameter is a MDI main window, then a new browse is created in a new mdi child window and displayed
- If this parameter is a normal window, the window’s client area is populated with the browse and displayed
TDTPICKER class
New PICTURE clause is added to the command. Picture can be ‘@D’, ‘@E’ or any picture similar to ‘dd-MMMM-yyyy’,
When picture clause is specified, the dtpicker displays the date in the specified format. Otherwise windows
default format is used.