Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Propriedade/método
Message
From
04/10/2002 09:07:28
 
 
To
04/10/2002 08:51:55
General information
Forum:
Visual FoxPro
Category:
Object Oriented Programming
Miscellaneous
Thread ID:
00707724
Message ID:
00707731
Views:
18
This message has been marked as a message which has helped to the initial question of the thread.
>Como eu faço para saber (em tempo de execução) se determinada propriedade e/ou método existe em um determindao objecto?

PROPRIEDADE:
IF  TYPE("THISFORM.MINHAPROP")<>"U"
    * PROPRIEDADE EXISTE
ENDIF
No metodo retorne um valor como .t. ou .f. para certificar-se se ela executou uma operação e teste, mais ou menos assim:
m.onerror   = ON("ERROR")
lwerror = .f.
on error lwerror = .t.
IF  THISFORM.MEUMETODO()
    * COMO ELA EXISTINDO SÓ RETORNARÁ .T. OU .F.
    * VOCÊ PREVÊ OU NÃO A EXISTENCIA DEELA
ENDIF
if  lwerror
    * não encontrado o seu metodo
    *
endif
on error &m.onerror
Espero que ajude..

Claudio
"Now to him who is able to do immeasurably more than all we ask or imagine, according to his power that is at work within us, Ephesians 3:20
Previous
Reply
Map
View

Click here to load this message in the networking platform