On Tue, 01 Dec 2009, Chen Kedem wrote:

Hi,

> The following was reported on SF bug tracker:
> http://sourceforge.net/tracker/?func=detail&atid=100681&aid=2906734&group_id=681
> Angel Diaz Leiva (angeldiazleiva) wrote:
> ---------------------------------
> When making the declaration of a class, if you declare a ClassMethod
> and then seeks to use it, there is an error message: 'message not found'
> followed by the name of the method.
> But if there is a ClassVar with the same name as the method does not
> generate any error messages, although the method is not called or running.
> It appears that ClassMethod not taken into account in the class declaration.
> ---------------------------------
> Attached is the sample given by the user
> Tested with Rev13051 I get the same error as the user
> I don't know if the sample program is wrong or if its a real error.

Neither Harbour nor xHarbour supports class objects like Class(y)
so they do not support class method and class variables in the same
way as Class(y) does. In Harbour and xHarbour class variables are
object variables shared between objects of the same class not instance
variables of class object like in Class(y).
Class methods are not supported by both compilers at all.
xHarbour translates class messages to normal messages and Harbour
silently ignore them. If xHarbour behavior is enough for you then
you can add after:
   #include "hbclass.ch"
this line:
   #xcommand CLASS METHOD [<x,...>] => METHOD <x>
Anyhow without real class object the code in attached example is not
very efficient because each call to TESTCLASS() forces creating new
instance of TESTCLASS object.

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

Reply via email to