EXCESS RELEASE OF FONT Tahoma[ hFont : 0] ( nCount : 0 )

EXCESS RELEASE OF FONT Tahoma[ hFont : 0] ( nCount : 0 )

Postby dutch » Wed Jan 17, 2018 9: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: Select all  Expand view
// 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 ::Super:Destroy()
Code: Select all  Expand view
* ============================================================================
* 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 19.01 / 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)
User avatar
dutch
 
Posts: 1535
Joined: Fri Oct 07, 2005 5:56 pm
Location: Thailand

Re: EXCESS RELEASE OF FONT Tahoma[ hFont : 0] ( nCount : 0 )

Postby dutch » Wed Jan 17, 2018 9:56 am

I've remark ::Super:Destroy(). The logerror() file is not created anymore.

What is the problem, if I do it?
Code: Select all  Expand view
* ============================================================================
* 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()

Return 0
 


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

FWH 19.01 / 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)
User avatar
dutch
 
Posts: 1535
Joined: Fri Oct 07, 2005 5:56 pm
Location: Thailand

Re: EXCESS RELEASE OF FONT Tahoma[ hFont : 0] ( nCount : 0 )

Postby Antonio Linares » Wed Jan 17, 2018 7:40 pm

Dutch,

Please try it this way:
Code: Select all  Expand view
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
User avatar
Antonio Linares
Site Admin
 
Posts: 41274
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: EXCESS RELEASE OF FONT Tahoma[ hFont : 0] ( nCount : 0 )

Postby dutch » Thu Jan 18, 2018 2: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: Select all  Expand view
* ============================================================================
* 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

//  ::Super:Destroy()

Return ::Super:Destroy()
Regards,
Dutch

FWH 19.01 / 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)
User avatar
dutch
 
Posts: 1535
Joined: Fri Oct 07, 2005 5:56 pm
Location: Thailand

Re: EXCESS RELEASE OF FONT Tahoma[ hFont : 0] ( nCount : 0 )

Postby Uwe.Diemer » Tue May 21, 2019 6:03 am

Any News ??

After using sbutton the font of sbutton is changed


Before

http://prntscr.com/nr8o6h

Image

After

http://prntscr.com/nr8nqy


tx
User avatar
Uwe.Diemer
 
Posts: 93
Joined: Mon Aug 09, 2010 11:00 am


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 15 guests