PC SOFT

FOROS PROFESIONALES
WINDEVWEBDEV y WINDEV Mobile

Inicio → WINDEV 2024 → Internal Component
Internal Component
Iniciado por guest, 21,jun. 2016 15:16 - 3 respuestas
Publicado el 21,junio 2016 - 15:16
Hello Group,

Can a Internal Component have a global variable?

Thanks,
Dennis W
Publicado el 21,junio 2016 - 16:27
Hi Dennis,

Yes they can, but it will be global to them and they can be reached from the project using the internal component. We have lot of that stuff. Obviously, the IC can't access globals from the project (and this would be bad practice). Use a callback for that.

Best regards,
Alexandre Leclerc
Publicado el 21,junio 2016 - 16:54
Alexandre

Thanks for the quick response...

next question How? Where do you declare it?

Dennis W
Publicado el 21,junio 2016 - 17:03
Hi Dennis,

It can be declared in a collection of procedures or inside a class. We do both.

Then to access the constant, you can use the class name, or the collection name. Usual business.

I hope this helps.

Best regards,
Alexandre Leclerc