PC SOFT

FOROS PROFESIONALES
WINDEVWEBDEV y WINDEV Mobile

Inicio → WINDEV 2024 → Operator "is Class"
Operator "is Class"
Iniciado por guest, 22,sep. 2016 14:26 - 3 respuestas
Publicado el 22,septiembre 2016 - 14:26
Class1 is Class END Class2 is Class inherits from Class1 END Class3 is Class inherits from Class2 END Obj is Class1 dynamic = new Class3() ObjIsClass2 is boolean = Obj is Class2 // False!!
Why? Is it possible to fix this? Any workarounds?
Publicado el 22,septiembre 2016 - 14:41
Hi

in wlanguage, "is class" is a DECLARATION, not an operator/test.

So no, I do not think this is possible

Best regards
Publicado el 22,septiembre 2016 - 18:15
Hi,

You can use GetDefinition en GetTypeDefinition to solve this

http://doc.windev.com/en-US/…
http://doc.windev.com/en-US/…

Good luck !
Danny
Publicado el 22,septiembre 2016 - 19:03
Hi Arekusei,

As per documentation (http://doc.windev.com/en-US/…) your example is good. It looks like WinDev will not return True if this is a double inheritance, but only a direct inheritance (as from one can suppose from the doc and its example).

You may test and prove your case very simply and send it to the free technical support. They can confirm or not if this is n error or a “suggestion for improvements.”

Best regards,
Alexandre Leclerc