Página 1 de 1
Como saber si un Method existe en la clase
Enviado: 20 Mai 2020 23:09
por Ruben Dario
Saludos al Forun
Tengo 2 preguntas
1.
Como saber si un Method existe en la clase
2.
Como saber si un Function existe.
Como saber si un Method existe en la clase
Enviado: 21 Mai 2020 00:09
por alxsts
Olá!
Ruben Dario escreveu:Como saber si un Method existe en la clase
Código: Selecionar todos
Function Main()
LOCAL oObj := SomeClass():new()
Setmode(25,80)
If __objHasMethod( oObj, "SomeMethod" )
hb_Alert( "Método existe" )
Else
hb_Alert( "Método não existe" )
Endif
RETURN NIL
Ruben Dario escreveu:Como saber si un Function existe.
Código: Selecionar todos
Function Main()
Setmode(25,80)
cls
If Type( "TestFunc()" ) == "UI"
hb_Alert( 'Funcão "TestFunc()" existe' )
Else
hb_Alert( 'Funcão "TestFunc()" nao existe' )
EnDif
If Type( "xpt()" ) == "UI"
hb_Alert( 'Funcão "xpt()" existe' )
Else
hb_Alert( 'Funcão "xpt()" não existe' )
EnDif
RETURN NIL
FUNCTION TestFunc()
RETURN NIL
Como saber si un Method existe en la clase
Enviado: 21 Mai 2020 19:26
por Ruben Dario
Muchas Gracias Funciono
Como saber si un Method existe en la clase
Enviado: 21 Mai 2020 19:57
por Itamar M. Lins Jr.
Ola!
Código: Selecionar todos
>hbmk2 -find hb_isfunc
Núcleo Harbour (instalado):
hb_IsFunction()
IF hb_IsFunction( "dbRelation" )
Núcleo Harbour (instalado):
HBProfileMethod()
hb_MethodName()
__objAddMethod()
__objDelMethod()
__objGetMethodList()
__objHasMethod()
__objModMethod()
Saudações,
Itamar M. Lins Jr.
Como saber si un Method existe en la clase
Enviado: 21 Mai 2020 22:16
por alxsts
Olá!
O tópico
"Ayuda con esta clase" tem mais informações.