Hola Manu,
Cuanto tiempo!!
¿Qué te responde? ¿Bye? ¿Hello?
El caso es que deberías ver si te funciona usando tres prgs diferentes.
Ese ejemplo es un extracto de lo que estoy haciendo en la 'realidad'.
Saludos,
José LUis CApel
----- Original Message -----
From: "Manu" <[EMAIL PROTECTED]>
To: "Harbour Project Main Developer List." <harbour@harbour-project.org>
Sent: Tuesday, August 19, 2008 11:48 PM
Subject: Re: [Harbour] HB_FUN_STATIC
Jose Luis he probado el código en un mismo PRG. Poniendo la funcion main
al principio y va perfectamente :-)
De hecho yo lo uso en mis clases y no me falla
#include "hbclass.ch"
FUNCTION MAIN()
LOCAL o
o := MyOtherClass():New()
? o:MyMethod() // --> 'Bye'
RETURN NIL
CLASS MyClass
METHOD MyMethod() INLINE 'Bye'
METHOD New() INLINE Self
ENDCLASS
CLASS MyOtherClass FROM MyClass
METHOD MyMethod()
ENDCLASS
#pragma BEGINDUMP
#include "hbapi.h"
HB_FUNC_STATIC( MYOTHERCLASS_MYMETHOD )
{
hb_retc("Hello");
}
#pragma ENDDUMP
José Luis Capel - escribió:
Hi all,
This piece of code (three separate prg's):
// one.prg
CLASS MyClass
METHOD MyMethod() INLINE 'Bye'
METHOD New() INLINE Self
ENDCLASS
// Two.Prg
CLASS MyOtherClass FROM MyClass
METHOD MyMethod()
ENDCLASS
#pragma BEGINDUMP
#include "hbapi.h"
HB_FUNC_STATIC( MYOTHERCLASS_MYMETHOD )
{
hb_retc("Hello");
}
#pragma ENDDUMP
// Three.prg
FUNCTION MAIN()
LOCAL o
o := MyOtherClass():New()
? o:MyMethod() // --> 'Bye'
RETURN NIL
Should not it shows 'Hello' instead of 'Bye'??
I make the question in other words...
How can I 'emulate' xHarbour behavior ??
Do I have to set any flag ??
If not... how can I mix (in same prg) prg level methods of a class with C
level methods of same class ??
Many thanks for your help.
José Luis Capel
_______________________________________________
Harbour mailing list
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour
_______________________________________________
Harbour mailing list
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour
_______________________________________________
Harbour mailing list
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour