atnsoft Posted March 7, 2013 Report Share Posted March 7, 2013 num get normal assim: local Ventra := 10, oEntra @ 12,12 get oEntra Var Ventra picture "99" of oDlg Valid Testaalgo(oEntra, Ventra) funciona mas se em outro contexto do sistema, preciso usar a funçao testaalgo assim: Ventra := 10 como criar o objeto get oEntra aqui? if ! TestaAlgo(oEntra, Ventra) ? "erro" endif Quote Link to comment Share on other sites More sharing options...
Eduardo Bilato Posted March 7, 2013 Report Share Posted March 7, 2013 Já tentou testar dentro da função TestaAlgo se o objeto do parâmetro existe ? Seria algo do tipo: Function TestaAlgo( obj,xvar ) . . <comandos da função> . if obj<>nil obj:Refresh() //refresh ou qualquer outro método que esteja usando endif Return .t. Quote Link to comment Share on other sites More sharing options...
kapiaba Posted March 7, 2013 Report Share Posted March 7, 2013 Se entendi, basta levar o objeto do Dialogo( oDlg ) Junto nos parametros. E voce pode escrever nela sem problemas já q está usando @Say. Eu acho.. Ou use o VARPUT para Refrescar o objeto que vc. já criou anteiormente. abs, Quote Link to comment Share on other sites More sharing options...
atnsoft Posted March 7, 2013 Author Report Share Posted March 7, 2013 Ricardo, deu certo, bastou testar se oEntra não é nil Gracias Quote Link to comment Share on other sites More sharing options...
Eduardo Bilato Posted March 7, 2013 Report Share Posted March 7, 2013 Ricardo, deu certo, bastou testar se oEntra não é nil Gracias HAUHUAHUAHUAHU essa foi pra mim ?! Quote Link to comment Share on other sites More sharing options...
atnsoft Posted March 7, 2013 Author Report Share Posted March 7, 2013 Quaquaquaqua, é mesmo. nem tinha lido na Ãntegra. Variavel trocada para oNadameu. Quote Link to comment Share on other sites More sharing options...
AnaCatacombs Posted March 8, 2013 Report Share Posted March 8, 2013 O correto mesmo seria testar o tipo do objeto: Valtype== "O". Alguém pode fazer alguma cagada e definir oEntra com qualquer outro tipo. 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.