Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Propriedade/método
Message
De
04/10/2002 09:07:28
 
 
À
04/10/2002 08:51:55
Information générale
Forum:
Visual FoxPro
Catégorie:
Programmation Orientée Object
Divers
Thread ID:
00707724
Message ID:
00707731
Vues:
19
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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform