FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour EXCESS RELEASE OF FONT Tahoma[ hFont : 0] ( nCount : 0 )
Posts: 1598
Joined: Fri Oct 07, 2005 05:56 PM
EXCESS RELEASE OF FONT Tahoma[ hFont : 0] ( nCount : 0 )
Posted: Wed Jan 17, 2018 09:36 AM
Dear All,

I found the point of my problem case for creating logerror() file. This is TESTGET.PRG in sample folder.
I just add SBUTTON.LIB and it create a log file every time I end font object. It seem NO FONT OBJECT to :end().
01/17/2018 16:09:04: EXCESS RELEASE OF FONT Tahoma[ hFont : 0] ( nCount : 0 )
<-TFONT:END(285) <-MAIN(32)

Code (fw): Select all Collapse
// Testing GETs

#include "FiveWin.ch"
#include "TSbutton.ch"

function Main()
   LOCAL oDlg, oGet, oFont
   LOCAL cCad := "Testing    " // pad("Testing Gets",40)
   LOCAL nNum := 0
   LOCAL dDat := Date()

   Set century On
   Set Date Ansi
   Set Date format "mm/dd/yyyy"

   SET _3DLOOK ON

   DEFINE FONT oFont NAME 'Tahoma' SIZE 0, -14

   DEFINE DIALOG oDlg TITLE "TGet from " + FWDESCRIPTION FONT oFont

   @ 1,    2 SAY "Text..:" OF oDlg
   @ 1,    6 GET oGet VAR cCad OF oDlg SIZE 60, 10 COLOR "W/G" PICTURE "@K"
   @ 1.8,  2 SAY "Number:" OF oDlg
   @ 2,    6 GET oGet VAR nNum OF oDlg SIZE 60, 10 PICTURE "9999999.99"
   @ 2.6,  2 SAY "Date:" OF oDlg
   @ 3,    6 GET oGet VAR dDat PICTURE "@E" OF oDlg SIZE 60, 10  // "@D"
   @ 3,    7 SBUTTON oBtn PROMPT "&Ok" OF oDlg SIZE 30, 12 ACTION oDlg:End()
   @ 3,   16 BUTTON "&Cancel" SIZE 30, 12 OF oDlg ACTION oDlg:End() CANCEL

   ACTIVATE DIALOG oDlg CENTERED
   oFont:End()
return nil


The problem line is ::Destroy()
Code (fw): Select all Collapse
* ============================================================================
* METHOD TSButton:Destroy() Version 7.0 Oct/31/2009
* ============================================================================

METHOD Destroy() CLASS TSButton

   ::FreeBitmaps()

   If Empty( ::cCaption )
      ::oFont := Nil
   EndIf

   If ::lAnimated

      If oAnima != Nil
         oAnima:End()
         oAnima := Nil
      EndIf

   EndIf

   ::Super:Destroy()   <-- I think, It is compatible with FWH1711

Return 0


How can I fix it?

Thank you in advance for any help and suggestion.
Dutch
Regards,

Dutch



FWH 2304 / xHarbour Simplex 1.2.3 / BCC73 / Pelles C / UEStudio

FWPPC 10.02 / Harbour for PPC (FTDN)

ADS V.9 / MySql / MariaDB

R&R 12 Infinity / Crystal Report XI R2

(Thailand)
Posts: 1598
Joined: Fri Oct 07, 2005 05:56 PM
Re: EXCESS RELEASE OF FONT Tahoma[ hFont : 0] ( nCount : 0 )
Posted: Wed Jan 17, 2018 09:56 AM
I've remark ::Destroy(). The logerror() file is not created anymore.

What is the problem, if I do it?
Code (fw): Select all Collapse
* ============================================================================
* METHOD TSButton:Destroy() Version 7.0 Oct/31/2009
* ============================================================================

METHOD Destroy() CLASS TSButton

   ::FreeBitmaps()

   If Empty( ::cCaption )
      ::oFont := Nil
   EndIf

   If ::lAnimated

      If oAnima != Nil
         oAnima:End()
         oAnima := Nil
      EndIf

   EndIf

//   ::Destroy()

Return 0


Thank you in advance for any help and suggestion.
Dutch
Regards,

Dutch



FWH 2304 / xHarbour Simplex 1.2.3 / BCC73 / Pelles C / UEStudio

FWPPC 10.02 / Harbour for PPC (FTDN)

ADS V.9 / MySql / MariaDB

R&R 12 Infinity / Crystal Report XI R2

(Thailand)
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: EXCESS RELEASE OF FONT Tahoma[ hFont : 0] ( nCount : 0 )
Posted: Wed Jan 17, 2018 07:40 PM
Dutch,

Please try it this way:
Code (fw): Select all Collapse
METHOD Destroy() CLASS TSButton

   ::FreeBitmaps()

   If Empty( ::cCaption )
      ::oFont:End() // changed
   EndIf

   If ::lAnimated

      If oAnima != Nil
         oAnima:End()
         oAnima := Nil
      EndIf

   EndIf

return ::Super:Destroy()
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 1598
Joined: Fri Oct 07, 2005 05:56 PM
Re: EXCESS RELEASE OF FONT Tahoma[ hFont : 0] ( nCount : 0 )
Posted: Thu Jan 18, 2018 02:12 AM
It is still created logerror() file.
18/01/18 09:09:28: EXCESS RELEASE OF FONT Tahoma[ hFont : 0] ( nCount : 0 )
<-TFONT:END(285) <-TCONTROL:DESTROY(2154) <-TSBUTTON:DESTROY(971) <-TWINDOW:HANDLEEVENT(0) <-TCONTROL:HANDLEEVENT(1731) <-TSBUTTON:HANDLEEVENT(1322) <-_FWH(3348) <-DIALOGBOXINDIRECTW(0) <-TDIALOG:ACTIVATE(296)
------------------------------------------------------------
18/01/18 09:09:28: EXCESS RELEASE OF FONT Tahoma[ hFont : 0] ( nCount : -1 )
<-TFONT:END(285) <-LOGINSERVER(681) <-CONNECTSERVER(190) <-MAIN(163)
------------------------------------------------------------

I change as below.
Code (fw): Select all Collapse
* ============================================================================
* METHOD TSButton:Destroy() Version 7.0 Oct/31/2009
* ============================================================================

METHOD Destroy() CLASS TSButton

   ::FreeBitmaps()

   If Empty( ::cCaption )
//      ::oFont := Nil
      ::oFont:End()
   EndIf

   If ::lAnimated

      If oAnima != Nil
         oAnima:End()
         oAnima := Nil
      EndIf

   EndIf

//  ::Destroy()

Return ::Super:Destroy()
Regards,

Dutch



FWH 2304 / xHarbour Simplex 1.2.3 / BCC73 / Pelles C / UEStudio

FWPPC 10.02 / Harbour for PPC (FTDN)

ADS V.9 / MySql / MariaDB

R&R 12 Infinity / Crystal Report XI R2

(Thailand)
Posts: 99
Joined: Mon Aug 09, 2010 11:00 AM
Re: EXCESS RELEASE OF FONT Tahoma[ hFont : 0] ( nCount : 0 )
Posted: Tue May 21, 2019 06:03 AM
Any News ??

After using sbutton the font of sbutton is changed


Before

http://prntscr.com/nr8o6h



After

http://prntscr.com/nr8nqy


tx

Continue the discussion