March and April, 2021
=====================
* New: Class TGif Method Redefine( nId, oWnd, cGifName )
Please review new samples\testgifr.prg and testgifr.rc
http://forums.fivetechsupport.com/viewt ... 21#p240521
* Fix: function FW_MemoEdit(). Font leakage fixed.
* Window method Line( top, left, bottom, right, color, size )
Now 5th parameter color can also be oPen/hPen, In this case,
6th parm size should be nil or omitted.
* Fix: EDITVARS command runtime error (FWH2101 & 2102) with
character variables fixed.
http://forums.fivetechsupport.com/viewt ... db156cd46b
* MARIADB ROWSET:
- If any constant default values are specified in the table definition.
the same are shown in the edit record while appending.
- Due to a bug introduced in version 20.02, while simple Requery()
and Requery( {params} ) are working correctly, Requery( cNewSQL )
was making the rowset readonly. Fixed now.
* TMSGITEM enhancements:
- Codeblocks bAction and bRClicked were being evaluated with only two
parameters nRow,nCol. Now these are evaluated with three parameters
nRow,nCol,nSelf.
- New method ShowPopUp( oPopMenu ) displays the popup menu with its
bottom aligned to the top of he msgitem.
Usage:
DEFINE MSGITEM ... ACTION { |r,c,oItem| oItem:ShowPopup( MyPopUp() ) }
- New method Anchor( oDlg ): When used in ON INIT clause of a dialog,
moves the dialog to align its bottom with the top of the msgitem.
Usage:
ACTIVATE DIALOG oDlg ON INIT (..... oMsgItem:Anchor( oDlg ) )
* XBROWSE
- Method oCol( u ) enhanced.
Till now, the parameter can be either (1) creation order, (2) header
or ( 3 ) group header + "_" + header.
Enhancement:
oBrw:oCol( { |col| !Empty( col:cOrder ) } ) returns the sorted column.
oBrw:oCol( { "cSortOrder", "city" } ) or
oBrw:oCol( "cSortOrder", "city" ) returns the column whose cSortOrder is
"city" ( case insensitive).
- MultiRow Selection by using the method SetMultiSelCol:
Initially the datas lReadOnly and nEditType of oBrw:oMultiSelCol are
set to .f. and 1.
During runtime, this feature can be disabled/re-enabled by toggling the
values of lReadOnly or nEditType of oBrw:oMultiSelCol to .T./F. or 0/1.
- New: DATA oSortCbx: Enables defining a combobox with sort orders
synchronized with sorting with click on header.
Usage:
@ r,c COMBOBOX oBrw:oSortCbx VAR oBrw:cSortOrder SIZE w.h PIXEL OF oDlg
OR
First define a combobox from source/resource with no items and then
oBrw:oSortCbx := oCbx
See:
samples\xbsortcb.prg
* REPORT: When report is output to a text file with clause "TO FILE <file.prn>"'
center and right alignment of columns are ignored. Fixed.
Thanks for Mr. Juan Navas for pointing out.
* TDATABASE: (fwh\source\classes\database.prg)
- New method SetScope(), in addition to the present method OrdScope()
Syntax:
SetScope() with no params: No action
SetScope( nil ) // clear all scopes
SetScope( uVal ) // Set both top and bottom scopes to uVal
SetScope( uTop, uBot ) // TopScope uTop and Bottom Scope uBot
// NIL value removes that scope
After setting the scope, if the current record is out of scope,
record pointer is moved to the nearest record within the scope.
- Enhancement to SetFilter(...)
After setting the filter, if the current record does not respect
the filter, the record pointer is moved to the nearest record
respecting the filter.
* New function WNetAddConnection2W( cPath, cPassword, cUserName, cDrive )
is Unicode version of the existing function WNetAddConnection2.
* FW_STRICMP() improved. Can be used to compare strings as well as any
valtype.
Syntax-1:
FW_StrICmp( uVar1, uVar2, [lExact] ) --> -2/-1/0/+1/+2
lExact defaults to SET EXACT setting.
uVar1 and uVar2 can be of any data types. In case both are
strings, "case insensitive" comparision is made. In other cases,
normal comparision is made. ValTypes "D" aND "T" are converted
to same type and compared.
uVar1 and uVar2 can also be arrays/hashes.
Result:
0 --> Equal and Exactly Equal if lExact is true.
-1 --> uVar1 < uVar2
+1 --> uVar1 > uVar2
-2 --> ValType( uVar1 ) < ValType( uVar2 )
+2 --> ValType( uVar1 ) > ValType( uVar2 )
Syntax-2:
FW_StrICmp( uVar1, cOperator, uVar2, [lExact] ) --> .T. / .F.
cOperator can be "==", "=", ">", "<", ">=", "<=", "!=", "<>"
Eg: ? FW_StrICmp( "FWH", "==" "fwh" ) // --> .T.
Following translates are provided for those who find using these
translates more comfortable to use:
IC( <a> == <b> )
IC( <a> >= <b> )
IC( <a> <= <b> )
IC( <a> <> <b> )
IC( <a> != <b> )
IC( <a> = <b> )
IC( <a> > <b> )
Note: "ic" stands for ignore case.
Usage: if ic( "fwh" == "FWH" ); <do something>; endif
Also,
( <a> .XEQ. <b> )
( <a> .XNE. <b> )
( <a> .EQ. <b> )
( <a> .NE. <b> )
( <a> .GE. <b> )
( <a> .LE. <b> )
( <a> .GT. <b> )
( <a> .LT. <b> )
Usage: if ( "FWH" .GT. "abc" ); <dosomething>; endif
* Enhancements:
functions GetModuleFileName() and ShellExecute() are now
Unicode compatible, if FW_SetUnicode() is set to .T.
* New translate: xtrim( <u> ) returns trim of <u> if <u> is a
character value and otherwise returns <u>.
* New Miscellaneous functions:
- FW_AGE( dob, [dAsOn = date()] ) --> Age in years.
- FW_NEXTBIRTHDAY( dob, [dAsOn = date()], [lIncludetoday=.f.] )
--> dNextBirthday
* New Samples:
- xbmulsel.prg: demonstrates use of SetMultiSelCol() method.
- xbsortcb.prg: usage of oSortCbx.