pbaroni Posted December 8, 2006 Report Share Posted December 8, 2006 Alguem pode me ajudar, preciso de uma função que verifica se uma certa classe existe, alguem sabe se existe alguma função que faça isso? Quote Link to comment Share on other sites More sharing options...
pbaroni Posted December 8, 2006 Author Report Share Posted December 8, 2006 Alguem pode me ajudar, preciso de uma função que verifica se uma certa classe existe, alguem sabe se existe alguma função que faça isso? Quote Link to comment Share on other sites More sharing options...
elitenet Posted December 8, 2006 Report Share Posted December 8, 2006 Use o Type( "nome do que voce quer saber" ) Ele vai retornar: A - Array B - Block O - Objeto U - Nil C - Caracter M - Memo N - Numeric L - Logico D - Date Marcelo Gomes elitenet@terra.com.br (32) 3728-1288 Muriae - MG FW 2.3C/FWH 2.6/CLIPPER 5.X/XHARBOUR/C/C++/JAVA/DELPHI/XMATE/MD/MYSQL/FIREBIRD/INTERBASE Quote Link to comment Share on other sites More sharing options...
pbaroni Posted December 8, 2006 Author Report Share Posted December 8, 2006 O problema é que dá erro no momento em que eu instancio a classe, sendo assim não dá pra verificar com o que a variavel é carregada. Exemplo: oObject := Class1:New() Eu precisaria saber de a classe "Class1" existe antes de eu executar este comando. Quote Link to comment Share on other sites More sharing options...
foliene Posted December 8, 2006 Report Share Posted December 8, 2006 este codigo é da errsysw.prg ver \fwh\source\functions n = 1 cErrorLog += CRLF + "Classes in use:" + CRLF cErrorLog += "===============" + CRLF while ! Empty( __ClassName( n ) ) cErrorLog += " " + Str( n, 3 ) + " " + __ClassName( n++ ) + CRLF end Lista todas as classes em uso Ari Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.