Page 1 of 1

Possible FONT Bug

Posted: Thu Sep 09, 2010 11:09 pm
by RodMG
Hi,

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

Code: Select all

#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

Re: Possible FONT Bug

Posted: Thu Sep 09, 2010 11:11 pm
by RodMG
Hi,

I'm ussing FWH 10.1


Regards,

RodMG

Re: Possible FONT Bug

Posted: Tue Sep 14, 2010 3:04 pm
by RodMG
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

Re: Possible FONT Bug

Posted: Tue Sep 14, 2010 3:37 pm
by James Bott
RodMG,

I tested it with 10.8 and the font is released.

Regards,
James

Re: Possible FONT Bug

Posted: Tue Sep 14, 2010 7:28 pm
by Antonio Linares
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()