Jimmy wrote:hi,
i got this in *.LOG
14.05.2023 21:03:46: MAIN( 624 ) "Start" = "Start"
14.05.2023 21:04:29: EXCESS RELEASE OF FONT TAHOMA[ hFont : 0] ( nCount : 0 )
<-TFONT:END(303) <-TCONTROL:DESTROY(2318) <-TBTNBMP:DESTROY(1111) <-TWINDOW:HANDLEEVENT(0) <-TCONTROL:HANDLEEVENT(1857) <-TBTNBMP:HANDLEEVENT(2135) <-_FWH(3681) <-WINRUN(0) <-TWINDOW:ACTIVATE(1114)
------------------------------------------------------------
14.05.2023 21:04:29: EXCESS RELEASE OF FONT TAHOMA[ hFont : 0] ( nCount : -1 )
<-TFONT:END(303) <-TCONTROL:DESTROY(2318) <-TBTNBMP:DESTROY(1111) <-TWINDOW:HANDLEEVENT(0) <-TCONTROL:HANDLEEVENT(1857) <-TBTNBMP:HANDLEEVENT(2135) <-_FWH(3681) <-WINRUN(0) <-TWINDOW:ACTIVATE(1114)
------------------------------------------------------------
14.05.2023 21:04:29: MAIN( 953 ) "Ende" = "Ende"
i have open DIALOG where i use a PUBLIC FONT in XBROWSE
when remove FONT or use a "local" FONT than i have no Problem ... hm
what is the Problem with PUBLIC FONT in DIALOG
p.s. App will still run but i want get rid of those Error.LOG
Impossible, unless there is a deviation in the program code from the recommended usage or creation and release of fonts.
It does not matter whether the font is Public, Private, Local or Static variable
In a well written program, there should never be a need for workarounds like:
- Code: Select all Expand view RUN
Do While oFont:nCount > 0
oFont:End()
Enddo
Can anyone please provide a small sample to reproduce this problem?
I tested in several ways and never got this problem.
This is one of my tests:
- Code: Select all Expand view RUN
#include "fivewin.ch"
MEMVAR oFontP
function MaIN()
local oWnd, oBar
PUBLIC oFontP
DEFINE FONT oFontP NAME "VERDANA" SIZE 0,-14
DEFINE WINDOW oWnd
oWnd:SetFont( oFontP )
DEFINE BUTTONBAR oBar OF oWnd
DEFINE BUTTON OF oBar ACTION ShowDlg()
ACTIVATE WINDOW oWnd
RELEASE FONT oFontP
return nil
static function ShowDlg()
local oDlg, oBrw
DEFINE DIALOG oDlg SIZE 400,200 PIXEL TRUEPIXEL FONT oFontP
@ 20,20 XBROWSE oBrw SIZE -20,-20 PIXEL OF oDlg ;
DATASOURCE { 1,2,3 } AUTOCOLS ;
FONT oFontP ;
CELL LINES NOBORDER
oBrw:CreateFromCode()
ACTIVATE DIALOG oDlg
return nil