New FTDN (July) 2014 (FWH 14.07)

New FTDN (July) 2014 (FWH 14.07)

Postby Antonio Linares » Mon Aug 04, 2014 6:41 am

July 2014
=========

* Enhancement: valtostr.prg: function FW_ValToExp() now handles Hashes also.

* Fix: XBrowse: Auto calculation of widths for array columns not working correctly
in all cases. fixed.

* Fix: XBrowse Method FontResize() was not releasing the new font created. Fixed.

* Fix: We have implemented a temporary workaround for MSVC support (Harbour's Log()
function requires a __HUGE external symbol) until it gets solved by the Harbour dev
team. This external symbol appears when using /NODEFAULTLIB:libcmt that
is required to solve some warnings that the linker reports.

* Fix: RPreview.prg: Preview painting of non-modal preview in MDI environment
was wrong. Fixed.

* Fix: There was a bug in function MISText() reported by Fernando Diez, that appeared
when using VS2013 when using MENU 2007 or 2010. Now it is ok:

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

* Enhancement: samples\FiveDBU.prg added "Copy to clipboard" from the generated
source code for a DBF structure:

viewtopic.php?f=3&t=28792&start=0

* Fix: Fixed bug in REDEFINE MENUITEM, now it is ok. Many thanks to Maurizio:

viewtopic.php?f=3&t=28828&start=0

* Fix: TXBrowse Method MakeTotals(). After MakeTotals() is executed the the record is not
repositioned to the saved record. Fixed.

* Fix: function cValToStr() in valtostr.prg: A bug in conversion to scienific
notation crashes the program when negative numeric values overflow the
picture clause. Fixed.

* Fix: method SelFont() in window.prg: Resulting in excess decrementing font
counter and consequent premature destruction of fonts in some cases. Fixed.

* Improvement: XBrowse: SetFont(), SelFont(), FontSize() methods correctly change
all columns data/header/footer fonts where diffeent fonts are not assigned and
properly recalculate heights and widths appropriate to the new font.

* Enhancement: DBCOMBO now works also with RecordSets, Dolphin Query, Any Object
like TDataBase (which supports methods GoTop(), RecNo(), GoTo() and
FieldGet( with name of the field )), Multidimensional arrays, Array of Hashes.
Usage: ALIAS oRs, ALIAS oQry, ALIAS oDbf, ALIAS aData, etc.

* New: samples\redefine.prg is an utility that automatically creates the source
code from a RC dialog, generating all the tedious REDEFINEs for you :-)

viewtopic.php?f=3&t=28862

* Fix: Function SetWindowPos() was not properly 64 bits compatible. Now it is ok.
Thanks to Felix!

* Enhancement: Some enhancements on samples\FiveDBU.prg. Don't miss to use this
great tool that let you manage DBFs and ADO databases!

* Fix: samples\progres1.prg and progres2.prg were not working properly (they show
how to use Windows standard progress bars). Now they are ok:

viewtopic.php?p=162600#p162600

* New: function FW_SendKey( nVirtualKey, nScan )

http://msdn.microsoft.com/en-us/library ... 04(v=vs.85).aspx

Thanks to Eduardo!

viewtopic.php?p=162650#p162650

* Enhancement: buildh32.bat has been modified so the MSVCR120.dll is no
longer needed:

viewtopic.php?p=162707#p162707

* Fix: printer.prg, tfoldex.prg,tmsgitem.prg, ttitle.prg
These programs were prematurely releasing fonts, destroying fonts still
under use by other windows.
Fixed: method setfont() of printer.prg
Fixed: methods new() and redefine() of tfoldex.prg. Earlier the
font attributes like bold,italic,etc of the user provided font
were being removed. Also fixed.
Fixed: Font set to msgitem and text in ttitle.prg with SetFont()
method was excess releasing the earlier font.

* Fix: The printer preview was not destroying its cursor. Now it is ok.

* New: adofuncs.prg
a) Enhancement: Added support for MySql drivers 5.2 and 5.3 in
connection strings.
b) New function AdoNull() --> NULL value for assignment in ADO/OLE
c) New function AdoDefault() --> Skip argument
Same as xHarbour's OleDefaultArg()
d) New: FW_AdoIndexes( oCn, cTable )
e) New: FW_AdoCreateIndex( oCn, cTable, cIndexName, aCols, lUnique )
f) New: FW_AdoDropIndex( oCn, cTable, cIndexName )
g) MSSQL_BulkImportDBF()
For use with MSSQL for fast bulk import from DBF files.
Instructions for use and limitations are given inside the
body of the function. In future versions, this functionality
will be extended to MySql.
h) FW_OpenTRecSet(...) Opens new TRecSet() object using same parameters
as FW_OpenRecordSet() function. Provided for easy migration to use
the new TRecSet() class.
i) FW_AdoPrimaryKey( oCn, cTable )
j) FW_AdoQueryResult( cSql, oCn )
eg: FW_AdoQueryResult( "SELECT SUM(SALES) FROM SALESTAB", oCon ) --> nTotalSales
FW_AdoQueryResult( "SELECT SUM(QTY),SUM(VALUE) FROM MYTBL", oCn ) --> { nTotQty, nTotValue }
FW_AdoQueryResult( "SELECT QTY,AMT FROM MYTBL WHERE PROD=99", oCn ) --> MultiDim Array of values
k) FW_AdoDateTime( oCn ) --> Server Datetime

New: CLASS TRecSet (\fwh\source\classes\trecset.prg)
Wrapper class for ADO recordset, similar to TDatabase class.
Usage is compatible with ADO syntax as well as TDatabase syntax.
Fields can be accessed and assigned as data.
Totally compatible with present ADO code already used with
ADO RecordSets.

Usage:
// ADO SYNTAX
Instead of oRs := TOleAuto():New( "ADODB.RecordSet" )
Use oRs := TRecSet():New()
WITH OBJECT oRs // optionally
:LockType := adLockBatchOptimistic
....
END
oRs:Open( [cSql], [oCn], ..... ) // Syntax exactly same as ADO syntax
Field values can be accessed and assigned as Data.
? oRs:HireDate
oRs:City := "New York"
oRs:ImageData := MemoRead( "MyPhoto.Jpg" )
? oRs:Fields( "joiningdate" ):Value // also works compatible with ado
oRs:GoTop(), GoBottom(), etc methods also can be used
in addition to MoveFirst(), MoveNext(), etc.
- No need to check if the recordset is empty or not while using the
navigation methods.

// TDATABASE syntax
oRs := TRecSet():New( , "CUSTOMER", oCon )
if oRs:use()
// proceed
else
// error opening
endif
Other methods are similar to TDatabase
//
Fields containing blanks can be accessed/assigned by replacing spaces with '_'.
Examples:
Where field name is "Join Date"
oRs:Join_Date := Date()
oRs:FieldGet( "join date" )
oRs:FieldGet( "join_date" )
etc. all work
// Expression evaluation
We can use valid expressions including fieldnames of oRs in FieldGet() and
also xbrowse.
eg:
oRs:FieldGet( "Trim(First) + ', ' + Trim(Last)" )
XBROWSE COLUMNS ...., "Round( Quantity * Price, 2 )", ....

This simplifies expression usage when compared to gettig the same
result using normal ado syntax.

// Wrapping an already created RecordSet
If oRs is already created in the normal ADO way, then
oRs := TRecSet():New( oRs ) can be used to avail the above features.

All suggestions for improvement, better compatibility with
TDatabase and bug-reports are highly welcome.

* Enhancement: We have shorted the default width of the menuitems:

viewtopic.php?p=163038#p163038

* Fix: Class TBtnBmp Method PaintBorder() was not working properly on
some circunstances due to recent changes. Now it is ok:

viewtopic.php?p=163078#p163078

* Enhancement: Generated checkres.txt from function CheckRes() now includes
the name of the EXE:

viewtopic.php?p=163094#p163094

* Fix: ComboBoxes defined with STYLE CBS_DROPDOWN and created from source
code where not properly managing their valid. Now it is ok.

* Enhancement: Class TWindow Method GoNextCtrl() now returns the hWndNextCtrl.
regards, saludos

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

Re: New FTDN (July) 2014 (FWH 14.07)

Postby carlos vargas » Mon Aug 04, 2014 1:11 pm

Antonio, para el próximo build, por favor incluir este código, el cual al parecer fue retirado de timagen:
Code: Select all  Expand view  RUN

function FIMakeThumbNail( cSrcFile, cDstFile, nPixel )

   local nSrcFormat, hDib, hDib2, lOk := .F.

   if LoadFreeImage() > 32

      nSrcFormat := FIGETFILETYPE( cSrcFile, 0 )
      hDib       := FILOAD( nSrcFormat, cSrcFile, 0 )
      hDib2      := FMAKETHUMBNAIL( hDib, nPixel, .T. )

      lOk = FISAVE( nSrcFormat, hDib2, cDstFile, 0 )

      FIUNLOAD( hDib  )
      FIUNLOAD( hDib2 )

   endif

return lOk

//------------------------------------------------------------------//
DLL32 FUNCTION FMAKETHUMBNAIL( hDib AS LONG, nPixel AS LONG, lConvert AS BOOL ) AS LONG ;
      PASCAL FROM If( IsExe64(), "FreeImage_MakeThumbnail", "_FreeImage_MakeThumbnail@12" ) ;
      LIB hLib

 
Salu2
Carlos Vargas
Desde Managua, Nicaragua (CA)
User avatar
carlos vargas
 
Posts: 1721
Joined: Tue Oct 11, 2005 5:01 pm
Location: Nicaragua

Re: New FTDN (July) 2014 (FWH 14.07)

Postby Antonio Linares » Mon Aug 04, 2014 2:25 pm

Carlos,

gracias, vamos a revisarlo.
regards, saludos

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

Re: New FTDN (July) 2014 (FWH 14.07)

Postby Antonio Linares » Mon Aug 11, 2014 3:34 am

We have already published a revised build (2) for FWH 14.07

* XBROWSE
(a) Enhancement: Now Ado seek expression can contain single Quote also.

* XBrowser ( function XBrowse() ) New look with added buttons for Navigation
and Add/Edit/Delete

* adofuncs.prg:
(a) FW_AdoImportFromDBF(). Importing DBFs (without fpt) to MS Access highly
optimized.

* Fix: MsgInfo() was not properly showing decimal numbers. Now it is ok.

* Enhancement: Class TBtnBmp was not properly moving the caption when pressed.
Now it is ok
regards, saludos

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