PC SOFT

PROFESSIONAL NEWSGROUPS
WINDEVWEBDEV and WINDEV Mobile

Home → WINDEV 25 → Dica: erro ao fechar tela vision no X
Dica: erro ao fechar tela vision no X
Started by ANDRE MARTINI / IS2, Apr., 13 2016 8:32 PM - 3 replies
Registered member
208 messages
Popularité : +25 (25 votes)
Posted on April, 13 2016 - 8:32 PM
Olá pessoal,

verifiquei que por padrão se o usuário fechar a janela de uma vision no botão X ocorre um erro no sistema porque a propriedade MyWindow..ReturnedValue retorna um valor NULL para a chamada nCodigoGrupo is int = Open(WIN_Grupo_De_Produtos_Vision)

para resolver isso fiz o seguinte:

closing WIN_Grupo_de_Produtos_Vision
IF MyWindow..ReturnedValue = Null THEN
MyWindow..ReturnedValue = 0
END


--
André Martini
IS2 Automotive http://www.is2.inf.br/is2automotive/index.html
IS2 Construtive http://www.is2.inf.br/is2construtive/index.html
IS2 Store http://www.is2.inf.br/is2store/index.html
IS2 Gerent http://www.is2.inf.br/is2gerent/index.html
Registered member
3,659 messages
Popularité : +175 (223 votes)
Posted on April, 21 2016 - 12:56 PM
:merci:

--
Adriano José Boller
______________________________________________
Consultor e Representante Oficial da
PcSoft no Brasil
+55 (41) 9949 1800
adrianoboller@gmail.com
skype: adrianoboller
http://wxinformatica.blogspot.com.br/
Posted on April, 21 2016 - 3:09 PM
Acredito que faltou setar um valor para MyWindow..ReturnedValue por isso retorna NULL,
se colocar no load do Vision MyWindow..ReturnedValue = 0 deve resolver
Registered member
208 messages
Popularité : +25 (25 votes)
Posted on April, 22 2016 - 7:59 PM
no final da inicialização do form vision o valor é setado
// Default return value
MyWindow..ReturnedValue = 0


mas se abrir o form vision e clicar direto no botão X para fechar dá um erro. Colocando o código abaixo no fechamento do form o erro não acontece
IF MyWindow..ReturnedValue = Null THEN
MyWindow..ReturnedValue = 0
END


--
André Martini
IS2 Automotive http://www.is2.inf.br/is2automotive/index.html
IS2 Construtive http://www.is2.inf.br/is2construtive/index.html
IS2 Store http://www.is2.inf.br/is2store/index.html
IS2 Gerent http://www.is2.inf.br/is2gerent/index.html