Opened 16 years ago
Closed 16 years ago
#712 closed enhancement (fixed)
Copy y DeepCopy para NameBlock y objetos (Clases)
| 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 (last modified by )
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 (2)
comment:1 Changed 16 years ago by
| Description: | modified (diff) |
|---|---|
| Status: | new → assigned |
comment:2 Changed 16 years ago by
| Resolution: | → fixed |
|---|---|
| Status: | assigned → closed |
Note: See
TracTickets for help on using
tickets.

(In [1176]) Method BNameBlock::operator= uses DeepCopy instead of Copy in order to create independent instances
Fixes #712