Hello Przemek

1. Do we have something like thread scoped INIT/EXIT 
procedures. In hbXBP some functions have to be called
only once and that too before any other code is executed.

This will facilitate the better performance. Otherwise I 
ever have to check the existance if some variable if 
it is initialized or not.

2. Do we have some provison in Class framework to get 
the chain of inheritance. This is required for Xbase++ object 
method :isDerivedFrom( cClassOrObject ). 

I need to establish if a particular class belongs to the same
family somewhere ancestral. And based on this some actions 
are executed. Right now I am doing like this ( but it is only one 
side of the coin ):


METHOD XbpWindow:isDerivedFrom( cClassORoObject )
   LOCAL lTrue := .f.
   LOCAL cCls := __ObjGetClsName( Self )

   /* Compares without Xbp or Wvg prefixes  */

   IF hb_isChar( cClassORoObject )
      IF upper( substr( cClassORoObject,4 ) ) == upper( substr( cCls,4 ) )
         lTrue := .t.
      ENDIF

   ELSEIF hb_isObject( cClassORoObject )
      IF upper( substr( cClassORoObject:className,4 ) ) == upper( substr(
cCls,4 ) )
         lTrue := .t.
      ENDIF
   ENDIF

   IF !( lTrue )
      IF hb_isObject( ::oParent )
         lTrue := ::oParent:isDerivedFrom( cClassORoObject )
      ENDIF
   ENDIF

   RETURN lTrue

As you can make out, above code is valid only for those 
instnces who have oParent only. This is not real implementation.
Your help is requested.

Regards
Pritpal Bedi


-- 
View this message in context: 
http://old.nabble.com/INIT-EXIT-Procedures---Thread-Wise-tp27302415p27302415.html
Sent from the Harbour - Dev mailing list archive at Nabble.com.

_______________________________________________
Harbour mailing list (attachment size limit: 40KB)
[email protected]
http://lists.harbour-project.org/mailman/listinfo/harbour

Reply via email to