PC SOFT

FOROS PROFESIONALES
WINDEVWEBDEV y WINDEV Mobile

Inicio → WINDEV 2024 → WD17] Dynamic Structure
WD17] Dynamic Structure
Iniciado por guest, 14,jul. 2015 02:05 - No hay respuesta
Publicado el 14,julio 2015 - 02:05
Hi
I have a number of classes which have structures defined in them. In a procedure I want to be able to access the definition of the structure but I can't get it to work dynamically. The error is "Only object of same class can be assigned to object". There is no specific dynamic structure declaration syntax so I've tried as below and also as 'dynamic object' with the same result. Have I got something wrong or is this just not possible?

David

THIS WORKS: ls_FieldDefs is string d is Définition lPcl_RecStructure is class.Structure // SWITCH ls_Action CASE "ESAL": ls_FieldDefs = "lpcl_RecStructure" OTHER CASE END d = GetDefinition({ls_FieldDefs,indVariable})
THIS DOESN"T WORK: lpcl_RecStructure is dynamic // SWITCH ls_Action CASE "ESAL": lpcl_RecStructure = new Class.Structure ls_FieldDefs = "lpcl_Recstructure" OTHER CASE END d = GetDefinition({ls_FieldDefs,indVariable})