PC SOFT

FORUMS PROFESSIONNELS
WINDEVWEBDEV et WINDEV Mobile

Accueil → WINDEV 2024 → Catch "runtime warnings"
Catch "runtime warnings"
Débuté par Schrubbi, 20 aoû. 2024 15:40 - Aucune réponse
Posté le 20 août 2024 - 15:40
Hi,

does anybody know how to catch runtime warnings like SetFocus not possible, because the Control is not visible?

Example:
A Layout-Control contains an Edit control. The row of the Layout is set to invisible, the Edit is set to visibile but is de-facto invisible because of the invisible layout row.

SetFocus(Edit) "fails" and shows the runtime warning "the focus cannot be given because the contrl is invisible" in the code editor. But it does not result false (it does not return a value), it does not trigger CASE ERROR, CASE EXCEPTION, WHEN EXCEPTION IN, nor ErrorOccured().

How can I catch those warnings to prevent unexpected behaviours?
(And are there ways to check the de-facto visibility beforehand?)