FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Possible FONT Bug
Posts: 33
Joined: Thu Jan 26, 2006 05:53 PM
Possible FONT Bug
Posted: Thu Sep 09, 2010 11:09 PM
Hi,

Run this code from the SAMPLE FiveWin folder and view the result in the checkres.txt file.

Code (fw): Select all Collapse
#include "fivewin.ch"
#include 'xbrowse.ch'

Function Main()
   local oWnd, oDbCustomer, oBrw, oFont

   ferase("checkres.txt")

   DEFINE FONT oFont NAME 'MS Sans Serif' SIZE 0,-10

   use customer
   DATABASE oDbCustomer

   define window oWnd

   SET FONT OF oWnd TO oFont

   @ 0, 1 SAY "Test"

   @ 20,20 XBROWSE oBrw OF oWnd SIZE -10,-30 PIXEL ;
     FIELDS 'FIRST', 'LAST', 'STREET' OBJECT oDbCustomer;
     LINES CELL FASTEDIT NOBORDER

     oBrw:CreateFromCode()

   activate window oWnd

   oFont:End()

   checkRes()

return nil



Regards,

RodMG
Posts: 33
Joined: Thu Jan 26, 2006 05:53 PM
Re: Possible FONT Bug
Posted: Thu Sep 09, 2010 11:11 PM

Hi,

I'm ussing FWH 10.1

Regards,

RodMG

Posts: 33
Joined: Thu Jan 26, 2006 05:53 PM
Re: Possible FONT Bug
Posted: Tue Sep 14, 2010 03:04 PM

Hi,

¿Could some one test this code in the FWH 10.8? In FWH 9.12 the FONT object is not released.

Thanks in advance,

RodMG

Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
Re: Possible FONT Bug
Posted: Tue Sep 14, 2010 03:37 PM

RodMG,

I tested it with 10.8 and the font is released.

Regards,
James

FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Possible FONT Bug
Posted: Tue Sep 14, 2010 07:28 PM

Rod,

If your version is not working fine, you can always end() an object twice, though it is not advisable but it can fix the problem:

oFont:End()
oFont:End()

regards, saludos

Antonio Linares
www.fivetechsoft.com

Continue the discussion