New FTDN September/Septiembre 2017 (FWH 17.09)

New FTDN September/Septiembre 2017 (FWH 17.09)

Postby Antonio Linares » Wed Oct 04, 2017 7:43 pm

September 2017
==============

* TGraph Bugfix: Font object is not released. Fixed.

* TGraph Fonts: New clause FONT oFont and methods SetFont():
At present TGraph treats Arial 10 as base font
and derives nine fonts from this basefont for use. Bold font
for titles, 1.5 times larger for main title and vertical font
for xtitle. There is no easy way to modify the font.
Now it is possible to assign a font with FONT clause. This font
is taken as basefont for deriving all 9 fonts. It is also
possible to change the basefont with ::SetFont( oNewFont )
after creation of TGraph or during runtime.
- New method SetFonts( aFonts )
It is also possible to substitute all of some of the 9 fonts
using this method with array of 9 fonts as parameter. If any
of the element is nil, corresponding font is not replaced.
Note: At present only xtitle can display vertical fonts.

* TDATABASE:
- Improved Safety:
- Possible side-effects of calling Close() and Use() methods
multiple times are prevented.
- Closing or reopening another dbf in the same area by
external code is detected and protected.
- Inadvertant overwriting of data of a record with data of
another record (when record pointer is moved by external code)
is detected and prevented.
- Inadvertant omission of calling oDbf:Append() after calling
and editing oDbf:Blank() before calling oDbf:Save() could
result in overwriting current record instead of saving the
changes to a new record. This is now prevented. Calling
oDbf:Save() after oDbf:Blank() invariably appends the data,
whether or not oDbf:Append() is called.

- New CONSTRUCTOR METHOD Create( cDbf, aStruct, [cDriver], ;
[cIndexfields] ) --> Self

- Now uses new protected method NewAlias() for generating new
alias names.

- Methods Activate() and DeActivate() are mapped to ::Use() and ::Close()

- New METHOD FieldReadOnly( cnFld, [lRO] ) --> lReadOnly
Note: Fields with datatypes "+" and "=" are always readonly

- New METHOD FieldDefault( cnFld, [uDefault], [lRO] ) --> uDefault
Set default values while appending new records.

- New METHOD FieldPic( cnFld, [cPic] ) --> cPic
- New METHOD FieldChoice( cnFld, [aList] ) --> aList
List to be used in XBrowse EDIT_LISTBOX and Record Object's
Combobox.

- New methods: Copy() and Paste()
Eg: oDbf:Copy(), modify oDbf:aCopy, oDbf:GoTo(nOthRec), oDbf:Paste()

- Triggers Improved: ::bTrigger is now evaluated on delete
and recall also. While the 1st parameter continues to be
the database object, 2nd parameter contains the operation,
i.e., "UPDATE", "INSERT", "DELETE". In case of update,
an additional 3rd parameter hRecord (hash) containing values
prior to update is provided.
If ::bTrigger returns logical .F., then the operation is
aborted. Data already written to the record are Rolled Back.

- CreateIndex( [cFile], cTag, cKey, [lUnique], [lDescend], [lMemory] )
New additional parameter lMemory enables creation of
temporary indexes.

- SetFilter( [cFilter] ) --> cFilterExp
Now returns existing filter expression
If cFilter is "", clears filter and if cFilter is nil, no action

- New: ClearFilter() clears filter

- New: ReIndex()

- New Data: nBufRec. Represents recno() corresponding to the
oDbf:aBuffer in memory. When oDbf:Blank() is called, this value
is Zero.

- Hint: If the programmers wants to copy data of one record
and paste to another record:
oDbf:GoTo( nSrcRec )
( oDbf:cAlias )->( DBGOTO( nNewRec ) )
oDbf:nBufRec := nNewRec
oDbf:Save()

- New Method LookUp( uVal, cOrder, bcRetExprn ) --> uValue

- It is now possible to swap browse objects at runtime.
- General dbf utility functions contained in database.prg are now
moved to separate modules function\dbffunc1.prg and function\dbffunc2.prg,
retaining database.prg exclusively for tdatabase class only.

* Fix: Some required fixes for GET ... CUEBANNER support:

viewtopic.php?p=205126#p205126

* CHECKRES(): Now, fonts created with functions CreateFontAs() and
GetFontMenu() are also monitored by checkres() system.

* MENUS: By default, when no style is selected, the menus have the appearance of those defined by the OS
   because OWNERDRAW is not applied internally to paint the items. Same high and wide as the system menus.
    If you want to add any clause to a menu without defining any style, it is necessary to add the color
   in the definition of our menu

    Example:
MENU oMenu
MENUITEM "First"
MENU
MENUITEM "My Test" BOLD
MENUITEM "My Menu" ITALIC
ENDMENU
ENDMENU

In this case, the BOLD and ITALIC clauses are ignored
    But, if the menu is defined as:

MENU oMenu COLORS

All clauses are active, if defined, even if no style has been defined

- Styles 2007, 2010, 2013 and 2015, have not undergone any changes

- Clause HEIGHT TMenu: bug fixed
If nHeight < 0, only menubar is changed.

- Added parameter lHelp to METHOD AddHelp CLASS TMENU, allow set item menu as HELP clause
Use only with NON-STYLE defined in menu
Item "Help" is located to the right of the main menu bar
oMenu:AddHelp( , , , , , .T. )

- Added clause [ COLORLINEBOTTOM <nClrLBottom> ] to MENUS
Paint line with colour nClrLBottom to bottom height of menu bar
ONLY FOR BAR MENUS

Examples:
MENU oMenu 2015 COLORLINEBOTTOM CLR_YELLOW
or
MENU oMenu COLORS COLORLINEBOTTOM CLR_YELLOW

* MENUITEM:

- Fixed loss of resources when defining BOLD and ITALIC fonts

- CheckMenuRadioItem feature implemented
https://msdn.microsoft.com/en-us/librar ... 21(v=vs.85).aspx

Added clause [RADIOCHECK <nItemsGroup>, <nCheck>]
    Allows to define a group of items <nItemsGroup> as a RADIOMENU
    <nCheck> defines the item, within the defined group that is CHECKED initially

    Example:
function MakeMenu()

local oMenu

MENU oMenu
MENUITEM "One"
MENU
MENUITEM "Sunday"
SEPARATOR
MENUITEM "Monday" RADIOCHECK 3, 2
MENUITEM "Tuesday" ACTION MsgInfo( "Hola" )
MENUITEM "WednesdaY"
SEPARATOR
MENUITEM "Thursday" FILE "..\bitmaps\16x16\design.bmp"
SEPARATOR
MENUITEM "Exit" ACTION WndMain():End()
ENDMENU
MENUITEM "Two"
ENDMENU
return oMenu

In this case the items "Monday", "Tuesday" and "Wednesday" (3) are grouped as a RADIOMENU and the
    item (2) "Tuesday", is CHECKED initially

- SetMenuDefaultItem feature implemented
Added clause ITEMDEFAULT in TMenuItem: paint bold item

- Added new DATAS:
DATA lRadio INIT .F.
DATA lRadioCheck INIT .F.
DATA nFirst INIT 0
DATA nLast INIT 0
DATA nCheck INIT 0

DATA lDefault INIT .F.

- The GetnHeightItem () and GetnWidthItem () functions can be applied equally, but do not produce
    no changes if the COLORS clause has not been defined, or a style defined

- Minor bug clause UPPERMENU: fixed

* TBAR: Added clause DESIGN

* FOLDEREX: Added METHOD cGenPRG

* function FW_CdxCreate( [caTagList], [lMemory] ). Added new optional
parameter lMemory to create indexes in memory.

* fwh\samples\customer.dbf: New AutoInc field ID added at postion 1, so
that the structure matches the structure of customer table in
ADO,MDB,MySql provided by FWH

* New: XImage: By default, user can pan, zoom and rotate the image with
mouse or touch. This can be disabled by setting oImage:nUserControl := 0

* New: XImage: Method SetAlign( cAlign ): cAlign can be combination of
L,T,R,B for left, top, right, bottom. Eg: "TL", "R", "BR", etc

* New function SetErrorDialog( bDialog ) in errsysw.prg. User can replace
default error dialog with his own custom dialog. If specified, bDialog is
evaluated as:
Eval( bDialog, oError, aStack, cErrLogText, cErrLogFile )
See \fwh\source\function\errsysw.prg for more details

* New: function FW_DBFLOOKUP( uVal, [cOrder], bcRetExprn ) --> uResult
uVal : Value / Expression to be lookedup ( seek or locate )
cOrder : OrderName for seek. Or field name for locate. Omit if uVal
is an expression
bcRetExpr: codeblock/string: Expression to evaluate
Examples:
CUSTOMER->( FW_DBFLOOKUP( 108, "ID", "AGE" ) ) --> nAge of ID 108
CUSTOMER->( FW_DBFLOOKUP( 99, "ID", "FIELD->SALARY += 100" ) ) -->
Salary field is incremented and written to table and returns the value
ITEMS->( FW_DBLOOKUP( 101, "ITEMCODE", { || FIELD->QTY -= nOldQty } )
ITEMS->( FW_DBLOOKUP( 103, "ITEMCODE", { || FIELD->QRY += nNewQty } )
STATES->( FW_DBLOOKUP( 10, 0, "FIELD->NAME" ) ) // at recno 10
Original recno() and order are restored and any previous locks are
left intact before returning.
Reurn value NIL indicates failure
source: \fwh\function\dbffuns2.prg

* Enhancement to function FW_ExportToExcel(). Added 7th parameter
cSaveTo (filename). If specified, the function saves the Book to
the file without displaying the sheet. If the filename's extention
is pdf or htm/html, the sheet is saved as pdf or html.

* New function FW_CopyDbfTO( cDestFile (xlsx/html/pdf), [cSourceDBF] )

* XBrowse:
Fix: Blank browse is displayed if dbf's eof() is true, even if there
are records. Fixed.
regards, saludos

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

Re: New FTDN September/Septiembre 2017 (FWH 17.09)

Postby cnavarro » Mon Oct 09, 2017 8:42 pm

Muchas gracias. Many thanks.
Saludos,Regards

Cristobal Navarro - Harbour (r1601050904) - xHarbour (Build 20150603) - VS 2013/15/17 - FWH 17.11

Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo
User avatar
cnavarro
 
Posts: 3783
Joined: Wed Feb 15, 2012 8:25 pm
Location: España

Re: New FTDN September/Septiembre 2017 (FWH 17.09)

Postby cnavarro » Sat Nov 04, 2017 2:26 am

New sample MENU

http://wiki.fivetechsoft.com/doku.php?i ... 1709_6.prg

----------------------------------------- EDIT 07/11/2017 ---------------------------

Minor change ( style window ) in sample
Muchas gracias. Many thanks.
Saludos,Regards

Cristobal Navarro - Harbour (r1601050904) - xHarbour (Build 20150603) - VS 2013/15/17 - FWH 17.11

Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo
User avatar
cnavarro
 
Posts: 3783
Joined: Wed Feb 15, 2012 8:25 pm
Location: España

Re: New FTDN September/Septiembre 2017 (FWH 17.09)

Postby cnavarro » Tue Nov 07, 2017 12:40 pm

Other new sample MENU: not use POPUPS Menus

http://wiki.fivetechsoft.com/doku.php?i ... 1709_7.prg
Muchas gracias. Many thanks.
Saludos,Regards

Cristobal Navarro - Harbour (r1601050904) - xHarbour (Build 20150603) - VS 2013/15/17 - FWH 17.11

Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo
User avatar
cnavarro
 
Posts: 3783
Joined: Wed Feb 15, 2012 8:25 pm
Location: España


Return to WhatsNew / Novedades

Who is online

Users browsing this forum: No registered users and 2 guests