New FTDN August/Agosto 2011 (FWH 11.08)

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

New FTDN August/Agosto 2011 (FWH 11.08)

Post by Antonio Linares »

August 2011
===========

* XBROWSE:
--------
New:
----
(a) Incremental Filters:
In addition to the already existing incremental seek functionality, incremental filter feature is now introduced.

All that is required to use this feature is to set
oBrw:lIncrFilter := .t.
after creating the browse either by using command syntax or Set???() methods are used with aCols parameter and also autosort option. For both incremental seek and incremental functionalities it is required that the program should not assign its own oBrw:bSeek codeblock, overriding the builtin codeblocks of xbrowse.

When incremental filter feature is used, only rows containing the seek expression are displayed. oBrw:cSeek and oBrw:oSeek contain the search expression for incremental seek/filters both.

Incremental filters are always case insensitive.

By default, the filter is applied to the field in the initial OrdKey() expression.

Programmer can specify a different field to be used for setting filter by setting the value of oBrw:cFilterFld := <name of field>. In case of Arrays oBrw:cFilterFld can be name of the header of the column or number indicating the creation order of the column. It is always desirable to assign a value to oBrw:cFilterFld in the program instead of default, to avoid any possible runtime errors when ordsetfocus() is nil or ordkey() does not evaulate to a character experession.


By default, filter is set to match the first characters of the field value equal to the search expression. Just as in the case of incremental seeks, if oBrw:lSeekWild is set to .t., filter is set to match the seek experession anywhere in the field value. The seek expression may contain blanks and wild character like '?'.

For highly advanced usage, data bFilterExp is provided. If a codeblock is assigned to this data, instead of building a filter expression automatically, the codeblock is evaluated with the seek expression as parameter. The codeblock should return a valid filter expression corresponding to the search expression. Example:

oBrw:bFilterExp := { |cSeek| 'SOUNDEX(CUSTNAME)="' + SOUNDEX(cSeek) + '"' }
bFilterExp is not used for Arrays.

Note: (1) Incremental Filters work with character fields only.
(2) Initially this feature is available for RDDs, Arrays and ADO RecordSets only. In case of ADO, the filters work for character fields only.
The feature will be extended to other data sources gradually.

Sample: \fwh\samples\xbincflt.prg

(b) New methods VarGet() and VarPut(x) in TXBrwColumn class. VarGet() is equivalent to oCol:Value.
VarPut(x) assigns new value to the cell as if a value is entered inline. The new value is assigned ignoring nEditType, bEditWhen and bEditValid.

Enhancements:
-------------
(a) WildSeek on RDD is now case insensitive if the index is created in Upper case.
(b) Excelrange as source is detected correctly in Harbour also.
(c) SetExcel() method improved
(d) Now possible to restrict browse of any array to top n rows only by assigning oBrw:bKeyCount := { || <nVal> }
(e) oBrw:Seek() method returns .t. if the new key is accepted.
(f) Programmer can set his own color gradient for windows 7 bars. For this oBrw:bClrSelFocus should evaluate to an array whose secodn element is a valid gradient array.

Fixes:
(a) Methods SaveState() and RestoreState(). Due to incopatiblity of FW's ASave() function used in method SaveState() with some versions of xHarbour the value returned by SaveState() was invalid resulting in runtime errors while restoring RestoreState().
Now methods are modified to use the new FW function FW_ValToExp() function to avoid the occassional errors. RestoreState() method can read and restore valid values saved with earlier versions of xbrowse.

* Enhancement: Method Delete() of TDatabase now returns lSuccess.


* New: Class Splitter: new clauses STYLE and GRAD aGradient [,aGradientOver] paint gradient inside splitter area,
for custom array gradient use aGradient (normal), aGradientOver (over mouse),
check new sample listbar2.prg

* Enhancement: \source\function\olefuncs.prg"
(a) GetExcelBook( cBook ) function defaults to ActiveWorkBook if cBook is not specified
(b) GetExcelRange( cBook, cSheet, acRange ) function defaults to ActiveWorkBook, ActiveSheet and UsedRange, if the corresponding parameters are not specified.

* Fix: function FixSays() no longer produces the "bold" effect when non redefined SAYs are repainted.
Remember to use WS_CLIPCHILDREN in the parent window to avoid the painting of child controls !!!
so they don't get bold !!!

* New: samples\dlgsave.prg shows how to save and restore the position of a dialog. This example
was published by Mr. Rao in the forums:
http://forums.fivetechsupport.com/viewt ... ed#p116620

* New: samples\restore.prg shows how to use resize evens from a window. This example
was published by Enrico in the forums:
http://forums.fivetechsupport.com/viewt ... zed#p48272

* New: samples\xbrxls.prg shows how to xbrowse excel data ranges direclty.

* New: functrion SetErrorFileName( <cNewFileName> ) --> cOldFileName lets you assign and retrieve
the filename used to save the error log information.

* New: Funtion FW_ValToExp( uVal ) --> cExpression, in \fwh\source\function\valtostr.prg.
Resulting value can be macro evaluated to return the original value.

* New: samples\xbrdbu.prg DBU (work in progress) by Otto, based on Mr. Rao's development.
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: New FTDN August/Agosto 2011 (FWH 11.08)

Post by Antonio Linares »

August 2011
===========

* XBROWSE:
--------
New:
----
(a) Incremental Filters:
In addition to the already existing incremental seek functionality, incremental filter feature is now introduced.

All that is required to use this feature is to set
oBrw:lIncrFilter := .t.
after creating the browse either by using command syntax or Set???() methods are used with aCols parameter and also autosort option. For both incremental seek and incremental functionalities it is required that the program should not assign its own oBrw:bSeek codeblock, overriding the builtin codeblocks of xbrowse.

When incremental filter feature is used, only rows containing the seek expression are displayed. oBrw:cSeek and oBrw:oSeek contain the search expression for incremental seek/filters both.

Incremental filters are always case insensitive.

By default, the filter is applied to the field in the initial OrdKey() expression.

Programmer can specify a different field to be used for setting filter by setting the value of oBrw:cFilterFld := <name of field>. In case of Arrays oBrw:cFilterFld can be name of the header of the column or number indicating the creation order of the column. It is always desirable to assign a value to oBrw:cFilterFld in the program instead of default, to avoid any possible runtime errors when ordsetfocus() is nil or ordkey() does not evaulate to a character experession.


By default, filter is set to match the first characters of the field value equal to the search expression. Just as in the case of incremental seeks, if oBrw:lSeekWild is set to .t., filter is set to match the seek experession anywhere in the field value. The seek expression may contain blanks and wild character like '?'.

For highly advanced usage, data bFilterExp is provided. If a codeblock is assigned to this data, instead of building a filter expression automatically, the codeblock is evaluated with the seek expression as parameter. The codeblock should return a valid filter expression corresponding to the search expression. Example:

oBrw:bFilterExp := { |cSeek| 'SOUNDEX(CUSTNAME)="' + SOUNDEX(cSeek) + '"' }
bFilterExp is not used for Arrays.

Note: (1) Incremental Filters work with character fields only.
(2) Initially this feature is available for RDDs, Arrays and ADO RecordSets only. In case of ADO, the filters work for character fields only.
The feature will be extended to other data sources gradually.

Sample: \fwh\samples\xbincflt.prg

(b) New methods VarGet() and VarPut(x) in TXBrwColumn class. VarGet() is equivalent to oCol:Value.
VarPut(x) assigns new value to the cell as if a value is entered inline. The new value is assigned ignoring nEditType, bEditWhen and bEditValid.

Enhancements:
-------------
(a) WildSeek on RDD is now case insensitive if the index is created in Upper case.
(b) Excelrange as source is detected correctly in Harbour also.
(c) SetExcel() method improved
(d) Now possible to restrict browse of any array to top n rows only by assigning oBrw:bKeyCount := { || <nVal> }
(e) oBrw:Seek() method returns .t. if the new key is accepted.
(f) Programmer can set his own color gradient for windows 7 bars. For this oBrw:bClrSelFocus should evaluate to an array whose secodn element is a valid gradient array.

Fixes:
(a) Methods SaveState() and RestoreState(). Due to incopatiblity of FW's ASave() function used in method SaveState() with some versions of xHarbour the value returned by SaveState() was invalid resulting in runtime errors while restoring RestoreState().
Now methods are modified to use the new FW function FW_ValToExp() function to avoid the occassional errors. RestoreState() method can read and restore valid values saved with earlier versions of xbrowse.

* Enhancement: Method Delete() of TDatabase now returns lSuccess.

* New: Class Splitter: new clauses STYLE and GRAD aGradient [,aGradientOver] paint gradient inside splitter area,
for custom array gradient use aGradient (normal), aGradientOver (over mouse),
check new sample listbar2.prg

* Enhancement: \source\function\olefuncs.prg"
(a) GetExcelBook( cBook ) function defaults to ActiveWorkBook if cBook is not specified
(b) GetExcelRange( cBook, cSheet, acRange ) function defaults to ActiveWorkBook, ActiveSheet and UsedRange, if the corresponding parameters are not specified.

* New: samples\dlgsave.prg shows how to save and restore the position of a dialog. This example
was published by Mr. Rao in the forums:
http://forums.fivetechsupport.com/viewt ... ed#p116620

* New: samples\restore.prg shows how to use resize evens from a window. This example
was published by Enrico in the forums:
http://forums.fivetechsupport.com/viewt ... zed#p48272

* New: samples\xbrxls.prg shows how to xbrowse excel data ranges direclty.

* New: functrion SetErrorFileName( <cNewFileName> ) --> cOldFileName lets you assign and retrieve
the filename used to save the error log information.

* New: Funtion FW_ValToExp( uVal ) --> cExpression, in \fwh\source\function\valtostr.prg.
Resulting value can be macro evaluated to return the original value.

* New: samples\xbrdbu.prg DBU (work in progress) by Otto, based on Mr. Rao's development.

-------------
Revised Build
August 2001
=============

* Fix: mdichild.prg: Fix: Each time a mdichild window is created, oFont:nCount is increased twice resulting in not releasing the font. Now fixed.

* Fix: msgbar.prg: Font count is increased by 2 each time a new bar is activated from the second time onwards resulting in not releasing the font. Now fixed.

* Enhancement: Fully compatibility with MinGW again :-)
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
AIDA
Posts: 782
Joined: Fri Jan 12, 2007 8:35 pm

Re: New FTDN August/Agosto 2011 (FWH 11.08)

Post by AIDA »

Ejem y no lo publicaras en español :mrgreen:

Saluditos :wink:
Que es mejor que programar? creo que nada :)
Atropellada pero aqui ando :P

I love Fivewin

séʌǝɹ ןɐ ɐʇsǝ opunɯ ǝʇsǝ
Post Reply