From 9e39e212a6d7c595d9850a318e5eecfead9422d6 Mon Sep 17 00:00:00 2001 From: Pritpal Bedi Date: Tue, 31 Aug 2010 21:08:13 +0000 Subject: [PATCH] 2010-08-31 14:06 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com) * contrib/hbxbp/xbpparthandler.prg * contrib/hbxbp/xbpwindow.prg ! :status() more synchronized. NIL => Not initialized. XBP_STAT_INIT => Object is initialized. XBP_STAT_CREATE => Object creation is successful. XBP_STAT_FAILURE => Object creation is either failed or object is destroyed. --- harbour/ChangeLog | 10 ++++++++++ harbour/contrib/hbxbp/xbpparthandler.prg | 4 +++- harbour/contrib/hbxbp/xbpwindow.prg | 14 +------------- 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 870f97438c..961f1196ea 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -16,6 +16,16 @@ The license applies to all entries newer than 2009-04-28. */ +2010-08-31 14:06 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com) + * contrib/hbxbp/xbpparthandler.prg + * contrib/hbxbp/xbpwindow.prg + ! :status() more synchronized. + NIL => Not initialized. + XBP_STAT_INIT => Object is initialized. + XBP_STAT_CREATE => Object creation is successful. + XBP_STAT_FAILURE => Object creation is either failed or + object is destroyed. + 2010-08-31 13:55 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com) * contrib/hbxbp/xbp.ch * contrib/hbxbp/xbp3state.prg diff --git a/harbour/contrib/hbxbp/xbpparthandler.prg b/harbour/contrib/hbxbp/xbpparthandler.prg index e3e884a65b..897e309e8d 100644 --- a/harbour/contrib/hbxbp/xbpparthandler.prg +++ b/harbour/contrib/hbxbp/xbpparthandler.prg @@ -100,7 +100,7 @@ CLASS XbpPartHandler DATA nNameId DATA oParent DATA oOwner - DATA nStatus INIT XBP_STAT_INIT + DATA nStatus INIT NIL ENDCLASS @@ -110,6 +110,7 @@ METHOD init( oParent, oOwner ) CLASS XbpPartHandler ::oParent := oParent ::oOwner := oOwner + ::status := XBP_STAT_INIT RETURN Self @@ -146,6 +147,7 @@ METHOD destroy() CLASS XbpPartHandler ::oParent := NIL ::oOwner := NIL ::nStatus := NIL + ::status := XBP_STAT_FAILURE RETURN NIL diff --git a/harbour/contrib/hbxbp/xbpwindow.prg b/harbour/contrib/hbxbp/xbpwindow.prg index 6f5109f397..9f8008aeda 100644 --- a/harbour/contrib/hbxbp/xbpwindow.prg +++ b/harbour/contrib/hbxbp/xbpwindow.prg @@ -417,13 +417,6 @@ METHOD XbpWindow:configure( oParent, oOwner, aPos, aSize, aPresParams, lVisible METHOD XbpWindow:destroy() -#if 0 -HB_TRACE( HB_TR_DEBUG, ". " ) -HB_TRACE( HB_TR_DEBUG, hb_threadId(),"Destroy[ B ] "+pad(cCls,12)+ IF(empty(::cargo),'',str(::cargo) ), memory( 1001 ) ) - LOCAL cCls := __ObjGetClsName( self ), cMsg -cMsg := iif( cCls == "XBPWINDOW", ::oWidget:objectName(), IF( empty(::cargo),'',str(::cargo) ) ) -HB_TRACE( HB_TR_DEBUG, hb_threadId(),"Destroy[ B ] "+pad(cCls,12)+ cMsg, memory( 1001 ) ) -#endif ::oParent := NIL ::oOwner := NIL @@ -437,7 +430,6 @@ HB_TRACE( HB_TR_DEBUG, hb_threadId(),"Destroy[ B ] "+pad(cCls,12)+ cMsg, memory IF !empty( ::qtObject ) ::qtObject:destroy() -// ::qtObject := NIL ENDIF IF !empty( ::qLayout ) @@ -445,11 +437,7 @@ HB_TRACE( HB_TR_DEBUG, hb_threadId(),"Destroy[ B ] "+pad(cCls,12)+ cMsg, memory ENDIF ::oWidget := NIL -#if 0 -HB_TRACE( HB_TR_DEBUG, hb_threadId(),"Destroy[ E ] "+pad(__ObjGetClsName( self ),12)+ IF(empty(::cargo),'',str(::cargo) ), memory( 1001 ) ) -HB_TRACE( HB_TR_DEBUG, ". " ) -HB_TRACE( HB_TR_DEBUG, hb_threadId(),"Destroy[ E ] "+pad(__ObjGetClsName( self ),12)+ IF(empty(::cargo),'',str(::cargo) ), memory( 1001 ) ) -#endif + RETURN NIL /*----------------------------------------------------------------------*/