close Warning: Can't synchronize with repository "(default)" (/var/svn/tolp does not appear to be a Subversion repository.). Look in the Trac log for more information.

Opened 16 years ago

Last modified 16 years ago

#712 closed enhancement

Copy y DeepCopy para NameBlock y objetos (Clases) — at Initial Version

Reported by: Javier Portugal Owned by: Víctor de Buen Remiro
Priority: highest Milestone:
Component: OOP Version: 2.0.1
Severity: critical Keywords:
Cc:

Description

Parece que el Copy con NameBlocks no copia. Ni en la Active ni en la 1.1.7.

NameBlock a = [[

Text _.valor = "Inicial";
Text GetValor (Real void) {

_.valor

};
Text SetValor (Text valor) {

Text _.valor := valor

}

]];

NameBlock b = Copy(a);

Text b::SetValor("cambiado");

Text WriteLn("El valor de b es "+b::GetValor(0));
Text WriteLn("El valor de a es "+a::GetValor(0));

Aparte del Copy sería necesario tener un DeepCopy para NameBlocks (objetos de clases)

Change History (0)

Note: See TracTickets for help on using tickets.